-
Notifications
You must be signed in to change notification settings - Fork 284
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Further iteration towards full CI3. TLDR: Working towards ~10m repo test time. * Begin to separate out "building of tests" (mainly thinking of C++ and Rust). We don't want to do this on a fast bootstrap, but we do want to do it if we're going to run the tests. And moving towards the new testing model we need to separate building and running of tests. * Introduce `test-cmds` cmd on bootstrap scripts. Returns a list of commands, that if run from repo root, execute individual (usually) tests. * Note this also introduces the standard of `./scripts/run_test.sh` being a script that given some succinct arguments, can run a single test. * Introduce `test-all` (eventually to become just `test`) in root bootstrap.sh. No args runs all tests, or you can give it a list of folders to projects with their own bootstrap scripts and it'll run their tests. Runs in 10m20s. Currently skipping some things (see TODO below). Reports slow tests after run. * Note this also runs our TS project tests *directly as javascript*. i.e. it's assumed the tests have all been compiled to the dest folder and have whatever they need to operate. Hitting yarn + transpiler is just gruesome use of resources. * Improve cache script to not deal with env vars, but just args. If the args is a file, its treated as a rebuild patterns file, otherwise treated as a pattern itself. * Remove `TEST=0/1` flag. Unnecessary. Normal bootstraps don't run tests, and If i request to run tests I want them to run. So the "skip tests if cache flag exists" only needs to be applied if `CI=1`. * Get's rid of all hardcoded srs paths in favour of making function call to get the path. Will check environment variables first, and fallback on hardcoded path (now in one place). I ultimately didn't need this like I thought I would, but it's the right move anyway, and will make the switch to the flat crs easier. * Bit of refactoring to remove "right drift" of cache blocks. i.e. return if nothing to do instead of enclosing in an if statement. * bb.js uses @swc/jest like yarn-projects does. * Delete `bootstrap` folder. Is was there to help test the bootstrap script in CI, but now we use the bootstrap script in CI. * Add build cache to `boxes`. * Enable extended globs in CI3 scripts. * Revert back to default jest reporter, unless running all tests from root, then it uses summary reporter. TODO: - [ ] kv-store tests - [x] TXE for contracts/aztec.nr tests - [x] noir js packages tests - [ ] Skipping tests matching `test_caches_open|requests` in noir tests. - [x] Standardise how tests are skipped so we can see in one place. --------- Co-authored-by: ludamad <[email protected]>
- Loading branch information
1 parent
cd59f2e
commit 49dacc3
Showing
187 changed files
with
1,037 additions
and
975 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/bin/bash | ||
# This runs an individual test. | ||
# It's the script used by ./bootstrap.sh test-cmds. | ||
# It means we can return a concise, easy to read, easy to run command for reproducing a test run. | ||
set -eu | ||
|
||
cd $(dirname $0)/../build | ||
|
||
export GTEST_COLOR=1 | ||
export HARDWARE_CONCURRENCY=8 | ||
# export IGNITION_CRS_PATH="./barretenberg/cpp/srs_db/ignition" | ||
# export GRUMPKIN_CRS_PATH="./barretenberg/cpp/srs_db/grumpkin" | ||
|
||
./bin/$1 --gtest_filter=$2 |
Oops, something went wrong.