diff --git a/tests/.fmf/version b/tests/.fmf/version new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/tests/.fmf/version @@ -0,0 +1 @@ +1 diff --git a/tests/libpmemobj-test-installed-libs.patch b/tests/libpmemobj-test-installed-libs.patch new file mode 100644 index 0000000..90ceba4 --- /dev/null +++ b/tests/libpmemobj-test-installed-libs.patch @@ -0,0 +1,12 @@ +--- libpmemobj-cpp-1.12/CMakeLists.txt.orig 2021-08-04 11:05:28.909569992 -0400 ++++ libpmemobj-cpp-1.12/CMakeLists.txt 2021-08-04 11:06:02.922687943 -0400 +@@ -272,9 +272,6 @@ install(FILES ${CMAKE_CURRENT_BINARY_DIR + DESTINATION ${CMAKE_INSTALL_LIBDIR}/libpmemobj++/cmake) + + +-# set up project's include dir (our source 'include' dir) +-include_directories(include) +- + # Run checks for known issues, it's required to enable/disable some tests and examples. + # It has to be executed (included) here, when environment is fully set up, + # all packages are found and all paths/variables are set. diff --git a/tests/provision.fmf b/tests/provision.fmf new file mode 100644 index 0000000..62a6eba --- /dev/null +++ b/tests/provision.fmf @@ -0,0 +1,5 @@ +--- + +standard-inventory-qcow2: + qemu: + m: 2G diff --git a/tests/run_test.sh b/tests/run_test.sh new file mode 100644 index 0000000..9e05217 --- /dev/null +++ b/tests/run_test.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +NRCPUS=$(getconf _NPROCESSORS_ONLN) +patchfile="$PWD/libpmemobj-test-installed-libs.patch" + +cd source + +patch -p1 < $patchfile + +mkdir build +cd build +cmake .. +make -j $NRCPUS + +ctest --output-on-failure diff --git a/tests/tests.yml b/tests/tests.yml new file mode 100644 index 0000000..99e2734 --- /dev/null +++ b/tests/tests.yml @@ -0,0 +1,24 @@ +- hosts: localhost + roles: + - role: standard-test-source + tags: + - always + - role: standard-test-basic + tags: + - atomic + - classic + required_packages: + - libpmemobj-devel + - libpmemobj++-devel + - gcc-c++ + - cmake + - make + - glibc-devel + - pkgconfig + - doxygen + - gdb + - perl-Encode + tests: + - regression: # Run tests + dir: . + run: ./run_test.sh