@@ -644,74 +644,70 @@ single command.
644
644
645
645
Example to compile all prerequisites and then running all python tests:
646
646
647
- ```
647
+ ``` shell
648
648
./scripts/tests/local.py build # will compile python in out/pyenv and ALL application prerequisites
649
649
./scripts/tests/local.py python-tests # Runs all python tests that are runnable in CI
650
650
```
651
651
652
652
## Defining the CI test arguments
653
653
654
- Below is the format of the structured environment definition comments:
654
+ Arguments required to run a test can be defined in the comment block at the top
655
+ of the test script. The section with the arguments should be placed between the
656
+ ` # === BEGIN CI TEST ARGUMENTS === ` and ` # === END CI TEST ARGUMENTS === `
657
+ markers. Arguments should be structured as a valid YAML dictionary with a root
658
+ key ` test-runner-runs ` , followed by the run identifier, and then the parameters
659
+ for that run, e.g.:
655
660
656
- ```
661
+ ``` python
657
662
# See https://github.com/project-chip/connectedhomeip/blob/master/docs/testing/python.md#defining-the-ci-test-arguments
658
663
# for details about the block below.
659
664
#
660
665
# === BEGIN CI TEST ARGUMENTS ===
661
- # test-runner-runs: <run_identifier>
662
- # test-runner-run/<run_identifier>/app: ${TYPE_OF_APP}
663
- # test-runner-run/<run_identifier>/factoryreset: <True|False>
664
- # test-runner-run/<run_identifier>/quiet: <True|False>
665
- # test-runner-run/<run_identifier>/app-args: <app_arguments>
666
- # test-runner-run/<run_identifier>/script-args: <script_arguments>
666
+ # test-runner-runs:
667
+ # run1:
668
+ # app: ${TYPE_OF_APP}
669
+ # factoryreset: <true|false>
670
+ # quiet: <true|false>
671
+ # app-args: <app_arguments>
672
+ # script-args: <script_arguments>
667
673
# === END CI TEST ARGUMENTS ===
668
674
```
669
675
670
- NOTE: The ` === BEGIN CI TEST ARGUMENTS === ` and ` === END CI TEST ARGUMENTS === `
671
- markers must be present.
672
-
673
676
### Description of Parameters
674
677
675
- - ` test-runner-runs ` : Specifies the identifier for the run. This can be any
676
- unique identifier.
677
-
678
- - Example: ` run1 `
679
-
680
- - ` test-runner-run/<run_identifier>/app ` : Indicates the application to be used
681
- in the test. Different app types as needed could be referenced from section
682
- [ name: Generate an argument environment file ] of the file
678
+ - ` app ` : Indicates the application to be used in the test. Different app types
679
+ as needed could be referenced from section [ name: Generate an argument
680
+ environment file ] of the file
683
681
[ .github/workflows/tests.yaml] ( https://github.com/project-chip/connectedhomeip/blob/master/.github/workflows/tests.yaml )
684
682
685
- - Example: `${TYPE_OF_APP}`
683
+ - Example: ` ${TYPE_OF_APP} `
686
684
687
- - ` test-runner-run/<run_identifier>/ factoryreset` : Determines whether a
688
- factory reset should be performed before the test.
685
+ - ` factoryreset ` : Determines whether a factory reset should be performed
686
+ before the test.
689
687
690
- - Example: ` True `
688
+ - Example: ` true `
691
689
692
- - ` test-runner-run/<run_identifier>/ quiet` : Sets the verbosity level of the
693
- test run. When set to True, the test run will be quieter.
690
+ - ` quiet ` : Sets the verbosity level of the test run. When set to True, the
691
+ test run will be quieter.
694
692
695
- - Example: ` True `
693
+ - Example: ` true `
696
694
697
- - ` test-runner-run/<run_identifier>/ app-args` : Specifies the arguments to be
698
- passed to the application during the test.
695
+ - ` app-args ` : Specifies the arguments to be passed to the application during
696
+ the test.
699
697
700
698
- Example:
701
699
` --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json `
702
700
703
- - ` test-runner-run/<run_identifier>/script-args ` : Specifies the arguments to
704
- be passed to the test script.
701
+ - ` script-args ` : Specifies the arguments to be passed to the test script.
705
702
706
703
- Example:
707
704
` --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto `
708
705
709
- - ` test-runner-run/<run_identifier>/script-start-delay ` : Specifies the number
710
- of seconds to wait before starting the test script. This parameter can be
711
- used to allow the application to initialize itself properly before the test
712
- script will try to commission it (e.g. in case if the application needs to
713
- be commissioned to some other controller first). By default, the delay is 0
714
- seconds.
706
+ - ` script-start-delay ` : Specifies the number of seconds to wait before
707
+ starting the test script. This parameter can be used to allow the
708
+ application to initialize itself properly before the test script will try to
709
+ commission it (e.g. in case if the application needs to be commissioned to
710
+ some other controller first). By default, the delay is 0 seconds.
715
711
716
712
- Example: ` 10 `
717
713
0 commit comments