libpmemobj-cpp icon indicating copy to clipboard operation
libpmemobj-cpp copied to clipboard

run-build.sh test functions don't clean up environment

Open lukaszstolarczuk opened this issue 3 years ago • 0 comments

Please provide a reproduction of the bug:

tests_package() function in run-build.sh removes pkg-config from the system (from docker container in our case) and never installs it back. What's more, next function tests_findLIBPMEMOBJ_cmake requires that no pkg-config is installed in the system.

Expected behavior:

Each independent test function (in run-build.sh and not only) should cleanup after execution, so it leaves system/docker in clean state.

Additional info:

To solve this issue trap command in bash can be useful, it may catch exit signal and do the cleanups even if the function/test fails.

lukaszstolarczuk avatar Nov 06 '20 12:11 lukaszstolarczuk