Skip to content

Commit

Permalink
Sharing my local test runner script for `CI-like test app build and e…
Browse files Browse the repository at this point in the history
…xecution` (project-chip#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 <[email protected]>
Co-authored-by: Restyled.io <[email protected]>
  • Loading branch information
3 people authored and yyzhong-g committed Dec 11, 2024
1 parent 5f69d6a commit d0d2d5e
Show file tree
Hide file tree
Showing 3 changed files with 802 additions and 1 deletion.
12 changes: 12 additions & 0 deletions docs/testing/python.md
Original file line number Diff line number Diff line change
Expand Up @@ -637,6 +637,18 @@ format, use the `--load-from-env` flag with the `run_python_tests.py` runner.
Ex:
`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'`

## Running ALL or a subset of tests when changing application code

`scripts/tests/local.py` is a wrapper that is able to build and run tests in a
single command.

Example to compile all prerequisites and then running all python tests:

```
./scripts/tests/local.py build # will compile python in out/pyenv and ALL application prerequisites
./scripts/tests/local.py python-tests # Runs all python tests that are runnable in CI
```

## Defining the CI test arguments

Below is the format of the structured environment definition comments:
Expand Down
Loading

0 comments on commit d0d2d5e

Please sign in to comment.