Skip to content

Commit b789e07

Browse files
authored
Merge pull request #5446 from diffblue/vs-github-action
Github action testing job for cbmc under VS2019
2 parents 152719f + 5b26dd8 commit b789e07

File tree

166 files changed

+326
-190
lines changed

Some content is hidden

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

166 files changed

+326
-190
lines changed

.github/workflows/pull-request-checks.yaml

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ jobs:
3939
make -C regression/cbmc test-paths-lifo
4040
env PATH=$PATH:`pwd`/src/solvers make -C regression/cbmc test-cprover-smt2
4141
make -C jbmc/regression test
42+
4243
check-ubuntu-20_04-cmake-gcc:
4344
runs-on: ubuntu-20.04
4445
steps:
@@ -111,24 +112,35 @@ jobs:
111112
run: cd build; ninja
112113
- name: Run CTest
113114
run: cd build; ctest -V -L CORE .
114-
check-vs-2019-build-only:
115+
116+
check-vs-2019-build-and-test:
115117
runs-on: windows-2019
116118
env:
117119
SCRIPT_DIR: .github/workflows/vs2019
118-
defaults:
119-
run:
120-
shell: cmd
121120
steps:
122121
- name: Checkout the repository
123122
uses: actions/checkout@v2
124123
with:
125124
submodules: recursive
126125

127126
- name: Install bison and flex
128-
run: "%SCRIPT_DIR%\\install-bison.bat"
127+
run: "${{env.SCRIPT_DIR}}\\install-bison.bat"
128+
129+
- name: Install z3
130+
run: |
131+
Invoke-WebRequest "https://github.com/Z3Prover/z3/releases/download/z3-4.8.8/z3-4.8.8-x64-win.zip" -OutFile z3.zip
132+
Expand-Archive z3.zip
133+
# We need Get-ChildItem.Name here because the path includes
134+
# the z3 version number, which we expect to change.
135+
$z3_path = "$(Get-Location)\z3\$((Get-ChildItem z3).Name)"
136+
$env:PATH += ";$z3_path"
137+
Write-Output "::set-env name=PATH::$env:PATH"
129138
130139
- name: Build cbmc
131-
run: "%SCRIPT_DIR%\\build-cbmc.bat"
140+
run: "${{env.SCRIPT_DIR}}\\build-cbmc.bat"
141+
142+
- name: Test cbmc
143+
run: "${{env.SCRIPT_DIR}}\\run-tests.bat"
132144

133145
check-clang-format:
134146
runs-on: ubuntu-20.04

.github/workflows/vs2019/build-cbmc.bat

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ echo "Remove strawberry"
1616
del /s /q "c:/Strawberry/c/bin"
1717

1818
echo "Configure CBMC with cmake"
19-
cmake -S. -Bbuild -GNinja
19+
cmake -S. -Bbuild
2020

2121
echo "Build CBMC with cmake"
22-
cmake --build build
22+
cmake --build build --config Release
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
@REM Run tests on visual studio 2019 generated build
2+
3+
@echo "Set up PATH to find Visual Studio tools"
4+
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
5+
6+
@echo PATH:
7+
@echo
8+
@echo %PATH%
9+
10+
@echo Run tests with ctest
11+
cd build
12+
ctest -j2 -V -L CORE -C Release .
Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
if("${CMAKE_SYSTEM_NAME}" STREQUAL "Windows")
2+
set(exclude_win_broken_tests -X winbug)
3+
else()
4+
set(exclude_win_broken_tests "")
5+
endif()
6+
17
add_test_pl_tests(
2-
"$<TARGET_FILE:jbmc> --validate-goto-model --validate-ssa-equation"
8+
"$<TARGET_FILE:jbmc> --validate-goto-model --validate-ssa-equation" ${exclude_win_broken_tests}
39
)

jbmc/regression/jbmc-concurrency/synchronized/test.desc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
CORE
1+
CORE winbug
22
Sync
33
--java-threading --throw-runtime-exceptions --cp `../../../../scripts/format_classpath.sh . ../../../src/java_bytecode/library/core-models.jar`
44
^EXIT=0$
Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,20 @@
1+
if("${CMAKE_SYSTEM_NAME}" STREQUAL "Windows")
2+
set(exclude_win_broken_tests -X winbug)
3+
else()
4+
set(exclude_win_broken_tests "")
5+
endif()
6+
17
add_test_pl_tests(
2-
"$<TARGET_FILE:jbmc> --validate-goto-model --validate-ssa-equation"
8+
"$<TARGET_FILE:jbmc> --validate-goto-model --validate-ssa-equation" ${exclude_win_broken_tests}
39
)
410

5-
add_test_pl_profile(
11+
if("${CMAKE_SYSTEM_NAME}" STREQUAL "Windows")
12+
message(WARNING "skipping broken jbmc-strings/ tests on windows")
13+
else()
14+
add_test_pl_profile(
615
"jbmc-strings-symex-driven-lazy-loading"
716
"$<TARGET_FILE:jbmc> --validate-goto-model --validate-ssa-equation --symex-driven-lazy-loading"
817
"-C;-X;symex-driven-lazy-loading-expected-failure;-s;symex-driven-loading"
918
"CORE"
10-
)
19+
)
20+
endif()

jbmc/regression/jbmc-strings/ConstantEvaluationCompareTo/test_fail1.desc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
CORE
1+
CORE winbug
22
Main
33
--function Main.constantCompareToFail1 --cp `../../../../scripts/format_classpath.sh . ../../../lib/java-models-library/target/core-models.jar` --property "java::Main.constantCompareToFail1:()V.assertion.1"
44
^VERIFICATION FAILED$

jbmc/regression/jbmc-strings/ConstantEvaluationCompareTo/test_fail1_vcc.desc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
CORE
1+
CORE winbug
22
Main
33
--function Main.constantCompareToFail1 --cp `../../../../scripts/format_classpath.sh . ../../../lib/java-models-library/target/core-models.jar` --property "java::Main.constantCompareToFail1:()V.assertion.1" --show-vcc
44
^EXIT=0$

jbmc/regression/jbmc-strings/ConstantEvaluationCompareTo/test_fail2.desc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
CORE
1+
CORE winbug
22
Main
33
--function Main.constantCompareToFail2 --cp `../../../../scripts/format_classpath.sh . ../../../lib/java-models-library/target/core-models.jar` --property "java::Main.constantCompareToFail2:()V.assertion.1"
44
^VERIFICATION FAILED$

jbmc/regression/jbmc-strings/ConstantEvaluationCompareTo/test_fail2_vcc.desc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
CORE
1+
CORE winbug
22
Main
33
--function Main.constantCompareToFail2 --cp `../../../../scripts/format_classpath.sh . ../../../lib/java-models-library/target/core-models.jar` --property "java::Main.constantCompareToFail2:()V.assertion.1" --show-vcc
44
^EXIT=0$

0 commit comments

Comments
 (0)