Skip to content

Commit 85b2fd3

Browse files
andy31415andreilitvinrestyled-commits
authored
Sharing my local test runner script for CI-like test app build and execution (#35625)
* Add a test runner for convenient python runs * Add some documentation * Restyle * Update requirements * Use local build platforms, to maybe be able to run under darwin * Use local build platforms, to maybe be able to run under darwin * Fix typos * More typo fixes * Restyle * Make platform name actually work * Restyled by prettier-markdown * Fix linter * Add license --------- Co-authored-by: Andrei Litvin <andreilitvin@google.com> Co-authored-by: Restyled.io <commits@restyled.io>
1 parent a578c14 commit 85b2fd3

File tree

3 files changed

+802
-1
lines changed

3 files changed

+802
-1
lines changed

docs/testing/python.md

+12
Original file line numberDiff line numberDiff line change
@@ -637,6 +637,18 @@ format, use the `--load-from-env` flag with the `run_python_tests.py` runner.
637637
Ex:
638638
`scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/python_testing/TC_ICDM_2_1.py'`
639639

640+
## Running ALL or a subset of tests when changing application code
641+
642+
`scripts/tests/local.py` is a wrapper that is able to build and run tests in a
643+
single command.
644+
645+
Example to compile all prerequisites and then running all python tests:
646+
647+
```
648+
./scripts/tests/local.py build # will compile python in out/pyenv and ALL application prerequisites
649+
./scripts/tests/local.py python-tests # Runs all python tests that are runnable in CI
650+
```
651+
640652
## Defining the CI test arguments
641653

642654
Below is the format of the structured environment definition comments:

0 commit comments

Comments
 (0)