-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Automated testing workflow #45
Merged
farshidtz
merged 92 commits into
canonical:main
from
locnnil:IENG-884-automated-test-workflow
Feb 20, 2024
Merged
Add Automated testing workflow #45
farshidtz
merged 92 commits into
canonical:main
from
locnnil:IENG-884-automated-test-workflow
Feb 20, 2024
Conversation
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
- Added action to use SSH to debug workflow - Add download artifact action Signed-off-by: Lincoln Wallace <[email protected]>
Signed-off-by: Lincoln Wallace <[email protected]>
Signed-off-by: Lincoln Wallace <[email protected]>
Signed-off-by: Lincoln Wallace <[email protected]>
Fetching modifications made on library replacement branch into the creation of automated testing branch Signed-off-by: Lincoln Wallace <[email protected]>
Signed-off-by: Lincoln Wallace <[email protected]>
Signed-off-by: Lincoln Wallace <[email protected]> Co-authored-by: Farshid Tavakolizadeh <[email protected]>
locnnil
force-pushed
the
IENG-884-automated-test-workflow
branch
from
February 6, 2024 16:33
05d2ab3
to
0a5283f
Compare
Signed-off-by: Lincoln Wallace <[email protected]>
- Put SSH action to the end - Run chmod mod to add executable permission to gpio-mock.sh script - Run QEMU for arm64 Signed-off-by: Lincoln Wallace <[email protected]>
Signed-off-by: Lincoln Wallace <[email protected]>
Add integration tests and documentation Test for standard blink application Signed-off-by: Lincoln Wallace <[email protected]>
locnnil
force-pushed
the
IENG-884-automated-test-workflow
branch
2 times, most recently
from
February 7, 2024 19:04
b83d5d7
to
334e6f4
Compare
Signed-off-by: Lincoln Wallace <[email protected]>
Signed-off-by: Lincoln Wallace <[email protected]>
Signed-off-by: Lincoln Wallace <[email protected]>
Signed-off-by: Lincoln Wallace <[email protected]>
Signed-off-by: Lincoln Wallace <[email protected]>
farshidtz
reviewed
Feb 8, 2024
Signed-off-by: Lincoln Wallace <[email protected]>
Signed-off-by: Lincoln Wallace <[email protected]>
Signed-off-by: Lincoln Wallace <[email protected]>
Signed-off-by: Lincoln Wallace <[email protected]>
…ymore script Signed-off-by: Lincoln Wallace <[email protected]>
Signed-off-by: Lincoln Wallace <[email protected]>
Signed-off-by: Lincoln Wallace <[email protected]>
locnnil
force-pushed
the
IENG-884-automated-test-workflow
branch
from
February 19, 2024 19:56
c19f1ef
to
8d34588
Compare
Signed-off-by: Lincoln Wallace <[email protected]>
Signed-off-by: Lincoln Wallace <[email protected]>
Signed-off-by: Lincoln Wallace <[email protected]>
Signed-off-by: Lincoln Wallace <[email protected]>
Signed-off-by: Lincoln Wallace <[email protected]>
farshidtz
reviewed
Feb 19, 2024
Co-authored-by: Farshid Tavakolizadeh <[email protected]>
Signed-off-by: Lincoln Wallace <[email protected]>
Signed-off-by: Lincoln Wallace <[email protected]>
Signed-off-by: Lincoln Wallace <[email protected]>
Signed-off-by: Lincoln Wallace <[email protected]>
Signed-off-by: Lincoln Wallace <[email protected]>
Signed-off-by: Lincoln Wallace <[email protected]>
Signed-off-by: Lincoln Wallace <[email protected]>
farshidtz
approved these changes
Feb 20, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, with some minor comments. Thanks
I tested it on a Raspberry Pi 5:
$ GPIO_CHIP=4 GPIO_LINE=4 go test -v -failfast -count 1
go: downloading github.com/stretchr/testify v1.8.4
go: downloading github.com/canonical/matter-snap-testing v1.0.0-beta.1
go: downloading github.com/davecgh/go-spew v1.1.1
go: downloading github.com/pmezard/go-difflib v1.0.0
go: downloading gopkg.in/yaml.v3 v3.0.1
2024/02/20 08:55:55 [CLEAN]
2024/02/20 08:55:55 [exec] sudo snap remove --purge matter-pi-gpio-commander
2024/02/20 08:55:59 [stdout] matter-pi-gpio-commander removed
2024/02/20 08:55:59 [exec] sudo snap remove --purge chip-tool
2024/02/20 08:55:59 [stderr] snap "chip-tool" is not installed
2024/02/20 08:55:59 [SETUP]
2024/02/20 08:55:59 [exec] sudo snap install matter-pi-gpio-commander --channel=latest/edge
2024/02/20 08:56:08 [stdout] matter-pi-gpio-commander (edge) 2.0.0 from Canonical IoT Labs installed
2024/02/20 08:56:08 [exec] sudo snap set matter-pi-gpio-commander gpiochip='4'
2024/02/20 08:56:08 [exec] sudo snap set matter-pi-gpio-commander gpio='4'
2024/02/20 08:56:08 [exec] sudo snap connect matter-pi-gpio-commander:avahi-control
2024/02/20 08:56:09 [exec] sudo snap connect matter-pi-gpio-commander:bluez
2024/02/20 08:56:10 [exec] sudo snap connect matter-pi-gpio-commander:network
2024/02/20 08:56:10 [exec] sudo snap connect matter-pi-gpio-commander:network-bind
2024/02/20 08:56:10 [exec] sudo snap connect matter-pi-gpio-commander:custom-gpio matter-pi-gpio-commander:custom-gpio-dev
=== RUN TestBlinkOperation
snap_test.go:205: [exec] sudo matter-pi-gpio-commander.test-blink
exec.go:140: [stdout] GPIO: 4
exec.go:140: [stdout] GPIOCHIP: 4
exec.go:140: [stdout] On
exec.go:140: [stdout] Off
exec.go:140: [stdout] On
exec.go:140: [stdout] Off
exec.go:140: [stdout] On
exec.go:140: [stdout] Off
exec.go:140: [stdout] On
exec.go:140: [stdout] Off
exec.go:140: [stdout] On
--- PASS: TestBlinkOperation (5.00s)
=== RUN TestWifiMatterCommander
snap.go:28: [exec] sudo snap install chip-tool --channel=latest/edge
exec.go:140: [stdout] chip-tool (edge) v1.2.0.1+snap from Canonical IoT Labs installed
2024/02/20 08:56:19 [exec] sudo snap connect chip-tool:avahi-observe
snap.go:161: [exec] sudo snap start --enable matter-pi-gpio-commander
exec.go:140: [stdout] Started.
=== RUN TestWifiMatterCommander/Commission
snap_test.go:233: [exec] sudo chip-tool pairing onnetwork 110 20202021
snap_test.go:235: stderr:
=== RUN TestWifiMatterCommander/Control
snap_test.go:240: [exec] sudo chip-tool onoff toggle 110 1
snap_test.go:240: [exec] sudo chip-tool onoff toggle 110 1
snap_test.go:240: [exec] sudo chip-tool onoff toggle 110 1
snap_test.go:240: [exec] sudo chip-tool onoff toggle 110 1
--- PASS: TestWifiMatterCommander (7.47s)
--- PASS: TestWifiMatterCommander/Commission (0.78s)
--- PASS: TestWifiMatterCommander/Control (1.75s)
PASS
2024/02/20 08:56:23 [TEARDOWN]
2024/02/20 08:56:23 [exec] (sudo journalctl --since "2024-02-20 08:55:55" --no-pager | grep "matter-pi-gpio-commander"|| true) > matter-pi-gpio-commander.log
Wrote snap logs to /home/ubuntu/matter-pi-gpio-commander/tests/matter-pi-gpio-commander.log
2024/02/20 08:56:23 [exec] rm
2024/02/20 08:56:23 Removing installed snap: true
2024/02/20 08:56:23 [exec] sudo snap remove --purge matter-pi-gpio-commander
2024/02/20 08:56:29 [stdout] matter-pi-gpio-commander removed
2024/02/20 08:56:29 [exec] sudo snap remove --purge chip-tool
2024/02/20 08:56:33 [stdout] chip-tool removed
2024/02/20 08:56:33 [exec] ./gpio-mock.sh teardown
ok matter-pi-gpio-commander-tests 38.208s
Co-authored-by: Farshid Tavakolizadeh <[email protected]>
Co-authored-by: Farshid Tavakolizadeh <[email protected]>
Signed-off-by: Lincoln Wallace <[email protected]>
Signed-off-by: Lincoln Wallace <[email protected]>
Signed-off-by: Lincoln Wallace <[email protected]>
Signed-off-by: Lincoln Wallace <[email protected]>
Signed-off-by: Lincoln Wallace <[email protected]>
Signed-off-by: Lincoln Wallace <[email protected]>
Signed-off-by: Lincoln Wallace <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
matter-pi-gpio-commander.test-blink
application.lighting-app
application using the Wi-Fi method.