@@ -14,20 +14,15 @@ jobs:
1414 matrix :
1515 include :
1616 - name : simple
17- test-suite : tests/simple_tests
1817 - name : sv2v
19- test-suite : third_party/sv2v/test
2018 - name : yosys
21- test-suite : third_party/yosys/tests
2219 fail-fast : false
2320 name : ${{ matrix.name }}
2421 env :
2522 GIT_HTTP_LOW_SPEED_LIMIT : 1
2623 GIT_HTTP_LOW_SPEED_TIME : 600
2724 DEBIAN_FRONTEND : noninteractive
2825 GHA_MACHINE_TYPE : " n2-highmem-8"
29- PARSER : yosys-plugin
30- TEST_SUITE_DIR : ${{ matrix.test-suite }}
3126 TEST_SUITE_NAME : ${{ matrix.name }}
3227
3328 steps :
@@ -42,35 +37,12 @@ jobs:
4237
4338 - name : Install dependencies
4439 run : |
45- apt-get update -q
46- apt-get install -y \
47- ant \
48- build-essential \
49- cmake \
50- default-jre \
51- flex \
52- git \
53- google-perftools \
54- jq \
55- libfl-dev \
56- libgoogle-perftools-dev \
57- python3 \
58- python3-dev \
59- swig \
60- tcl-dev \
61- tclsh \
62- time \
63- uuid \
64- uuid-dev \
65- ;
40+ ./tests/scripts/run_formal.sh --name $TEST_SUITE_NAME install_dependencies
41+
6642
6743 - name : Checkout submodules
6844 run : |
69- git submodule sync
70- git submodule update --depth 1 --init --recursive --checkout \
71- third_party/yosys \
72- third_party/sv2v \
73- ;
45+ ./tests/scripts/run_formal.sh --name $TEST_SUITE_NAME load_submodules
7446
7547 - name : Download binaries
7648 uses : actions/download-artifact@v2
@@ -87,29 +59,21 @@ jobs:
8759 name : sv2v
8860 path : out/current/bin/
8961
62+ - name : Build eqy and sby
63+ run : |
64+ ./tests/scripts/run_formal.sh --name $TEST_SUITE_NAME build_dependencies
65+
9066 - name : Test
9167 run : |
9268 chmod +x out/current/bin/sv2v
9369 source .github/scripts/common.sh
94- export PATH="$PWD/out/current/bin:$PATH"
95- ./run_fv_tests.mk -j$(nproc) \
96- TEST_SUITE_DIR:="$(realpath ${TEST_SUITE_DIR})" \
97- TEST_SUITE_NAME:="${TEST_SUITE_NAME}" \
98- test
70+ ./tests/scripts/run_formal.sh --name $TEST_SUITE_NAME run
9971
100- - name : Generate list of performed tests
101- run : |
102- list_file="build/${TEST_SUITE_NAME}.performed_tests_list.txt"
103- touch "$list_file"
104- for result_json in build/tests/*/*/result.json; do
105- test_name=$(jq -r '.name' "${result_json}")
106- printf '%s:%s\n' "${TEST_SUITE_NAME}" "${test_name}" >> "$list_file"
107- done
10872
10973 - name : Pack formal verification logs
11074 run : |
11175 cd build
112- tar cf ${TEST_SUITE_NAME}.tar tests/*/*/*.out tests/*/*/slpp_all/*.log tests/*/*/*.txt tests/*/*/result.json
76+ tar cf ${TEST_SUITE_NAME}.tar tests/*/*
11377
11478 - name : Upload formal verification logs
11579 uses : actions/upload-artifact@v2
@@ -118,12 +82,6 @@ jobs:
11882 path : |
11983 build/*.tar
12084
121- - name : Upload list of performed tests
122- uses : actions/upload-artifact@v2
123- with :
124- name : formal-verification-tests-list
125- path : build/*.performed_tests_list.txt
126-
12785 - name : Upload load graphs
12886 uses : actions/upload-artifact@v2
12987 with :
@@ -135,34 +93,5 @@ jobs:
13593 - name : Check results and print a summary
13694 run : |
13795 set -o pipefail
138- python3 ./tests/formal/results.py "build/tests/${TEST_SUITE_NAME}" | tee $GITHUB_STEP_SUMMARY
139-
140- passlist-check :
141- name : Passlist Check
142- needs : tests-formal-verification
143- if : ${{ !cancelled() }}
144- runs-on : [self-hosted, Linux, X64, gcp-custom-runners]
145- container : ubuntu:jammy-20221130
96+ ./tests/scripts/run_formal.sh --name $TEST_SUITE_NAME gather_results | tee $GITHUB_STEP_SUMMARY
14697
147- steps :
148- - uses : actions/checkout@v3
149- with :
150- fetch-depth : 1
151-
152- - name : Download lists of performed tests
153- uses : actions/download-artifact@v2
154- with :
155- name : formal-verification-tests-list
156-
157- - name : Compare lists
158- run : |
159- sort *.performed_tests_list.txt > performed_tests_list.txt
160- grep -o '^[^ #]\+' tests/formal/passlist.txt | sort > sorted_passlist.txt
161- readarray not_performed_tests < <(comm -13 performed_tests_list.txt sorted_passlist.txt)
162- if (( ${#not_performed_tests[@]} > 0 )); then
163- printf '\x1b[1mTests from passlist.txt that were not performed:\x1b[0m\n'
164- printf '\x1b[91m%s\x1b[0m\n' "${not_performed_tests[@]}"
165- exit 1
166- else
167- exit 0
168- fi
0 commit comments