Skip to content
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 tests for Matter plugin #3

Merged
merged 33 commits into from
Jan 25, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
e9b88ce
Update format to pass lint-pylint check
MonicaisHer Jan 3, 2024
2a72dd0
Add matter plugin unit test
MonicaisHer Jan 3, 2024
11bcf3b
Correct plugin properties names
MonicaisHer Jan 9, 2024
d4f6935
Fix bootstrap path
MonicaisHer Jan 9, 2024
c944a99
Add matter hello world snap for spread test
MonicaisHer Jan 10, 2024
68f1b73
Build hello world snap based on Matter lighting app
MonicaisHer Jan 11, 2024
95eb444
Overwrite the original main.app
MonicaisHer Jan 12, 2024
67cad0f
Update app name for spread test
MonicaisHer Jan 12, 2024
eebead2
Correct bootstrap path in unit test, fix typo in readme
MonicaisHer Jan 12, 2024
63f096c
Remove obsolete file
MonicaisHer Jan 12, 2024
1b2da56
Update comments
MonicaisHer Jan 12, 2024
698debd
Build lighting app from gn_build_example.sh
MonicaisHer Jan 16, 2024
ac0f29f
Update member type
MonicaisHer Jan 16, 2024
1e5909b
Fix pyright errors
MonicaisHer Jan 16, 2024
4751257
Use specific commit for matter sdk
MonicaisHer Jan 17, 2024
e139b7f
working code
MonicaisHer Jan 17, 2024
bb1a3d4
Add craft parts matter plugin test
MonicaisHer Jan 18, 2024
5702233
Update craft parts matter plugin test
MonicaisHer Jan 19, 2024
62c6d51
Test app initialization, remove hello-world snap
MonicaisHer Jan 22, 2024
648e712
Use matter commit with ptpython version fix
MonicaisHer Jan 22, 2024
32688df
Update unit test and spread test
MonicaisHer Jan 22, 2024
b9ede83
Store plugin environment, source environment in override-build
MonicaisHer Jan 22, 2024
664b81d
Remove hello-world snap related code
MonicaisHer Jan 22, 2024
1a274ac
Remove snapcraft part related environment variables
MonicaisHer Jan 22, 2024
a609bc2
Rename the plugin to matter sdk
MonicaisHer Jan 22, 2024
6d50ff8
Remove snapcraft part related env vars in plugin
MonicaisHer Jan 22, 2024
2a1cfe9
Update plugin keyword's name and file names
MonicaisHer Jan 23, 2024
1894129
Seperate pull and build commands, source only environment differences
MonicaisHer Jan 24, 2024
7d07d4c
Export environment variable PATH, improve formatting
MonicaisHer Jan 25, 2024
25973ab
Export zap and pigweed environment variables
MonicaisHer Jan 25, 2024
b50c90a
Export zap environment variable
MonicaisHer Jan 25, 2024
3a51c1a
Fix tox linter
MonicaisHer Jan 25, 2024
d63e5c0
Improve formatting
MonicaisHer Jan 25, 2024
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
4 changes: 2 additions & 2 deletions snapcraft/parts/plugins/matter_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,11 +128,11 @@ def get_build_commands(self) -> List[str]:
commands.extend(
[
"if [ ! -d matter ]; then",
f" git clone --depth 1 -b {options.matter_sdk_version} {MATTER_REPO} matter;",
f" git clone {MATTER_REPO} matter && cd matter && git checkout {options.matter_sdk_version};",
"else",
" echo 'Matter repository already exists, skip clone';",
" cd matter;",
"fi",
"cd matter;",
]
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ apps:
parts:
lighting-hello:
plugin: matter
matter-sdk-version: "master"
matter-sdk-version: "1536ca2" # use this commit with ptpython version fix; needs to be updated once sdk have a stable release
matter-zap-version: "v2023.11.13"
source: app
override-build: |
Expand Down
4 changes: 2 additions & 2 deletions tests/unit/parts/plugins/test_matter_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,11 @@ def test_get_build_commands(part_info):
expected_commands.extend(
[
"if [ ! -d matter ]; then",
f" git clone --depth 1 -b {sdk_version} {MATTER_REPO} matter;",
f" git clone {MATTER_REPO} matter && cd matter && git checkout {options.matter_sdk_version};",
"else",
" echo 'Matter repository already exists, skip clone';",
" cd matter;",
"fi",
"cd matter;",
"scripts/checkout_submodules.py --shallow --platform linux",
r"sed -i 's/\/tmp/\/mnt/g' src/platform/Linux/CHIPLinuxStorage.h",
r"sed -i 's/\/tmp/\/mnt/g' src/platform/Linux/CHIPPlatformConfig.h",
Expand Down
Loading