Skip to content

Commit 856a729

Browse files
authored
Merge pull request #6213 from NlightNFotis/test_with_z3_ci
Run regression tests with `z3` as the backend solver.
2 parents 5b12b64 + cdbc539 commit 856a729

File tree

11 files changed

+54
-10
lines changed

11 files changed

+54
-10
lines changed

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

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,50 @@ jobs:
119119
env PATH=$PATH:`pwd`/src/solvers make -C regression/cbmc test-cprover-smt2
120120
make -C jbmc/regression test-parallel JOBS=2
121121
122+
# This job has been copied from the one above it, and modified to only build CBMC
123+
# and run the `regression/cbmc/` regression tests against Z3. The rest of the tests
124+
# (unit/regression) have been stripped based on the rationale that they are going
125+
# to be run by the job above, which is basically the same, but more comprehensive.
126+
# The reason we opted for a new job is that adding a `test-z3` step to the current
127+
# jobs increases the job runtime to unacceptable levels (over 2hrs).
128+
check-ubuntu-20_04-make-clang-smt-z3:
129+
runs-on: ubuntu-20.04
130+
env:
131+
CC: "ccache /usr/bin/clang"
132+
CXX: "ccache /usr/bin/clang++"
133+
steps:
134+
- uses: actions/checkout@v2
135+
with:
136+
submodules: recursive
137+
- name: Fetch dependencies
138+
env:
139+
DEBIAN_FRONTEND: noninteractive
140+
run: |
141+
sudo apt-get update
142+
sudo apt-get install --no-install-recommends -yq clang-10 clang++-10 gdb maven jq flex bison libxml2-utils cpanminus ccache z3
143+
make -C src minisat2-download
144+
cpanm Thread::Pool::Simple
145+
- name: Confirm z3 solver is available and log the version installed
146+
run: z3 --version
147+
- name: Prepare ccache
148+
uses: actions/cache@v2
149+
with:
150+
path: .ccache
151+
key: ${{ runner.os }}-20.04-make-clang-smt-z3-${{ github.ref }}-${{ github.sha }}-PR
152+
restore-keys: |
153+
${{ runner.os }}-20.04-make-clang-smt-z3-${{ github.ref }}
154+
${{ runner.os }}-20.04-make-clang-smt-z3
155+
- name: ccache environment
156+
run: |
157+
echo "CCACHE_BASEDIR=$PWD" >> $GITHUB_ENV
158+
echo "CCACHE_DIR=$PWD/.ccache" >> $GITHUB_ENV
159+
- name: Zero ccache stats and limit in size
160+
run: ccache -z --max-size=500M
161+
- name: Build with make
162+
run: make -C src -j2
163+
- name: Run regression/cbmc tests with z3 as the backend
164+
run: make -C regression/cbmc test-z3
165+
122166
check-ubuntu-20_04-cmake-gcc:
123167
runs-on: ubuntu-20.04
124168
steps:

regression/cbmc/Float-div3/test.desc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
CORE
1+
CORE broken-z3-smt-backend
22
main.c
33
--floatbv
44
^EXIT=0$

regression/cbmc/Quantifiers-assertion/test.desc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
CORE
1+
CORE broken-z3-smt-backend
22
main.c
33

44
^\*\* Results:$

regression/cbmc/Quantifiers-assignment/test.desc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
CORE
1+
CORE broken-z3-smt-backend
22
main.c
33

44
^\*\* Results:$

regression/cbmc/Quantifiers-if/test.desc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
CORE
1+
CORE broken-z3-smt-backend
22
main.c
33

44
^\*\* Results:$

regression/cbmc/Quantifiers-initialisation2/test.desc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
CORE
1+
CORE broken-z3-smt-backend
22
main.c
33

44
^\*\* Results:$

regression/cbmc/Quantifiers-not-exists/fixed.desc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
CORE
1+
CORE broken-z3-smt-backend
22
fixed.c
33

44
^\*\* Results:$

regression/cbmc/Quantifiers-not/test.desc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
CORE
1+
CORE broken-z3-smt-backend
22
main.c
33

44
^\*\* Results:$

regression/cbmc/Quantifiers-two-dimension-array/test.desc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
CORE
1+
CORE broken-z3-smt-backend
22
main.c
33

44
^\*\* Results:$

regression/cbmc/union10/union_list2.desc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
CORE
1+
CORE broken-z3-smt-backend
22
union_list2.c
33

44
^EXIT=0$

regression/cbmc/union11/union_list.desc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
CORE
1+
CORE broken-z3-smt-backend
22
union_list.c
33

44
^EXIT=0$

0 commit comments

Comments
 (0)