Skip to content

Commit 7f15f52

Browse files
Fixed latest tests.yaml and test_metadata.py changes
1 parent 70c8252 commit 7f15f52

File tree

2 files changed

+4
-10
lines changed

2 files changed

+4
-10
lines changed

.github/workflows/tests.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -477,7 +477,7 @@ jobs:
477477
"
478478
- name: Generate an argument environment file
479479
run: |
480-
touch /tmp/test_env.yaml
480+
echo -n "" >/tmp/test_env.yaml
481481
echo "ALL_CLUSTERS_APP: out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app" >> /tmp/test_env.yaml
482482
echo "CHIP_LOCK_APP: out/linux-x64-lock-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-lock-app" >> /tmp/test_env.yaml
483483
echo "ENERGY_MANAGEMENT_APP: out/linux-x64-energy-management-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-energy-management-app" >> /tmp/test_env.yaml

scripts/tests/py/test_metadata.py

+3-9
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ class TestMetadataReader(unittest.TestCase):
2727
# test-runner-run/run1/app-args: --discriminator 1234 --trace-to json:${TRACE_APP}.json
2828
# test-runner-run/run1/script-args: --commissioning-method on-network --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto
2929
# test-runner-run/run1/factoryreset: True
30+
# test-runner-run/run1/quiet: True
3031
'''
3132

3233
env_file_content = '''
@@ -44,7 +45,8 @@ class TestMetadataReader(unittest.TestCase):
4445
app_args="--discriminator 1234 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json",
4546
run="run1",
4647
app="out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app",
47-
factoryreset=True
48+
factoryreset=True,
49+
quiet=True
4850
)
4951

5052
def generate_temp_file(self, directory: str, file_content: str) -> str:
@@ -61,14 +63,6 @@ def test_run_arg_generation(self):
6163
reader = MetadataReader(env_file)
6264
self.maxDiff = None
6365

64-
test_file_expected_arg_string = (
65-
"scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py "
66-
"--app out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app "
67-
"--factoryreset --app-args \"--discriminator 1234 --trace-to json:out/trace_data/app-{SCRIPT_BASE_NAME}.json\" "
68-
"--script \"" + temp_file + "\" --script-args \"--commissioning-method on-network "
69-
"--trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto\"'"
70-
)
71-
7266
self.expected_metadata.py_script_path = temp_file
7367
actual = reader.parse_script(temp_file)[0]
7468
self.assertEqual(self.expected_metadata, actual)

0 commit comments

Comments
 (0)