Skip to content

Commit

Permalink
Remove ZAP build, export PATH only
Browse files Browse the repository at this point in the history
  • Loading branch information
MonicaisHer committed Feb 12, 2024
1 parent 61adb5e commit 7c484e2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 38 deletions.
21 changes: 2 additions & 19 deletions snapcraft/parts/plugins/matter_sdk_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,17 +84,6 @@ def get_pull_commands(self) -> List[str]:
options = cast(MatterSdkPluginProperties, self._options)
commands = []

if self.snap_arch == "arm64":
commands.extend(
[
f"wget --no-verbose {ZAP_REPO}/releases/download/"
f"{options.matter_sdk_zap_version}/zap-linux-{self.snap_arch}.zip",
f"unzip -o zap-linux-{self.snap_arch}.zip -d zap",
'set -a && echo "ZAP_INSTALL_PATH=$PWD/zap" >> matter_sdk_env && set +a',
"echo 'ZAP_INSTALL_PATH environment variable exported to matter_sdk_env file'",
]
)

# Clone Matter SDK repository
commands.extend(
[
Expand Down Expand Up @@ -178,14 +167,8 @@ def get_build_commands(self) -> List[str]:
# Compare and output pigweed related environment variables to matter_sdk_env env file
commands.extend(
[
"set -a",
'echo "PATH=$PATH" >> matter_sdk_env',
'env | grep "^PW_" >> matter_sdk_env',
'echo "VIRTUAL_ENV=$VIRTUAL_ENV" >> matter_sdk_env',
'echo "CIPD_CACHE_DIR=$CIPD_CACHE_DIR" >> matter_sdk_env',
"set +a",
"echo 'pigweed related environment variables differences exported",
"to matter_sdk_env file'",
'echo "export PATH=$PATH" >> matter_sdk_env',
"echo 'environment variable PATH has been exported to matter_sdk_env file'",
]
)

Expand Down
21 changes: 2 additions & 19 deletions tests/unit/parts/plugins/test_matter_sdk_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,17 +46,6 @@ def test_get_pull_commands(part_info):

expected_commands = []

if plugin.snap_arch == "arm64":
expected_commands.extend(
[
f"wget --no-verbose {ZAP_REPO}/releases/download/"
f"{zap_version}/zap-linux-{plugin.snap_arch}.zip",
f"unzip -o zap-linux-{plugin.snap_arch}.zip -d zap",
'set -a && echo "ZAP_INSTALL_PATH=$PWD/zap" >> matter_sdk_env && set +a',
"echo 'ZAP_INSTALL_PATH environment variable exported to matter_sdk_env file'",
]
)

expected_commands.extend(
[
"if [ ! -d matter ]; then",
Expand Down Expand Up @@ -143,14 +132,8 @@ def test_get_build_commands(part_info):

expected_commands.extend(
[
"set -a",
'echo "PATH=$PATH" >> matter_sdk_env',
'env | grep "^PW_" >> matter_sdk_env',
'echo "VIRTUAL_ENV=$VIRTUAL_ENV" >> matter_sdk_env',
'echo "CIPD_CACHE_DIR=$CIPD_CACHE_DIR" >> matter_sdk_env',
"set +a",
"echo 'pigweed related environment variables differences exported",
"to matter_sdk_env file'",
'echo "export PATH=$PATH" >> matter_sdk_env',
"echo 'environment variable PATH has been exported to matter_sdk_env file'",
]
)

Expand Down

0 comments on commit 7c484e2

Please sign in to comment.