Skip to content

Commit 2d4b3f7

Browse files
authored
Merge pull request #7581 from tautschnig/cleanup/dedup-contracts-regression-tests
De-duplicate contracts regression tests
2 parents 4f660c4 + 205e123 commit 2d4b3f7

File tree

447 files changed

+224
-5083
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

447 files changed

+224
-5083
lines changed

regression/contracts-dfcc/CMakeLists.txt

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,28 @@ endif()
1414

1515

1616
add_test_pl_tests(
17-
"${CMAKE_CURRENT_SOURCE_DIR}/chain.sh $<TARGET_FILE:goto-cc> $<TARGET_FILE:goto-instrument> $<TARGET_FILE:cbmc> ${is_windows}"
17+
"${CMAKE_CURRENT_SOURCE_DIR}/chain.sh $<TARGET_FILE:goto-cc> $<TARGET_FILE:goto-instrument> $<TARGET_FILE:cbmc> ${is_windows} true"
18+
)
19+
20+
add_test_pl_profile(
21+
"contracts-non-dfcc"
22+
"${CMAKE_CURRENT_SOURCE_DIR}/chain.sh $<TARGET_FILE:goto-cc> $<TARGET_FILE:goto-instrument> $<TARGET_FILE:cbmc> ${is_windows} false"
23+
"-C;-X;dfcc-only;-s;non-dfcc"
24+
"CORE"
1825
)
1926

2027
## Enabling these causes a very significant increase in the time taken to run the regressions
2128

2229
#add_test_pl_profile(
2330
# "cbmc-z3"
24-
# "${CMAKE_CURRENT_SOURCE_DIR}/chain.sh $<TARGET_FILE:goto-cc> $<TARGET_FILE:goto-instrument> '$<TARGET_FILE:cbmc> --z3' ${is_windows}"
31+
# "${CMAKE_CURRENT_SOURCE_DIR}/chain.sh $<TARGET_FILE:goto-cc> $<TARGET_FILE:goto-instrument> '$<TARGET_FILE:cbmc> --z3' ${is_windows} true"
2532
# "-C;-X;broken-smt-backend;-X;thorough-smt-backend;-X;broken-z3-backend;-X;thorough-z3-backend;${gcc_only_string}-s;z3"
2633
# "CORE"
2734
#)
2835

2936
#add_test_pl_profile(
3037
# "cbmc-cprover-smt2"
31-
# "${CMAKE_CURRENT_SOURCE_DIR}/chain.sh $<TARGET_FILE:goto-cc> $<TARGET_FILE:goto-instrument> '$<TARGET_FILE:cbmc> --cprover-smt2' ${is_windows}"
38+
# "${CMAKE_CURRENT_SOURCE_DIR}/chain.sh $<TARGET_FILE:goto-cc> $<TARGET_FILE:goto-instrument> '$<TARGET_FILE:cbmc> --cprover-smt2' ${is_windows} true"
3239
# "-C;-X;broken-smt-backend;-X;thorough-smt-backend;-X;broken-cprover-smt2-backend;-X;thorough-cprover-smt2-backend;${gcc_only_string}-s;cprover-smt2"
3340
# "CORE"
3441
#)

regression/contracts-dfcc/Makefile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,17 @@ else
1414
endif
1515

1616
test:
17-
@../test.pl -e -p -c '../chain.sh $(exe) ../../../src/goto-instrument/goto-instrument ../../../src/cbmc/cbmc $(is_windows)' -X smt-backend $(GCC_ONLY)
17+
@../test.pl -e -p -c '../chain.sh $(exe) ../../../src/goto-instrument/goto-instrument ../../../src/cbmc/cbmc $(is_windows) true' -X smt-backend $(GCC_ONLY)
18+
@../test.pl -e -p -c '../chain.sh $(exe) ../../../src/goto-instrument/goto-instrument ../../../src/cbmc/cbmc $(is_windows) false' -X smt-backend $(GCC_ONLY) -X dfcc-only -s non-dfcc
1819

1920
test-cprover-smt2:
20-
@../test.pl -e -p -c '../chain.sh $(exe) ../../../src/goto-instrument/goto-instrument "../../../src/cbmc/cbmc --cprover-smt2" $(is_windows)' \
21+
@../test.pl -e -p -c '../chain.sh $(exe) ../../../src/goto-instrument/goto-instrument "../../../src/cbmc/cbmc --cprover-smt2" $(is_windows) true' \
2122
-X broken-smt-backend -X thorough-smt-backend \
2223
-X broken-cprover-smt-backend -X thorough-cprover-smt-backend \
2324
-s cprover-smt2 $(GCC_ONLY)
2425

2526
test-z3:
26-
@../test.pl -e -p -c '../chain.sh $(exe) ../../../src/goto-instrument/goto-instrument "../../../src/cbmc/cbmc --z3" $(is_windows)' \
27+
@../test.pl -e -p -c '../chain.sh $(exe) ../../../src/goto-instrument/goto-instrument "../../../src/cbmc/cbmc --z3" $(is_windows) true' \
2728
-X broken-smt-backend -X thorough-smt-backend \
2829
-X broken-z3-smt-backend -X thorough-z3-smt-backend \
2930
-s z3 $(GCC_ONLY)

regression/contracts-dfcc/assigns-enforce-malloc-zero/test.desc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
CORE
1+
CORE dfcc-only
22
main.c
33
--malloc-may-fail --malloc-fail-null --dfcc main --enforce-contract foo
44
^\[foo.assigns.\d+\] line \d+ Check that a\[\(signed long (long )?int\)i\] is assignable: SUCCESS$

regression/contracts-dfcc/assigns-replace-ignored-return-value/test.desc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
CORE
1+
CORE dfcc-only
22
main.c
33
--dfcc main --replace-call-with-contract bar --replace-call-with-contract baz --enforce-contract foo
44
^EXIT=0$

regression/contracts-dfcc/assigns-replace-malloc-zero/test.desc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
CORE
1+
CORE dfcc-only
22
main.c
33
--dfcc main --replace-call-with-contract foo --malloc-may-fail --malloc-fail-null
44
^EXIT=0$

regression/contracts-dfcc/assigns_enforce_02/test.desc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
CORE
1+
CORE dfcc-only
22
main.c
33
--dfcc main --enforce-contract foo
44
^\[foo.assigns.\d+\] line 6 Check that \*x is assignable: FAILURE$

regression/contracts-dfcc/assigns_enforce_03/test.desc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
CORE
1+
CORE dfcc-only
22
main.c
33
--dfcc main --enforce-contract f1
44
^\[f3.assigns.\d+\] line 14 Check that \*x3 is assignable: SUCCESS$

regression/contracts-dfcc/assigns_enforce_04/test.desc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
CORE
1+
CORE dfcc-only
22
main.c
33
--dfcc main --enforce-contract f1
44
^\[f3.assigns.\d+\] line 13 Check that \*x3 is assignable: SUCCESS$

regression/contracts-dfcc/assigns_enforce_05/test.desc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
CORE
1+
CORE dfcc-only
22
main.c
33
--dfcc main --enforce-contract f1
44
^EXIT=0$

regression/contracts-dfcc/assigns_enforce_06/test.desc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
CORE
1+
CORE dfcc-only
22
main.c
33
--dfcc main --enforce-contract f
44
^EXIT=0$

0 commit comments

Comments
 (0)