Chris Richardson created QPID-8251: -------------------------------------- Summary: Fail unit tests with more friendly output if the boost-test library is not present Key: QPID-8251 URL: https://issues.apache.org/jira/browse/QPID-8251 Project: Qpid Issue Type: Improvement Components: C++ Broker Affects Versions: qpid-cpp-1.39.0 Reporter: Chris Richardson
If the boost-test library is not present, cmake logs a warning: "-- Could not find unit testing library - will not build unit tests" (seeĀ https://issues.apache.org/jira/browse/QPID-5260) This is easy to miss and leads to a failure in the unit tests with some rather ugly output (see test output below) due to the unit_tests binary and indeed entire make target not being created. Those unfamiliar with the testing framework (like me) may spend quite some time connecting the resulting "valgrind: unit_test: command not found" error message to the above cmake warning, so it might be nice to have eg: the "run_unit_tests" script output an additional message explaining the probable cause. Test output: {{run_unit_tests: Calling '/usr/bin/valgrind --leak-check=full --num-callers=25 --error-exitcode=100 --log-file=/home/chrisr/projects/git/qpid-cpp/build-1.39.0-rc1/run_unit_tests_d578/valgrind_4832.log --gen-suppressions=all --suppressions=/home/chrisr/projects/git/qpid-cpp/build-1.39.0-rc1/src/tests/.valgrind.supp -- unit_test'}} {{valgrind: unit_test: command not found}} {{Traceback (most recent call last):}} {{ File "run_unit_tests", line 37, in <module>}} {{ call_with_valgrind("unit_test")}} {{ File "/home/chrisr/projects/git/qpid-cpp/build-1.39.0-rc1/src/tests/common.py", line 70, in call_with_valgrind}} {{ call(command, *args, **kwargs)}} {{ File "/home/chrisr/projects/git/qpid-cpp/build-1.39.0-rc1/src/tests/plano.py", line 418, in call}} {{ _subprocess.check_call(command, **kwargs)}} {{ File "/usr/lib/python2.7/subprocess.py", line 190, in check_call}} {{ raise CalledProcessError(retcode, cmd)}} {{subprocess.CalledProcessError: Command '/usr/bin/valgrind --leak-check=full --num-callers=25 --error-exitcode=100 --log-file=/home/chrisr/projects/git/qpid-cpp/build-1.39.0-rc1/run_unit_tests_d578/valgrind_4832.log --gen-suppressions=all --suppressions=/home/chrisr/projects/git/qpid-cpp/build-1.39.0-rc1/src/tests/.valgrind.supp -- unit_test' returned non-zero exit status 127}} -- This message was sent by Atlassian JIRA (v7.6.3#76005) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org For additional commands, e-mail: dev-h...@qpid.apache.org