Skip to content

Commit 6de6291

Browse files
Implemented change to allow CI check to work for all platforms.
1 parent 85c818a commit 6de6291

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

scripts/tests/run_tv_casting_test.py

+6-7
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

1717
import logging
1818
import os
19-
import pdb
2019
import subprocess
2120
import sys
2221
import tempfile
@@ -187,14 +186,15 @@ def test_discovery_fn(tv_app_rel_path, tv_casting_app_rel_path):
187186
linux_tv_app_log_path = os.path.join(temp_dir, LINUX_TV_APP_LOGS)
188187
linux_tv_casting_app_log_path = os.path.join(temp_dir, LINUX_TV_CASTING_APP_LOGS)
189188

190-
print(temp_dir) # SHAO
191-
192189
# Open and write to the log file for the Linux tv-app.
193190
with LogFileManager(linux_tv_app_log_path, 'w') as linux_tv_app_log_file:
194191
tv_app_abs_path = os.path.abspath(tv_app_rel_path)
195192

196-
# Try to avoid any stdout buffering in our tests.
197-
cmd = ['stdbuf', '-o0', '-i0']
193+
if sys.platform == 'darwin' or sys.platform == 'linux':
194+
# Try to avoid any stdout buffering in our tests.
195+
cmd = ['stdbuf', '-o0', '-i0']
196+
else:
197+
cmd = []
198198

199199
# Run the Linux tv-app subprocess.
200200
with ProcessManager(cmd + [tv_app_abs_path], stdout=subprocess.PIPE, stderr=subprocess.PIPE) as tv_app_process:
@@ -293,7 +293,6 @@ def test_discovery_fn(tv_app_rel_path, tv_casting_app_rel_path):
293293
logging.info(valid_product_id)
294294
logging.info(valid_device_type)
295295
logging.info('Discovery success!')
296-
# pdb.set_trace() # SHAO
297296
return
298297

299298

@@ -303,4 +302,4 @@ def test_discovery_fn(tv_app_rel_path, tv_casting_app_rel_path):
303302
os.system('rm -f /tmp/chip_*')
304303

305304
# Test discovery between the Linux tv-casting-app and the tv-app.
306-
test_discovery_fn()
305+
test_discovery_fn()

0 commit comments

Comments
 (0)