Skip to content

Commit 1e6f531

Browse files
tehampsonshgutte
authored andcommitted
Fix Fabric Sync test script issues discovered on TH (project-chip#35283)
1 parent 9482af3 commit 1e6f531

File tree

3 files changed

+18
-9
lines changed

3 files changed

+18
-9
lines changed

src/python_testing/TC_CCTRL_2_2.py

+6-3
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,14 @@ async def setup_class(self):
5353
self.port = 5543
5454
discriminator = random.randint(0, 4095)
5555
passcode = 20202021
56-
app_args = f'--secured-device-port {self.port} --discriminator {discriminator} --passcode {passcode} --KVS {self.kvs}'
57-
cmd = f'{app} {app_args}'
56+
cmd = [app]
57+
cmd.extend(['--secured-device-port', str(5543)])
58+
cmd.extend(['--discriminator', str(discriminator)])
59+
cmd.extend(['--passcode', str(passcode)])
60+
cmd.extend(['--KVS', self.kvs])
5861
# TODO: Determine if we want these logs cooked or pushed to somewhere else
5962
logging.info("Starting TH_SERVER")
60-
self.app_process = subprocess.Popen(cmd, bufsize=0, shell=True)
63+
self.app_process = subprocess.Popen(cmd)
6164
logging.info("TH_SERVER started")
6265
time.sleep(3)
6366

src/python_testing/TC_CCTRL_2_3.py

+6-3
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,14 @@ async def setup_class(self):
5252
self.port = 5543
5353
discriminator = random.randint(0, 4095)
5454
passcode = 20202021
55-
app_args = f'--secured-device-port {self.port} --discriminator {discriminator} --passcode {passcode} --KVS {self.kvs}'
56-
cmd = f'{app} {app_args}'
55+
cmd = [app]
56+
cmd.extend(['--secured-device-port', str(5543)])
57+
cmd.extend(['--discriminator', str(discriminator)])
58+
cmd.extend(['--passcode', str(passcode)])
59+
cmd.extend(['--KVS', self.kvs])
5760
# TODO: Determine if we want these logs cooked or pushed to somewhere else
5861
logging.info("Starting TH_SERVER")
59-
self.app_process = subprocess.Popen(cmd, bufsize=0, shell=True)
62+
self.app_process = subprocess.Popen(cmd)
6063
logging.info("TH_SERVER started")
6164
time.sleep(3)
6265

src/python_testing/TC_MCORE_FS_1_1.py

+6-3
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,14 @@ async def setup_class(self):
4545
self.port = 5543
4646
discriminator = random.randint(0, 4095)
4747
passcode = 20202021
48-
app_args = f'--secured-device-port {self.port} --discriminator {discriminator} --passcode {passcode} --KVS {self.kvs}'
49-
cmd = f'{app} {app_args}'
48+
cmd = [app]
49+
cmd.extend(['--secured-device-port', str(5543)])
50+
cmd.extend(['--discriminator', str(discriminator)])
51+
cmd.extend(['--passcode', str(passcode)])
52+
cmd.extend(['--KVS', self.kvs])
5053
# TODO: Determine if we want these logs cooked or pushed to somewhere else
5154
logging.info("Starting application to acts mock a server portion of TH_FSA")
52-
self.app_process = subprocess.Popen(cmd, bufsize=0, shell=True)
55+
self.app_process = subprocess.Popen(cmd)
5356
logging.info("Started application to acts mock a server portion of TH_FSA")
5457
time.sleep(3)
5558

0 commit comments

Comments
 (0)