Details
-
Improvement
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
qpid-cpp-1.39.0
-
None
-
None
Description
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
Attachments
Issue Links
- relates to
-
QPID-5260 Miscellaneous CMake Improvements
- Closed