Skip to content

Commit

Permalink
chore: fix acir-tests (#1435)
Browse files Browse the repository at this point in the history
Please provide a paragraph or two giving a summary of the change,
including relevant motivation and context.

# Checklist:
Remove the checklist to signal you've completed it. Enable auto-merge if
the PR is ready to merge.
- [ ] If the pull request requires a cryptography review (e.g.
cryptographic algorithm implementations) I have added the 'crypto' tag.
- [ ] I have reviewed my diff in github, line by line and removed
unexpected formatting changes, testing logs, or commented-out code.
- [ ] Every change is related to the PR description.
- [ ] I have
[linked](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue)
this pull request to relevant issues (if any exist).
  • Loading branch information
TomAFrench authored Aug 7, 2023
1 parent 8b1d48a commit 4b9b3fe
Showing 1 changed file with 2 additions and 18 deletions.
20 changes: 2 additions & 18 deletions circuits/cpp/barretenberg/acir_tests/run_acir_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,39 +18,23 @@ if [ ! -d acir_tests ]; then
git clone -b $BRANCH --filter=blob:none --no-checkout https://github.com/noir-lang/noir.git
cd noir
git sparse-checkout init --cone
git sparse-checkout set crates/nargo_cli/tests/test_data
git sparse-checkout set crates/nargo_cli/tests/execution_success
git checkout
cd ..
mv noir/crates/nargo_cli/tests/test_data acir_tests
mv noir/crates/nargo_cli/tests/execution_success acir_tests
rm -rf noir
fi
fi

cd acir_tests

# Parse exclude and fail directories from cargo.toml
exclude_dirs=$(grep "^exclude" config.toml | sed 's/exclude = \[//;s/\]//;s/\"//g;s/ //g' | tr ',' '\n')
fail_dirs=$(grep "^fail" config.toml | sed 's/fail = \[//;s/\]//;s/\"//g;s/ //g' | tr ',' '\n')

# Convert them to array
exclude_array=($exclude_dirs)
fail_array=($fail_dirs)
skip_array=(diamond_deps_0 workspace workspace_default_member)

function test() {
echo -n "Testing $1... "

dir_name=$(basename "$1")
if [[ " ${exclude_array[@]} " =~ " $dir_name " ]]; then
echo -e "\033[33mSKIPPED\033[0m (excluded)"
return
fi

if [[ " ${fail_array[@]} " =~ " $dir_name " ]]; then
echo -e "\033[33mSKIPPED\033[0m (would fail)"
return
fi

if [[ " ${skip_array[@]} " =~ " $dir_name " ]]; then
echo -e "\033[33mSKIPPED\033[0m (hardcoded to skip)"
return
Expand Down

0 comments on commit 4b9b3fe

Please sign in to comment.