Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 3 additions & 13 deletions .github/workflows/ports_psoc6.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,23 +50,12 @@ jobs:
runs-on: self-hosted
needs: server-build
strategy:
fail-fast: false
matrix:
# This matrix can be also generated in a previous job as a JSON list:
# echo 'test-suite-list=["pin", "signal", ...]' >> $GITHUB_OUTPUT
# Then here use the corresponding variable:
# ${{ fromJson(needs.<job-name>.outputs.test-suite-list) }}
# That way we don´t need to hardcode the values here.
board:
- CY8CPROTO-062-4343W
- CY8CPROTO-063-BLE
- CY8CKIT-062S2-AI
test-suite:
# - vfs
# - no-ext-hw-single
# - no-ext-hw-multi
# - ext-hw-single
# - ext-hw-multi
- ci-tests
steps:
- uses: actions/checkout@v4
- name: Download binaries
Expand All @@ -82,7 +71,8 @@ jobs:
- name: Run psoc6 tests
timeout-minutes: 12
run: |
./tests/ports/psoc6/run_psoc6_tests.sh --test-suite ${{ matrix.test-suite }} --board ${{ matrix.board }} --hil ${{ runner.name }}
cd tools/psoc6
python -u run_test_plan.py --board ${{ matrix.board }} --hil-devs ${{ runner.name }}-devs.yml --max-retries 2

- name: Container teardown
if: failure() || success()
Expand Down
2 changes: 1 addition & 1 deletion lib/mtb-psoc6-libs
25 changes: 7 additions & 18 deletions tests/ports/psoc6/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,38 +13,27 @@ psoc6/
│ ├─ single/ --> Tests require a single board
├─ mp_custom/ --> Tests based on mpremote (and not based on the run-test.py utility)
├─ inputs/ --> Non-test files utilities required as inputs for the tests
├─ run_psoc6_tests.sh --> Script handling PSoC6 tests
├─ README
```
## Running the tests

In order to run a particular test or group of tests make use of the `run_psoc6_tests.h` script.
In order to run a particular test or group of tests make use of the `tools/psoc6/run_test_plan.py` script.

Find the available test suites and options by running the help command:
For example, to run a test in your local machine, use the following command:

```
./run_psoc6_tests.sh help
python tools/psoc6/run_test_plan.py <test_name>
```

For example, to run the "PWM" tests (default device will be /dev/ttyACM0):
And this will execute the test and use by default the "/dev/ttyACM0" serial port, and the "/dev/ttyACM1" as the stub device port.

```
./run_psoc6_tests.sh -t pwm
```

If you need to specify the serial ports of the devices, for example, in a multiple instances test:

```
./run_psoc6_tests.sh -t bitstream --dev-test /dev/ttyACM0 --dev-stub /dev/ttyACM3
```

Or directly running all the tests of test under CI/CD for a given board type:
Alternatively, you can use a HIL devices file and board type to run the tests. For example, to run the `wifi` test with a given board and HIL devices file:

```
./run_psoc6_tests.sh --test-suite ci-tests --board CY8CPROTO-062-4343W --hil ifx-mpy-hil
python tools/psoc6/run_test_plan.py wifi --max-retries 1 --hil-devs local-devs.yml --board CY8CKIT-062S2-AI
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So you can specifically have retries defined for specific tests.. Nice!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The retries will apply to all the listed tests (all if no list specified as positional argument after the run_test_plan.py).

```

In this case, the hardware device list connected to the hardware in the loop (HIL) needs to be provided.
Check the `tools/psoc6/run_test_plan.py --help` for more details and options.

## Extended Hardware Setup Tests

Expand Down
Loading
Loading