Skip to content

Commit 0581722

Browse files
Adding debugging msgs to fns related to test_subscripstion.
1 parent 2e13e10 commit 0581722

File tree

1 file changed

+15
-7
lines changed

1 file changed

+15
-7
lines changed

scripts/tests/run_tv_casting_test.py

+15-7
Original file line numberDiff line numberDiff line change
@@ -332,14 +332,19 @@ def parse_tv_casting_app_for_report_data_msg(tv_casting_app_info: Tuple[subproce
332332
report_data_message = []
333333

334334
start_wait_time = time.time()
335-
335+
print('SHAO before parsing for the `ReportDataMessage` block!')
336336
while True:
337337
# Check if we exceeded the maximum wait time to parse the Linux tv-casting-app output for `ReportDataMessage` block.
338338
if time.time() - start_wait_time > VERIFY_SUBSCRIPTION_STATE_MAX_WAIT_SEC:
339339
logging.error(
340340
'The relevant `ReportDataMessage` block was not found in the Linux tv-casting-app process within the timeout.')
341-
# report_data_message.clear() # SHAO OG
342-
report_data_message = [] # SHAO
341+
342+
logging.error('SHAO debugging when we hit timeout:')
343+
for report_data_msg_line in report_data_message:
344+
logging.error(report_data_msg_line)
345+
346+
report_data_message.clear() # SHAO OG
347+
# report_data_message = [] # SHAO
343348
return report_data_message
344349

345350
tv_casting_line = tv_casting_app_process.stdout.readline()
@@ -350,22 +355,24 @@ def parse_tv_casting_app_for_report_data_msg(tv_casting_app_info: Tuple[subproce
350355

351356
if 'ReportDataMessage =' in tv_casting_line:
352357
report_data_message.append(tv_casting_line.rstrip('\n'))
358+
logging.info(tv_casting_line.rstrip('\n')) # SHAO
353359
continue_parsing = True
354360
elif continue_parsing:
355361
report_data_message.append(tv_casting_line.rstrip('\n'))
362+
logging.info(tv_casting_line.rstrip('\n')) # SHAO
356363

357364
if 'Cluster =' in tv_casting_line:
358365
cluster_value = extract_value_from_string(tv_casting_line)
359366
if cluster_value != CLUSTER_MEDIA_PLAYBACK:
360-
# report_data_message.clear() # SHAO OG
361-
report_data_message = [] # SHAO
367+
report_data_message.clear() # SHAO OG
368+
# report_data_message = [] # SHAO
362369
continue_parsing = False
363370

364371
elif 'Attribute =' in tv_casting_line:
365372
attribute_value = extract_value_from_string(tv_casting_line)
366373
if attribute_value != ATTRIBUTE_CURRENT_PLAYBACK_STATE:
367-
# report_data_message.clear() # SHAO OG
368-
report_data_message = [] # SHAO
374+
report_data_message.clear() # SHAO OG
375+
# report_data_message = [] # SHAO
369376
continue_parsing = False
370377

371378
elif 'InteractionModelRevision' in tv_casting_line:
@@ -374,6 +381,7 @@ def parse_tv_casting_app_for_report_data_msg(tv_casting_app_info: Tuple[subproce
374381
linux_tv_casting_app_log_file.write(tv_casting_line)
375382
linux_tv_casting_app_log_file.flush()
376383
report_data_message.append(tv_casting_line.rstrip('\n'))
384+
logging.info(tv_casting_line.rstrip('\n')) # SHAO
377385
return report_data_message
378386

379387

0 commit comments

Comments
 (0)