Skip to content

Commit d8f5685

Browse files
committed
Include goto-cl regression tests in test sequence
Instead of special-casing the goto-cl folder via the CI configuration move all target-platform specific logic into the (C)Makefile. Also make sure exclusion patterns are used consistently.
1 parent 0872568 commit d8f5685

File tree

7 files changed

+34
-5
lines changed

7 files changed

+34
-5
lines changed

buildspec-windows.yml

-5
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ phases:
4747
Remove-Item cbmc\byte_update5 -Force -Recurse
4848
Remove-Item cbmc\byte_update6 -Force -Recurse
4949
Remove-Item cbmc\byte_update7 -Force -Recurse
50-
Remove-Item goto-gcc -Force -Recurse
5150
cd ..
5251
cd jbmc/regression
5352
Remove-Item jbmc\VarLengthArrayTrace1 -Force -Recurse
@@ -57,10 +56,6 @@ phases:
5756
$env:Path = "C:\tools\cygwin\bin;$env:Path"
5857
cmd /c 'call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x64 && bash -c "make -C regression test BUILD_ENV=MSVC" '
5958
60-
- |
61-
$env:Path = "C:\tools\cygwin\bin;$env:Path"
62-
cmd /c 'call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x64 && bash -c "make -C regression/goto-cl test BUILD_ENV=MSVC" '
63-
6459
- |
6560
$env:Path = "C:\tools\cygwin\bin;$env:Path"
6661
cmd /c 'call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x64 && bash -c "make -C unit test BUILD_ENV=MSVC" '

regression/CMakeLists.txt

+2
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ add_subdirectory(test-script)
3939
add_subdirectory(goto-analyzer-taint)
4040
if(NOT WIN32)
4141
add_subdirectory(goto-gcc)
42+
else()
43+
add_subdirectory(goto-cl)
4244
endif()
4345
add_subdirectory(goto-cc-cbmc)
4446
add_subdirectory(cbmc-cpp)

regression/Makefile

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ DIRS = cbmc \
1616
test-script \
1717
goto-analyzer-taint \
1818
goto-gcc \
19+
goto-cl \
1920
goto-cc-cbmc \
2021
cbmc-cpp \
2122
goto-cc-goto-analyzer \

regression/ansi-c/CMakeLists.txt

+6
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
2+
add_test_pl_tests(
3+
"$<TARGET_FILE:goto-cc>" -X gcc-only
4+
)
5+
else()
16
add_test_pl_tests(
27
"$<TARGET_FILE:goto-cc>"
38
)
9+
endif()

regression/goto-cl/CMakeLists.txt

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
add_test_pl_tests(
2+
"$<TARGET_FILE:goto-cc>" -X goto-link
3+
)

regression/goto-cl/Makefile

+11
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
default: tests.log
22

3+
include ../../src/config.inc
4+
include ../../src/common
5+
6+
ifeq ($(BUILD_ENV_),MSVC)
37
test:
48
@../test.pl -p -c ../../../src/goto-cc/goto-cl -X goto-link
59
@cp ../../src/goto-cc/goto-cl.exe ../../src/goto-cc/goto-link.exe
@@ -10,6 +14,13 @@ tests.log: ../test.pl
1014
@cp ../../src/goto-cc/goto-cl.exe ../../src/goto-cc/goto-link.exe
1115
@../test.pl -p -c ../../../src/goto-cc/goto-link -I goto-link
1216

17+
else
18+
test:
19+
20+
tests.log: ../test.pl
21+
22+
endif
23+
1324
show:
1425
@for dir in *; do \
1526
if [ -d "$$dir" ]; then \

regression/goto-gcc/Makefile

+11
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
default: tests.log
22

3+
include ../../src/config.inc
4+
include ../../src/common
5+
6+
ifeq ($(BUILD_ENV_),MSVC)
7+
test:
8+
9+
tests.log: ../test.pl
10+
11+
else
312
test:
413
-@ln -s goto-cc ../../src/goto-cc/goto-gcc
514
@../test.pl -p -c ../../../src/goto-cc/goto-gcc
@@ -8,6 +17,8 @@ tests.log: ../test.pl
817
-@ln -s goto-cc ../../src/goto-cc/goto-gcc
918
@../test.pl -p -c ../../../src/goto-cc/goto-gcc
1019

20+
endif
21+
1122
show:
1223
@for dir in *; do \
1324
if [ -d "$$dir" ]; then \

0 commit comments

Comments
 (0)