-
Notifications
You must be signed in to change notification settings - Fork 0
/
run-noir-tests.sh
executable file
·27 lines (23 loc) · 1.12 KB
/
run-noir-tests.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/bin/bash
set -u
shopt -s extglob
NARGO=${NARGO:-0}
NOIR_REPO=~/aztec-repos/aztec-packages/noir/noir-repo
FAIL_FAST=${FAIL_FAST:-0}
# regression_4709: Produces so much bytecode it's too slow to wait for (and segfaults as needs tonnes of mem).
# is_unconstrained: Fails because it expects main to be constrained, but we force all programs to be unconstrained.
# brillig_oracle: Requires advanced foreign function support to handle mocking.
# bigint: Might need to implement blackbox support. Although maybe bignum lib is the future.
# workspace_fail: Has two projects, one which passes, one which fails. The behaviour seems right so, bad test?
if [ "$NARGO" -eq 1 ]; then
export RAYON_NUM_THREADS=4
echo "Compiling..."
nargo=$NOIR_REPO/target/release/nargo
parallel "(cd {} && $nargo dump)" ::: $NOIR_REPO/test_programs/execution_*/!(regression_4709|is_unconstrained|brillig_oracle|bigint|workspace_fail)
fi
./run-dir-tests.sh $NOIR_REPO/test_programs/execution_success
[ "$?" -ne 0 ] && [ "$FAIL_FAST" -eq 1 ] && exit 1
if [ "${VM:-}" != "cvm" ]; then
echo
SHOULD=fail ./run-dir-tests.sh $NOIR_REPO/test_programs/execution_failure
fi