Skip to content

Commit

Permalink
Quick Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
tehampson committed Jul 31, 2024
1 parent 03230f9 commit 51a9ced
Showing 1 changed file with 6 additions and 10 deletions.
16 changes: 6 additions & 10 deletions src/python_testing/TC_MCORE_FS_1_3.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@
# limitations under the License.
#

# This test requires a TH_SERVER application that returns UnsupportedAttribute when reading UniqueID from BasicInformation Cluster. Please specify with --string-arg th_server_app_path:<path_to_app>

import logging
import os
import pathlib
import random
import signal
import subprocess
Expand Down Expand Up @@ -47,7 +48,6 @@ def teardown_class(self):
logging.warning("Stopping app with SIGTERM")
self.app_process_for_dut_eco.send_signal(signal.SIGTERM.value)
self.app_process_for_dut_eco.wait()
# TODO: Use timeout, if term doesn't work, try SIGINT
if self.app_process_for_th_eco is not None:
logging.warning("Stopping app with SIGTERM")
self.app_process_for_th_eco.send_signal(signal.SIGTERM.value)
Expand All @@ -60,14 +60,13 @@ def teardown_class(self):


async def create_device_for_dut_ecosystem(self):
# TODO: This needs to come from an arg and needs to be something available on the TH
# TODO: confirm whether we can open processes like this on the TH
app = os.path.join(pathlib.Path(__file__).resolve().parent, '..', '..', 'out',
'linux-x64-all-clusters-no-ble-clang', 'chip-all-clusters-app-no-unique-id')
app = self.matter_test_config.user_params.get("th_server_app_path", None)
if not app:
asserts.fail('This test requires a TH_SERVER app. Specify app path with --string-arg th_server_app_path:<path_to_app>')

self.device_for_dut_eco_kvs = f'kvs_{str(uuid.uuid4())}'
discriminator = random.randint(0, 4095)
discriminator = 3840
passcode = 20202021
app_args = f'--secured-device-port {self.device_for_dut_eco_port} --discriminator {discriminator} --passcode {passcode} --KVS {self.device_for_dut_eco_kvs}'
cmd = f'{app} {app_args}'
Expand All @@ -80,14 +79,11 @@ async def create_device_for_dut_ecosystem(self):


async def create_and_commission_device_for_th_ecosystem(self):
# TODO: This needs to come from an arg and needs to be something available on the TH
# TODO: confirm whether we can open processes like this on the TH
app = os.path.join(pathlib.Path(__file__).resolve().parent, '..', '..', 'out',
'linux-x64-all-clusters-no-ble-clang', 'chip-all-clusters-app-no-unique-id')
app = self.matter_test_config.user_params.get("th_server_app_path", None)

self.device_for_th_eco_kvs = f'kvs_{str(uuid.uuid4())}'
discriminator = random.randint(0, 4095)
discriminator = 3840
passcode = 20202021
app_args = f'--secured-device-port {self.device_for_th_eco_port} --discriminator {discriminator} --passcode {passcode} --KVS {self.device_for_th_eco_kvs}'
cmd = f'{app} {app_args}'
Expand Down

0 comments on commit 51a9ced

Please sign in to comment.