Skip to content

Commit f36da08

Browse files
Move Java regression tests
1 parent b6742ca commit f36da08

File tree

2,163 files changed

+260
-84
lines changed

Some content is hidden

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

2,163 files changed

+260
-84
lines changed

jbmc/regression/CMakeLists.txt

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
set(test_pl_path "${CMAKE_CURRENT_SOURCE_DIR}/test.pl")
2+
3+
macro(add_test_pl_profile name cmdline flag profile)
4+
add_test(
5+
NAME "${name}-${profile}"
6+
COMMAND ${test_pl_path} -p -c ${cmdline} ${flag} ${ARGN}
7+
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
8+
)
9+
set_tests_properties("${name}-${profile}" PROPERTIES
10+
LABELS "${profile};CBMC"
11+
)
12+
endmacro(add_test_pl_profile)
13+
14+
macro(add_test_pl_tests cmdline)
15+
get_filename_component(TEST_DIR_NAME ${CMAKE_CURRENT_SOURCE_DIR} NAME)
16+
message(STATUS "Adding tests in directory: ${TEST_DIR_NAME}")
17+
add_test_pl_profile("${TEST_DIR_NAME}" "${cmdline}" -C CORE ${ARGN})
18+
add_test_pl_profile("${TEST_DIR_NAME}" "${cmdline}" -T THOROUGH ${ARGN})
19+
add_test_pl_profile("${TEST_DIR_NAME}" "${cmdline}" -F FUTURE ${ARGN})
20+
add_test_pl_profile("${TEST_DIR_NAME}" "${cmdline}" -K KNOWNBUG ${ARGN})
21+
endmacro(add_test_pl_tests)
22+
23+
# For the best possible utilisation of multiple cores when
24+
# running tests in parallel, it is important that these directories are
25+
# listed with decreasing runtimes (i.e. longest running at the top)
26+
add_subdirectory(jbmc)
27+
add_subdirectory(strings-smoke-tests)
28+
add_subdirectory(jbmc-strings)
29+
add_subdirectory(jdiff)
30+
add_subdirectory(janalyzer-taint)
31+
add_subdirectory(jbmc-concurrency)
32+
add_subdirectory(jbmc-inheritance)
33+
add_subdirectory(jbmc-cover)

jbmc/regression/Makefile

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# For the best possible utilisation of multiple cores when
2+
# running tests in parallel, it is important that these directories are
3+
# listed with decreasing runtimes (i.e. longest running at the top)
4+
DIRS = janalzyer-taint \
5+
jbmc \
6+
jbmc-concurrency \
7+
jbmc-cover \
8+
jbmc-inheritance \
9+
jbmc-strings \
10+
jdiff \
11+
string-smoke-tests \
12+
# Empty last line
13+
14+
# Tests under goto-gcc cannot be run on Windows, so appveyor.yml unlinks
15+
# the entire directory under Windows. This variable will contain the list
16+
# of directories that actually exist on the current platform.
17+
PLATFORM_DIRS = $(wildcard $(DIRS))
18+
19+
# Run all test directories in sequence
20+
.PHONY: test
21+
test:
22+
@for dir in $(PLATFORM_DIRS); do \
23+
$(MAKE) "$$dir" || exit 1; \
24+
done;
25+
26+
# Pattern to execute a single test suite directory
27+
.PHONY: $(PLATFORM_DIRS)
28+
$(PLATFORM_DIRS):
29+
@echo "Running $@..." ;
30+
$(MAKE) -C "$@" test || exit 1;
31+
32+
# Run all test directories using GNU Parallel
33+
.PHONY: test-parallel
34+
.NOTPARALLEL: test-parallel
35+
test-parallel:
36+
@echo "Building with $(JOBS) jobs"
37+
parallel \
38+
--halt soon,fail=1 \
39+
--tag \
40+
--tagstring '{#}:' \
41+
--linebuffer \
42+
--jobs $(JOBS) \
43+
$(MAKE) "{}" \
44+
::: $(PLATFORM_DIRS)
45+
46+
47+
.PHONY: clean
48+
clean:
49+
@for dir in *; do \
50+
if [ -d "$$dir" ]; then \
51+
$(MAKE) -C "$$dir" clean; \
52+
fi; \
53+
done;
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
add_test_pl_tests(
2+
"$<TARGET_FILE:goto-analyzer>"
3+
)
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
default: tests.log
2+
3+
include ../../src/config.inc
4+
5+
test:
6+
@../$(CPROVER_DIR)/regression/test.pl -p -c ../../../src/janalyzer/janalyzer
7+
8+
tests.log: ../$(CPROVER_DIR)/regression/test.pl
9+
@../$(CPROVER_DIR)/regression/test.pl -p -c ../../../src/janalyzer/janalyzer
10+
11+
show:
12+
@for dir in *; do \
13+
if [ -d "$$dir" ]; then \
14+
vim -o "$$dir/*.java" "$$dir/*.out"; \
15+
fi; \
16+
done;
17+
18+
clean:
19+
find -name '*.out' -execdir $(RM) '{}' \;
20+
find -name '*.gb' -execdir $(RM) '{}' \;
21+
$(RM) tests.log

regression/cbmc-java-concurrency/Makefile renamed to jbmc/regression/jbmc-concurrency/Makefile

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
default: tests.log
22

3+
include ../../src/config.inc
4+
35
test:
4-
@../test.pl -p -c ../../../src/jbmc/jbmc
6+
@../$(CPROVER_DIR)/regression/test.pl -p -c ../../../src/jbmc/jbmc
57

6-
tests.log: ../test.pl
7-
@../test.pl -p -c ../../../src/jbmc/jbmc
8+
tests.log: ../$(CPROVER_DIR)/regression/test.pl
9+
@../$(CPROVER_DIR)/regression/test.pl -p -c ../../../src/jbmc/jbmc
810

911
show:
1012
@for dir in *; do \

regression/cbmc-java-inheritance/Makefile renamed to jbmc/regression/jbmc-cover/Makefile

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
default: tests.log
22

3+
include ../../src/config.inc
4+
35
test:
4-
@../test.pl -p -c ../../../src/jbmc/jbmc
6+
@../$(CPROVER_DIR)/regression/test.pl -p -c ../../../src/jbmc/jbmc
57

6-
tests.log: ../test.pl
7-
@../test.pl -p -c ../../../src/jbmc/jbmc
8+
tests.log: ../$(CPROVER_DIR)/regression/test.pl
9+
@../$(CPROVER_DIR)/regression/test.pl -p -c ../../../src/jbmc/jbmc
810

911
show:
1012
@for dir in *; do \

regression/cbmc-java/Makefile renamed to jbmc/regression/jbmc-inheritance/Makefile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
default: tests.log
22

3+
include ../../src/config.inc
4+
35
test:
4-
@../test.pl -p -c ../../../src/jbmc/jbmc
5-
@../test.pl -p -c "../../../src/jbmc/jbmc --symex-driven-lazy-loading" -X symex-driven-lazy-loading-expected-failure
6+
@../$(CPROVER_DIR)/regression/test.pl -p -c ../../../src/jbmc/jbmc
67

7-
tests.log: ../test.pl
8-
@../test.pl -p -c ../../../src/jbmc/jbmc
9-
@../test.pl -p -c "../../../src/jbmc/jbmc --symex-driven-lazy-loading" -X symex-driven-lazy-loading-expected-failure
8+
tests.log: ../$(CPROVER_DIR)/regression/test.pl
9+
@../$(CPROVER_DIR)/regression/test.pl -p -c ../../../src/jbmc/jbmc
1010

1111
show:
1212
@for dir in *; do \

jbmc/regression/jbmc-strings/Makefile

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
default: tests.log
2+
3+
include ../../src/config.inc
4+
5+
test:
6+
@../$(CPROVER_DIR)/regression/test.pl -p -c ../../../src/jbmc/jbmc
7+
@../$(CPROVER_DIR)/regression/test.pl -p -c "../../../src/jbmc/jbmc --symex-driven-lazy-loading" -X symex-driven-lazy-loading-expected-failure
8+
9+
testfuture:
10+
@../$(CPROVER_DIR)/regression/test.pl -p -c ../../../src/jbmc/jbmc -CF
11+
@../$(CPROVER_DIR)/regression/test.pl -p -c "../../../src/jbmc/jbmc --symex-driven-lazy-loading" -X symex-driven-lazy-loading-expected-failure -CF
12+
13+
testall:
14+
@../$(CPROVER_DIR)/regression/test.pl -p -c ../../../src/jbmc/jbmc -CFTK
15+
@../$(CPROVER_DIR)/regression/test.pl -p -c "../../../src/jbmc/jbmc --symex-driven-lazy-loading" -X symex-driven-lazy-loading-expected-failure -CFTK
16+
17+
tests.log: ../$(CPROVER_DIR)/regression/test.pl
18+
@../$(CPROVER_DIR)/regression/test.pl -p -c ../../../src/jbmc/jbmc
19+
@../$(CPROVER_DIR)/regression/test.pl -p -c "../../../src/jbmc/jbmc --symex-driven-lazy-loading" -X symex-driven-lazy-loading-expected-failure
20+
21+
show:
22+
@for dir in *; do \
23+
if [ -d "$$dir" ]; then \
24+
vim -o "$$dir/*.c" "$$dir/*.out"; \
25+
fi; \
26+
done;
27+
28+
clean:
29+
find -name '*.out' -execdir $(RM) '{}' \;
30+
find -name '*.gb' -execdir $(RM) '{}' \;
31+
$(RM) tests.log
32+

0 commit comments

Comments
 (0)