Skip to content

Commit c2595eb

Browse files
author
AztecBot
committed
Merge branch 'next' into ad/chore/ci-release-pr-canary
2 parents 5448986 + 795cd3a commit c2595eb

File tree

4 files changed

+34
-12
lines changed

4 files changed

+34
-12
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1+
^barretenberg/acir_tests/bootstrap.sh
12
^barretenberg/acir_tests/scripts/run_test.sh
23
^barretenberg/acir_tests/internal_test_programs/.*/.*\.(nr|toml)$

barretenberg/acir_tests/bootstrap.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,12 @@ function build {
113113
rm -rf acir_tests/{regression_5045,regression_7744}
114114
# The following test fails because it uses CallData/ReturnData with UltraBuilder, which is not supported
115115
rm -rf acir_tests/{regression_7612,regression_7143,databus_composite_calldata,databus_two_calldata_simple,databus_two_calldata,databus}
116+
# Mark tests that are expected to fail with a failing_ prefix.
117+
# bb_prove.sh will expect these to fail and error if they suddenly pass.
118+
for t in ecdsa_secp256k1_invalid_inputs; do
119+
mv acir_tests/$t acir_tests/failing_$t
120+
sed -i "s/^name = \"$t\"/name = \"failing_$t\"/" acir_tests/failing_$t/Nargo.toml
121+
done
116122
# Merge the internal test programs with the acir tests.
117123
cp -R ./internal_test_programs/* acir_tests
118124

barretenberg/acir_tests/scripts/bb_prove.sh

Lines changed: 26 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ source $(git rev-parse --show-toplevel)/ci3/source
33

44
export HARDWARE_CONCURRENCY=8
55

6-
cd ../acir_tests/$1
6+
test_name=$1
7+
cd ../acir_tests/$test_name
78

89
bb=$(../../../cpp/scripts/find-bb)
910

@@ -14,14 +15,28 @@ flags="-v --scheme ultra_honk $*"
1415
mkdir -p output-$$
1516
trap "rm -rf output-$$" EXIT
1617

17-
# Generate VK
18-
$bb write_vk $flags -b target/program.json -o output-$$
18+
# Tests prefixed with failing_ are expected to fail.
19+
if [[ $test_name == failing_* ]]; then
20+
if $bb write_vk $flags -b target/program.json -o output-$$ && \
21+
$bb prove $flags -b target/program.json -k output-$$/vk -o output-$$ && \
22+
$bb verify $flags \
23+
-k output-$$/vk \
24+
-p output-$$/proof \
25+
-i output-$$/public_inputs; then
26+
echo "ERROR: Expected test '$test_name' to fail, but it passed!"
27+
exit 1
28+
fi
29+
else
30+
# Generate VK
31+
$bb write_vk $flags -b target/program.json -o output-$$
32+
33+
# Prove
34+
$bb prove $flags -b target/program.json -k output-$$/vk -o output-$$
35+
36+
# Verify
37+
$bb verify $flags \
38+
-k output-$$/vk \
39+
-p output-$$/proof \
40+
-i output-$$/public_inputs
41+
fi
1942

20-
# Prove
21-
$bb prove $flags -b target/program.json -k output-$$/vk -o output-$$
22-
23-
# Verify
24-
$bb verify $flags \
25-
-k output-$$/vk \
26-
-p output-$$/proof \
27-
-i output-$$/public_inputs

0 commit comments

Comments
 (0)