-
Notifications
You must be signed in to change notification settings - Fork 286
Description
CBMC version: abba3d7
Operating system: Mac OS 10.15.7
PR #5985 exposed some issues with the existing Makefiles and CMakeLists.txt in regression/ subdirectories:
1. make and cmake sometimes run different regression tests
One example is regression/cbmc:
makeonly builds thetesttarget. Althoughtest-cprover-smt2andtest-paths-lifoare defined, they are not built as part of thedefaulttarget.cmakebuilds (the equivalents of) all three targets:testandtest-cprover-smt2andtest-paths-lifo.
There might be similar instances in other subdirectories under regression/. You can notice this difference in the *cmake* (and Ubuntu 18.04) CI jobs vs *make* CI jobs. They don't run the same set of regression tests!
I am not sure if there is a good / automated solution to ensuring that make and cmake always build the same targets. An immediate step for now is to update all the default targets and make sure they run the same tests as added in the CMakeLists.txt file.
2. Inconsistent behavior of make command within regression/
The make command under regression/ runs the default target in each subdirectory:
Lines 72 to 75 in abba3d7
| test: | |
| @for dir in $(DIRS); do \ | |
| $(MAKE) "$$dir" || exit 1; \ | |
| done; |
However, the make X command under regression/ runs the test target under X subdirectory:
Lines 79 to 81 in abba3d7
| $(DIRS): | |
| @echo "Running $@..." ; | |
| $(MAKE) -C "$@" test || exit 1; |
Line 81 should be fixed to also build the default target instead.