Skip to content

Several inconsistenties in regression test build scripts #5986

Closed
@SaswatPadhi

Description

@SaswatPadhi

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:

  • make only builds the test target. Although test-cprover-smt2 and test-paths-lifo are defined, they are not built as part of the default target.
  • cmake builds (the equivalents of) all three targets: test and test-cprover-smt2 and test-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:

cbmc/regression/Makefile

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:

cbmc/regression/Makefile

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.

Metadata

Metadata

Assignees

Labels

TestsawsBugs or features of importance to AWS CBMC users

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions