22 - check_code_format
33 - build_binaries
44 - run_parsing_and_formal_tests
5- - verify_formal_tests_passlist
65 - run_large_designs_tests
76 - optional_bsg_tests
87
@@ -12,13 +11,20 @@ check_format:
1211 stage : check_code_format
1312 script :
1413 - echo "Install dependencies"
15- - apt update && apt install -y git clang-format
14+ - apt update && apt install -y git clang-format python3 jq
1615 - echo "Check code format"
1716 - ./.github/scripts/format_sources.sh
17+ - exit_code=0
1818 - if ! git diff --exit-code; then
1919 - echo "Format locally using ./.github/scripts/format_sources.sh"
20- - /bin/false
20+ - exit_code=1
2121 - fi
22+ - ./.github/scripts/sort_passlists.sh
23+ - if ! git diff --exit-code; then
24+ - echo "Format locally using ./.github/scripts/format_sources.sh"
25+ - exit_code=1
26+ - fi
27+ - exit $exit_code
2228
2329build_binaries :
2430 stage : build_binaries
@@ -45,8 +51,7 @@ build_binaries:
4551 - echo "Build sv2v binary"
4652 - git submodule update --init --recursive --checkout third_party/sv2v
4753 - wget -qO- https://get.haskellstack.org/ | sh -s - -f -d /usr/local/bin
48- - make -j$(nproc) -C $PWD/third_party/sv2v
49- - cp third_party/sv2v/bin/sv2v out/release/bin/
54+ - make build_sv2v -j$(nproc)
5055 artifacts :
5156 when : always
5257 paths :
@@ -129,18 +134,17 @@ formal_verification_simple_tests:
129134 script :
130135 - echo "Install dependencies"
131136 - apt update
132- - apt install -y $DEPENDENCIES_FOR_TESTING
137+ - apt install -y $DEPENDENCIES_FOR_TESTING python3-click
138+ - echo "Load submodules"
139+ - git submodule sync
140+ - git submodule update --init --checkout third_party/{eqy,sby}
141+ - echo "Prepare eqy"
142+ - make build_eqy build_sby -j $(nproc)
133143 - echo "Start testing"
134144 - export PATH="$PWD/out/current/bin:$PATH"
135145 - ./run_fv_tests.mk -j $(nproc) TEST_SUITE_DIR:="$DIR" TEST_SUITE_NAME:="$NAME" test
136146 - echo "Gather tests results"
137- - list_file="build/$NAME.performed_tests_list.txt"
138- - for result_json in build/tests/*/*/result.json; do
139- - test_name=$(jq -r '.name' "${result_json}")
140- - printf '%s:%s\n' "$NAME" "${test_name}" >> "$list_file"
141- - done
142- - set -o pipefail
143- - python3 ./tests/formal/results.py "build/tests/${NAME}" | tee "build/${NAME}_summary.txt"
147+ - ./tests/formal/gather_fv_results.sh $NAME
144148 artifacts :
145149 when : always
146150 paths :
@@ -161,21 +165,17 @@ formal_verification_yosys_tests:
161165 script :
162166 - echo "Install dependencies"
163167 - apt update
164- - apt install -y $DEPENDENCIES_FOR_TESTING
168+ - apt install -y $DEPENDENCIES_FOR_TESTING python3-click
165169 - echo "Load submodules"
166170 - git submodule sync
167- - git submodule update --init --recursive third_party/yosys
171+ - git submodule update --init --checkout third_party/{eqy,sby,yosys}
172+ - echo "Prepare eqy"
173+ - make build_eqy build_sby -j $(nproc)
168174 - echo "Start testing"
169175 - export PATH="$PWD/out/current/bin:$PATH"
170176 - ./run_fv_tests.mk -j $(nproc) TEST_SUITE_DIR:="$DIR" TEST_SUITE_NAME:="$NAME" test
171177 - echo "Gather tests results"
172- - list_file="build/$NAME.performed_tests_list.txt"
173- - for result_json in build/tests/*/*/result.json; do
174- - test_name=$(jq -r '.name' "${result_json}")
175- - printf '%s:%s\n' "$NAME" "${test_name}" >> "$list_file"
176- - done
177- - set -o pipefail
178- - python3 ./tests/formal/results.py "build/tests/${NAME}" | tee "build/${NAME}_summary.txt"
178+ - ./tests/formal/gather_fv_results.sh $NAME
179179 artifacts :
180180 when : always
181181 paths :
@@ -196,45 +196,22 @@ formal_verification_sv2v_tests:
196196 script :
197197 - echo "Install dependencies"
198198 - apt update
199- - apt install -y $DEPENDENCIES_FOR_TESTING
199+ - apt install -y $DEPENDENCIES_FOR_TESTING python3-click
200200 - echo "Load submodules"
201201 - git submodule sync
202- - git submodule update --init --recursive --checkout third_party/sv2v
202+ - git submodule update --init --checkout third_party/{sv2v,eqy,sby}
203+ - echo "Prepare eqy"
204+ - make build_eqy build_sby -j $(nproc)
203205 - echo "Start testing"
204206 - export PATH="$PWD/out/current/bin:$PATH"
205207 - ./run_fv_tests.mk -j $(nproc) TEST_SUITE_DIR:="$DIR" TEST_SUITE_NAME:="$NAME" test
206208 - echo "Gather tests results"
207- - list_file="build/$NAME.performed_tests_list.txt"
208- - for result_json in build/tests/*/*/result.json; do
209- - test_name=$(jq -r '.name' "${result_json}")
210- - printf '%s:%s\n' "$NAME" "${test_name}" >> "$list_file"
211- - done
212- - set -o pipefail
213- - python3 ./tests/formal/results.py "build/tests/${NAME}" | tee "build/${NAME}_summary.txt"
209+ - ./tests/formal/gather_fv_results.sh $NAME
214210 artifacts :
215211 when : always
216212 paths :
217213 - build/
218214
219- verify_formal_tests_passlist :
220- stage : verify_formal_tests_passlist
221- dependencies : [formal_verification_simple_tests, formal_verification_yosys_tests, formal_verification_sv2v_tests]
222- only :
223- - main
224- - merge_requests
225- script :
226- - echo "Check if every test from passlist.txt was executed"
227- - sort build/*.performed_tests_list.txt > performed_tests_list.txt
228- - cat tests/formal/passlist.txt | sed '/^#/d' | sort > sorted_passlist.txt
229- - readarray not_performed_tests < <(comm -13 performed_tests_list.txt sorted_passlist.txt)
230- - if (( ${#not_performed_tests[@]} > 0 )); then
231- - printf '\x1b[1mTests from passlist.txt that were not performed:\x1b[0m\n'
232- - printf '\x1b[91m%s\x1b[0m\n' "${not_performed_tests[@]}"
233- - exit 1
234- - else
235- - exit 0
236- - fi
237-
238215veer_synth_large_design :
239216 stage : run_large_designs_tests
240217 dependencies : [build_binaries]
0 commit comments