Skip to content

Commit

Permalink
chore: automatically clear any unwanted directories in test_programs (
Browse files Browse the repository at this point in the history
#5081)

# Description

## Problem\*

Closes #5035

## Summary\*

Alternative to #5035 which just deletes any test programs which don't
have a Nargo.toml file.

## Additional Context



## Documentation\*

Check one:
- [x] No documentation needed.
- [ ] Documentation included in this PR.
- [ ] **[For Experimental Features]** Documentation to be submitted in a
separate PR.

# PR Checklist\*

- [x] I have tested the changes locally.
- [x] I have formatted the changes with [Prettier](https://prettier.io/)
and/or `cargo fmt` on default settings.
  • Loading branch information
TomAFrench authored May 22, 2024
1 parent 4ae91cf commit b34cbd8
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test_programs/rebuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,14 @@ process_dir() {
local current_dir=$2
local dir_name=$(basename "$dir")

if [[ ! -f "$dir/Nargo.toml" ]]; then
# This directory isn't a proper test but just hold some stale build artifacts
# We then delete it and carry on.
rm -rf $dir
return 0
fi


if [[ ! -d "$current_dir/acir_artifacts/$dir_name" ]]; then
mkdir -p $current_dir/acir_artifacts/$dir_name
fi
Expand Down

0 comments on commit b34cbd8

Please sign in to comment.