11 from rtc_handle10_11
import *
12 from BasicDataType_idl
import *
20 g_test_name =
"<< component connection test >>" 27 env =
RtmEnv(sys.argv, [
"localhost:2809"])
28 list0 = env.name_space[
"localhost:2809"].list_obj()
29 env.name_space[
'localhost:2809'].rtc_handles.keys()
30 ns = env.name_space[
'localhost:2809']
32 g_compo_send = ns.rtc_handles[
"AutoTestOut0.rtc"]
33 g_compo_recv = ns.rtc_handles[
"AutoTestIn0.rtc"]
35 ec_send = g_compo_send.rtc_ref.get_owned_contexts()
36 ec_recv = g_compo_recv.rtc_ref.get_owned_contexts()
38 g_out_ports = g_compo_send.rtc_ref.get_ports()
39 g_in_ports = g_compo_recv.rtc_ref.get_ports()
49 g_interface_type1 =
"corba_cdr" 50 g_dataflow_type =
"push" 51 g_subscription_type =
"flush" 70 g_connector_id1 =
"001" 71 g_data_type1 =
"TimedFloat" 73 g_conprof1 = RTC.ConnectorProfile(g_name1, g_connector_id1, [g_out_ports[g_port1], g_in_ports[g_port1]], [SDOPackage.NameValue(
"dataport.data_type",any.to_any(g_data_type1)),SDOPackage.NameValue(
"dataport.interface_type",any.to_any(g_interface_type1)),SDOPackage.NameValue(
"dataport.dataflow_type",any.to_any(g_dataflow_type)),SDOPackage.NameValue(
"dataport.subscription_type",any.to_any(g_subscription_type)),SDOPackage.NameValue(
"dataport.publisher.push_policy",any.to_any(g_push_policy)),SDOPackage.NameValue(
"dataport.publisher.push_rate",any.to_any(g_push_rate)),SDOPackage.NameValue(
"dataport.publisher.skip_count",any.to_any(g_skip_count))])
77 g_connector_id2 =
"002" 78 g_data_type2 =
"TimedFloatSeq" 80 g_conprof2 = RTC.ConnectorProfile(g_name2, g_connector_id2, [g_out_ports[g_port2], g_in_ports[g_port2]], [SDOPackage.NameValue(
"dataport.data_type",any.to_any(g_data_type2)),SDOPackage.NameValue(
"dataport.interface_type",any.to_any(g_interface_type1)),SDOPackage.NameValue(
"dataport.dataflow_type",any.to_any(g_dataflow_type)),SDOPackage.NameValue(
"dataport.subscription_type",any.to_any(g_subscription_type)),SDOPackage.NameValue(
"dataport.publisher.push_policy",any.to_any(g_push_policy)),SDOPackage.NameValue(
"dataport.publisher.push_rate",any.to_any(g_push_rate)),SDOPackage.NameValue(
"dataport.publisher.skip_count",any.to_any(g_skip_count))])
84 g_connector_id3 =
"003" 85 g_interface_type3 =
"MyService" 87 g_conprof3 = RTC.ConnectorProfile(g_name3, g_connector_id3, [g_out_ports[g_port3], g_in_ports[g_port3]], [SDOPackage.NameValue(
"dataport.interface_type",any.to_any(g_interface_type3))])
91 g_diff_send_file =
"./original-data" 92 g_diff_recv_file =
"./received-data" 93 g_check_message = g_diff_recv_file +
" file not found." 94 g_test_result_file =
"./ResultTest.log" 98 g_test_ng =
"NG detected." 99 g_test_ng_message =
" < received-data >" 101 g_mess_footer =
" > " 115 global g_conprof1, g_conprof2, g_conprof3
117 if connect_direction == 0:
119 g_conprof1 = RTC.ConnectorProfile(g_name1, g_connector_id1, [g_out_ports[g_port1], g_in_ports[g_port1]], [SDOPackage.NameValue(
"dataport.data_type",any.to_any(g_data_type1)),SDOPackage.NameValue(
"dataport.interface_type",any.to_any(g_interface_type1)),SDOPackage.NameValue(
"dataport.dataflow_type",any.to_any(g_dataflow_type)),SDOPackage.NameValue(
"dataport.subscription_type",any.to_any(subscription_type)),SDOPackage.NameValue(
"dataport.publisher.push_policy",any.to_any(push_policy)),SDOPackage.NameValue(
"dataport.publisher.push_rate",any.to_any(g_push_rate)),SDOPackage.NameValue(
"dataport.publisher.skip_count",any.to_any(g_skip_count))])
121 g_conprof2 = RTC.ConnectorProfile(g_name2, g_connector_id2, [g_out_ports[g_port2], g_in_ports[g_port2]], [SDOPackage.NameValue(
"dataport.data_type",any.to_any(g_data_type2)),SDOPackage.NameValue(
"dataport.interface_type",any.to_any(g_interface_type1)),SDOPackage.NameValue(
"dataport.dataflow_type",any.to_any(g_dataflow_type)),SDOPackage.NameValue(
"dataport.subscription_type",any.to_any(subscription_type)),SDOPackage.NameValue(
"dataport.publisher.push_policy",any.to_any(push_policy)),SDOPackage.NameValue(
"dataport.publisher.push_rate",any.to_any(g_push_rate)),SDOPackage.NameValue(
"dataport.publisher.skip_count",any.to_any(g_skip_count))])
128 g_conprof1 = RTC.ConnectorProfile(g_name1, g_connector_id1, [g_in_ports[g_port1], g_out_ports[g_port1]], [SDOPackage.NameValue(
"dataport.data_type",any.to_any(g_data_type1)),SDOPackage.NameValue(
"dataport.interface_type",any.to_any(g_interface_type1)),SDOPackage.NameValue(
"dataport.dataflow_type",any.to_any(g_dataflow_type)),SDOPackage.NameValue(
"dataport.subscription_type",any.to_any(subscription_type)),SDOPackage.NameValue(
"dataport.publisher.push_policy",any.to_any(push_policy)),SDOPackage.NameValue(
"dataport.publisher.push_rate",any.to_any(g_push_rate)),SDOPackage.NameValue(
"dataport.publisher.skip_count",any.to_any(g_skip_count))])
130 g_conprof2 = RTC.ConnectorProfile(g_name2, g_connector_id2, [g_in_ports[g_port2], g_out_ports[g_port2]], [SDOPackage.NameValue(
"dataport.data_type",any.to_any(g_data_type2)),SDOPackage.NameValue(
"dataport.interface_type",any.to_any(g_interface_type1)),SDOPackage.NameValue(
"dataport.dataflow_type",any.to_any(g_dataflow_type)),SDOPackage.NameValue(
"dataport.subscription_type",any.to_any(subscription_type)),SDOPackage.NameValue(
"dataport.publisher.push_policy",any.to_any(push_policy)),SDOPackage.NameValue(
"dataport.publisher.push_rate",any.to_any(g_push_rate)),SDOPackage.NameValue(
"dataport.publisher.skip_count",any.to_any(g_skip_count))])
146 if os.path.isfile(g_diff_recv_file) ==
True:
147 os.remove(g_diff_recv_file)
164 if os.path.isfile(g_diff_send_file) ==
False:
165 print "send_file (%s) not found." % send_file
169 if os.path.isfile(g_diff_recv_file) ==
False:
170 print "recv_file (%s) not found." % recv_file
174 f_send = open(g_diff_send_file,
'r') 175 f_recv = open(g_diff_recv_file, 'r') 178 str_send = f_send.readline() 179 str_recv = f_recv.readline() 180 if len(str_send) == 0:
189 str_send2 = str_send.rstrip(
'\n')
190 str_send2 = str_send2.rstrip(
'\r')
191 str_recv2 = str_recv.rstrip(
'\n')
192 str_recv2 = str_recv2.rstrip(
'\r')
198 if str_send2 != str_recv2:
218 sleep_recv_act_time = 1
227 sleep_connect_time = 2
230 fout = open(g_test_result_file,
'w')
231 fout.write(g_test_name +
'\n')
240 case_no = case_no + 1
241 fout = open(g_test_result_file,
'a')
242 message = g_mess_header + g_test_case + str(case_no) +
" " 243 message = message +
"Connect(out->in, flush) -> Disconnect" 244 message = message + g_mess_footer
245 fout.write(message +
'\n')
249 for i
in range(loop_count):
256 ret0 = g_out_ports[g_port1].connect(g_conprof1)
259 ret1 = g_out_ports[g_port2].connect(g_conprof2)
262 ret2 = g_out_ports[g_port3].connect(g_conprof3)
264 time.sleep(sleep_connect_time)
267 g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
268 g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
269 g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
272 fout = open(g_test_result_file,
'a')
273 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
274 message = message + g_test_ok
276 fout.write(message +
'\n')
279 time.sleep(sleep_for_time)
284 case_no = case_no + 1
285 fout = open(g_test_result_file,
'a')
286 message = g_mess_header + g_test_case + str(case_no) +
" " 287 message = message +
"Connect(in->out, flush) -> Disconnect" 288 message = message + g_mess_footer
289 fout.write(message +
'\n')
293 for i
in range(loop_count):
300 ret0 = g_out_ports[g_port1].connect(g_conprof1)
303 ret1 = g_out_ports[g_port2].connect(g_conprof2)
306 ret2 = g_out_ports[g_port3].connect(g_conprof3)
308 time.sleep(sleep_connect_time)
311 g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
312 g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
313 g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
316 fout = open(g_test_result_file,
'a')
317 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
318 message = message + g_test_ok
320 fout.write(message +
'\n')
323 time.sleep(sleep_for_time)
328 case_no = case_no + 1
329 fout = open(g_test_result_file,
'a')
330 message = g_mess_header + g_test_case + str(case_no) +
" " 331 message = message +
"Connecting(out->in, flush), Activate -> send/recv -> Deactivate" 332 message = message + g_mess_footer
333 fout.write(message +
'\n')
342 ret0 = g_out_ports[g_port1].connect(g_conprof1)
345 ret1 = g_out_ports[g_port2].connect(g_conprof2)
348 ret2 = g_out_ports[g_port3].connect(g_conprof3)
350 for i
in range(loop_count):
356 ec_recv[0].activate_component(g_compo_recv.rtc_ref)
357 time.sleep(sleep_recv_act_time)
358 ec_send[0].activate_component(g_compo_send.rtc_ref)
360 time.sleep(sleep_act_time)
363 ec_send[0].deactivate_component(g_compo_send.rtc_ref)
364 ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
367 if os.path.isfile(g_diff_recv_file) ==
False:
368 fout = open(g_test_result_file,
'a')
369 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
370 message = message + g_check_message
371 fout.write(message +
'\n')
374 time.sleep(sleep_for_time)
378 time.sleep(sleep_act_time)
382 fout = open(g_test_result_file,
'a')
383 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
387 message = message + g_test_ok
389 fout.write(message +
'\n')
392 message = message + g_test_ng
394 message = message + g_test_ng_message
395 fout.write(message +
'\n')
397 fin2 = open(g_diff_recv_file,
'r') 406 time.sleep(sleep_for_time)
409 g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
410 g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
411 g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
416 case_no = case_no + 1
417 fout = open(g_test_result_file,
'a')
418 message = g_mess_header + g_test_case + str(case_no) +
" " 419 message = message +
"Connecting(in->out, flush), Activate -> send/recv -> Deactivate" 420 message = message + g_mess_footer
421 fout.write(message +
'\n')
430 ret0 = g_out_ports[g_port1].connect(g_conprof1)
433 ret1 = g_out_ports[g_port2].connect(g_conprof2)
436 ret2 = g_out_ports[g_port3].connect(g_conprof3)
438 for i
in range(loop_count):
444 ec_recv[0].activate_component(g_compo_recv.rtc_ref)
445 time.sleep(sleep_recv_act_time)
446 ec_send[0].activate_component(g_compo_send.rtc_ref)
448 time.sleep(sleep_act_time)
451 ec_send[0].deactivate_component(g_compo_send.rtc_ref)
452 ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
455 if os.path.isfile(g_diff_recv_file) ==
False:
456 fout = open(g_test_result_file,
'a')
457 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
458 message = message + g_check_message
459 fout.write(message +
'\n')
462 time.sleep(sleep_for_time)
466 time.sleep(sleep_act_time)
470 fout = open(g_test_result_file,
'a')
471 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
475 message = message + g_test_ok
477 fout.write(message +
'\n')
480 message = message + g_test_ng
482 message = message + g_test_ng_message
483 fout.write(message +
'\n')
485 fin2 = open(g_diff_recv_file,
'r') 494 time.sleep(sleep_for_time)
497 g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
498 g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
499 g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
504 case_no = case_no + 1
505 fout = open(g_test_result_file,
'a')
506 message = g_mess_header + g_test_case + str(case_no) +
" " 507 message = message +
"Not Connect(out->in, flush), Activate -> Deactivate" 508 message = message + g_mess_footer
509 fout.write(message +
'\n')
513 for i
in range(loop_count):
519 ec_recv[0].activate_component(g_compo_recv.rtc_ref)
520 time.sleep(sleep_recv_act_time)
521 ec_send[0].activate_component(g_compo_send.rtc_ref)
523 time.sleep(sleep_act_time)
526 ec_send[0].deactivate_component(g_compo_send.rtc_ref)
527 ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
530 fout = open(g_test_result_file,
'a')
531 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
532 message = message + g_test_ok
534 fout.write(message +
'\n')
537 time.sleep(sleep_for_time)
542 case_no = case_no + 1
543 fout = open(g_test_result_file,
'a')
544 message = g_mess_header + g_test_case + str(case_no) +
" " 545 message = message +
"Connect(out->in, flush) -> Activate -> send/recv -> Deactivate -> Disconnect" 546 message = message + g_mess_footer
547 fout.write(message +
'\n')
551 for i
in range(loop_count):
561 ret0 = g_out_ports[g_port1].connect(g_conprof1)
564 ret1 = g_out_ports[g_port2].connect(g_conprof2)
567 ret2 = g_out_ports[g_port3].connect(g_conprof3)
570 ec_recv[0].activate_component(g_compo_recv.rtc_ref)
571 time.sleep(sleep_recv_act_time)
572 ec_send[0].activate_component(g_compo_send.rtc_ref)
574 time.sleep(sleep_act_time)
577 ec_send[0].deactivate_component(g_compo_send.rtc_ref)
578 ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
581 g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
582 g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
583 g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
586 if os.path.isfile(g_diff_recv_file) ==
False:
587 fout = open(g_test_result_file,
'a')
588 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
589 message = message + g_check_message
590 fout.write(message +
'\n')
593 time.sleep(sleep_for_time)
597 time.sleep(sleep_act_time)
601 fout = open(g_test_result_file,
'a')
602 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
606 message = message + g_test_ok
608 fout.write(message +
'\n')
611 message = message + g_test_ng
613 message = message + g_test_ng_message
614 fout.write(message +
'\n')
616 fin2 = open(g_diff_recv_file,
'r') 625 time.sleep(sleep_for_time)
630 case_no = case_no + 1
631 fout = open(g_test_result_file,
'a')
632 message = g_mess_header + g_test_case + str(case_no) +
" " 633 message = message +
"Connect(in->out, flush) -> Activate -> send/recv -> Deactivate -> Disconnect" 634 message = message + g_mess_footer
635 fout.write(message +
'\n')
639 for i
in range(loop_count):
649 ret0 = g_out_ports[g_port1].connect(g_conprof1)
652 ret1 = g_out_ports[g_port2].connect(g_conprof2)
655 ret2 = g_out_ports[g_port3].connect(g_conprof3)
658 ec_recv[0].activate_component(g_compo_recv.rtc_ref)
659 time.sleep(sleep_recv_act_time)
660 ec_send[0].activate_component(g_compo_send.rtc_ref)
662 time.sleep(sleep_act_time)
665 ec_send[0].deactivate_component(g_compo_send.rtc_ref)
666 ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
669 g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
670 g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
671 g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
674 if os.path.isfile(g_diff_recv_file) ==
False:
675 fout = open(g_test_result_file,
'a')
676 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
677 message = message + g_check_message
678 fout.write(message +
'\n')
681 time.sleep(sleep_for_time)
685 time.sleep(sleep_act_time)
689 fout = open(g_test_result_file,
'a')
690 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
694 message = message + g_test_ok
696 fout.write(message +
'\n')
699 message = message + g_test_ng
701 message = message + g_test_ng_message
702 fout.write(message +
'\n')
704 fin2 = open(g_diff_recv_file,
'r') 713 time.sleep(sleep_for_time)
718 case_no = case_no + 1
719 fout = open(g_test_result_file,
'a')
720 message = g_mess_header + g_test_case + str(case_no) +
" " 721 message = message +
"Connect(out->in, flush) -> Activate -> send/recv -> Disconnect -> Deactivate" 722 message = message + g_mess_footer
723 fout.write(message +
'\n')
727 for i
in range(loop_count):
737 ret0 = g_out_ports[g_port1].connect(g_conprof1)
740 ret1 = g_out_ports[g_port2].connect(g_conprof2)
743 ret2 = g_out_ports[g_port3].connect(g_conprof3)
746 ec_recv[0].activate_component(g_compo_recv.rtc_ref)
747 time.sleep(sleep_recv_act_time)
748 ec_send[0].activate_component(g_compo_send.rtc_ref)
750 time.sleep(sleep_act_time)
753 g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
754 g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
755 g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
758 ec_send[0].deactivate_component(g_compo_send.rtc_ref)
759 ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
762 if os.path.isfile(g_diff_recv_file) ==
False:
763 fout = open(g_test_result_file,
'a')
764 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
765 message = message + g_check_message
766 fout.write(message +
'\n')
769 time.sleep(sleep_for_time)
773 time.sleep(sleep_act_time)
777 fout = open(g_test_result_file,
'a')
778 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
782 message = message + g_test_ok
784 fout.write(message +
'\n')
787 message = message + g_test_ng
789 message = message + g_test_ng_message
790 fout.write(message +
'\n')
792 fin2 = open(g_diff_recv_file,
'r') 801 time.sleep(sleep_for_time)
806 case_no = case_no + 1
807 fout = open(g_test_result_file,
'a')
808 message = g_mess_header + g_test_case + str(case_no) +
" " 809 message = message +
"Connect(in->out, flush) -> Activate -> send/recv -> Disconnect -> Deactivate" 810 message = message + g_mess_footer
811 fout.write(message +
'\n')
815 for i
in range(loop_count):
825 ret0 = g_out_ports[g_port1].connect(g_conprof1)
828 ret1 = g_out_ports[g_port2].connect(g_conprof2)
831 ret2 = g_out_ports[g_port3].connect(g_conprof3)
834 ec_recv[0].activate_component(g_compo_recv.rtc_ref)
835 time.sleep(sleep_recv_act_time)
836 ec_send[0].activate_component(g_compo_send.rtc_ref)
838 time.sleep(sleep_act_time)
841 g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
842 g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
843 g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
846 ec_send[0].deactivate_component(g_compo_send.rtc_ref)
847 ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
850 if os.path.isfile(g_diff_recv_file) ==
False:
851 fout = open(g_test_result_file,
'a')
852 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
853 message = message + g_check_message
854 fout.write(message +
'\n')
857 time.sleep(sleep_for_time)
861 time.sleep(sleep_act_time)
865 fout = open(g_test_result_file,
'a')
866 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
870 message = message + g_test_ok
872 fout.write(message +
'\n')
875 message = message + g_test_ng
877 message = message + g_test_ng_message
878 fout.write(message +
'\n')
880 fin2 = open(g_diff_recv_file,
'r') 889 time.sleep(sleep_for_time)
896 case_no = case_no + 1
897 fout = open(g_test_result_file,
'a')
898 message = g_mess_header + g_test_case + str(case_no) +
" " 899 message = message +
"Activate -> Connect(out->in, flush) -> send/recv -> Deactivate -> Disconnect" 900 message = message + g_mess_footer
901 fout.write(message +
'\n')
905 for i
in range(loop_count):
914 ec_recv[0].activate_component(g_compo_recv.rtc_ref)
915 time.sleep(sleep_recv_act_time)
916 ec_send[0].activate_component(g_compo_send.rtc_ref)
920 ret0 = g_out_ports[g_port1].connect(g_conprof1)
923 ret1 = g_out_ports[g_port2].connect(g_conprof2)
926 ret2 = g_out_ports[g_port3].connect(g_conprof3)
928 time.sleep(sleep_act_time)
931 ec_send[0].deactivate_component(g_compo_send.rtc_ref)
932 ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
935 g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
936 g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
937 g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
940 if os.path.isfile(g_diff_recv_file) ==
False:
941 fout = open(g_test_result_file,
'a')
942 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
943 message = message + g_check_message
944 fout.write(message +
'\n')
947 time.sleep(sleep_for_time)
951 time.sleep(sleep_act_time)
955 fout = open(g_test_result_file,
'a')
956 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
960 message = message + g_test_ok
962 fout.write(message +
'\n')
965 message = message + g_test_ng
967 message = message + g_test_ng_message
968 fout.write(message +
'\n')
970 fin2 = open(g_diff_recv_file,
'r') 979 time.sleep(sleep_for_time)
985 case_no = case_no + 1
986 fout = open(g_test_result_file,
'a')
987 message = g_mess_header + g_test_case + str(case_no) +
" " 988 message = message +
"Activate -> Connect(in->out, flush) -> send/recv -> Deactivate -> Disconnect" 989 message = message + g_mess_footer
990 fout.write(message +
'\n')
994 for i
in range(loop_count):
1003 ec_recv[0].activate_component(g_compo_recv.rtc_ref)
1004 time.sleep(sleep_recv_act_time)
1005 ec_send[0].activate_component(g_compo_send.rtc_ref)
1009 ret0 = g_out_ports[g_port1].connect(g_conprof1)
1012 ret1 = g_out_ports[g_port2].connect(g_conprof2)
1015 ret2 = g_out_ports[g_port3].connect(g_conprof3)
1017 time.sleep(sleep_act_time)
1020 ec_send[0].deactivate_component(g_compo_send.rtc_ref)
1021 ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
1024 g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
1025 g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
1026 g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
1029 if os.path.isfile(g_diff_recv_file) ==
False:
1030 fout = open(g_test_result_file,
'a')
1031 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
1032 message = message + g_check_message
1033 fout.write(message +
'\n')
1036 time.sleep(sleep_for_time)
1040 time.sleep(sleep_act_time)
1044 fout = open(g_test_result_file,
'a')
1045 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
1049 message = message + g_test_ok
1051 fout.write(message +
'\n')
1054 message = message + g_test_ng
1056 message = message + g_test_ng_message
1057 fout.write(message +
'\n')
1059 fin2 = open(g_diff_recv_file,
'r') 1061 s2 = fin2.readline() 1068 time.sleep(sleep_for_time)
1074 case_no = case_no + 1
1075 fout = open(g_test_result_file,
'a')
1076 message = g_mess_header + g_test_case + str(case_no) +
" " 1077 message = message +
"Activate -> Connect(out->in, flush) -> send/recv -> Disconnect -> Deactivate" 1078 message = message + g_mess_footer
1079 fout.write(message +
'\n')
1083 for i
in range(loop_count):
1092 ec_recv[0].activate_component(g_compo_recv.rtc_ref)
1093 time.sleep(sleep_recv_act_time)
1094 ec_send[0].activate_component(g_compo_send.rtc_ref)
1098 ret0 = g_out_ports[g_port1].connect(g_conprof1)
1101 ret1 = g_out_ports[g_port2].connect(g_conprof2)
1104 ret2 = g_out_ports[g_port3].connect(g_conprof3)
1106 time.sleep(sleep_act_time)
1109 g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
1110 g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
1111 g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
1114 ec_send[0].deactivate_component(g_compo_send.rtc_ref)
1115 ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
1118 if os.path.isfile(g_diff_recv_file) ==
False:
1119 fout = open(g_test_result_file,
'a')
1120 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
1121 message = message + g_check_message
1122 fout.write(message +
'\n')
1125 time.sleep(sleep_for_time)
1129 time.sleep(sleep_act_time)
1133 fout = open(g_test_result_file,
'a')
1134 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
1138 message = message + g_test_ok
1140 fout.write(message +
'\n')
1143 message = message + g_test_ng
1145 message = message + g_test_ng_message
1146 fout.write(message +
'\n')
1148 fin2 = open(g_diff_recv_file,
'r') 1150 s2 = fin2.readline() 1157 time.sleep(sleep_for_time)
1163 case_no = case_no + 1
1164 fout = open(g_test_result_file,
'a')
1165 message = g_mess_header + g_test_case + str(case_no) +
" " 1166 message = message +
"Activate -> Connect(in->out, flush) -> send/recv -> Disconnect -> Deactivate" 1167 message = message + g_mess_footer
1168 fout.write(message +
'\n')
1172 for i
in range(loop_count):
1181 ec_recv[0].activate_component(g_compo_recv.rtc_ref)
1182 time.sleep(sleep_recv_act_time)
1183 ec_send[0].activate_component(g_compo_send.rtc_ref)
1187 ret0 = g_out_ports[g_port1].connect(g_conprof1)
1190 ret1 = g_out_ports[g_port2].connect(g_conprof2)
1193 ret2 = g_out_ports[g_port3].connect(g_conprof3)
1195 time.sleep(sleep_act_time)
1198 g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
1199 g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
1200 g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
1203 ec_send[0].deactivate_component(g_compo_send.rtc_ref)
1204 ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
1207 if os.path.isfile(g_diff_recv_file) ==
False:
1208 fout = open(g_test_result_file,
'a')
1209 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
1210 message = message + g_check_message
1211 fout.write(message +
'\n')
1214 time.sleep(sleep_for_time)
1218 time.sleep(sleep_act_time)
1222 fout = open(g_test_result_file,
'a')
1223 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
1227 message = message + g_test_ok
1229 fout.write(message +
'\n')
1232 message = message + g_test_ng
1234 message = message + g_test_ng_message
1235 fout.write(message +
'\n')
1237 fin2 = open(g_diff_recv_file,
'r') 1239 s2 = fin2.readline() 1246 time.sleep(sleep_for_time)
1252 case_no = case_no + 1
1253 fout = open(g_test_result_file,
'a')
1254 message = g_mess_header + g_test_case + str(case_no) +
" " 1255 message = message +
"Connect(out->in, new,ALL) -> Disconnect" 1256 message = message + g_mess_footer
1257 fout.write(message +
'\n')
1261 for i
in range(loop_count):
1268 ret0 = g_out_ports[g_port1].connect(g_conprof1)
1271 ret1 = g_out_ports[g_port2].connect(g_conprof2)
1274 ret2 = g_out_ports[g_port3].connect(g_conprof3)
1276 time.sleep(sleep_connect_time)
1279 g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
1280 g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
1281 g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
1284 fout = open(g_test_result_file,
'a')
1285 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
1286 message = message + g_test_ok
1288 fout.write(message +
'\n')
1291 time.sleep(sleep_for_time)
1296 case_no = case_no + 1
1297 fout = open(g_test_result_file,
'a')
1298 message = g_mess_header + g_test_case + str(case_no) +
" " 1299 message = message +
"Connect(out->in, new,FIFO) -> Disconnect" 1300 message = message + g_mess_footer
1301 fout.write(message +
'\n')
1305 for i
in range(loop_count):
1312 ret0 = g_out_ports[g_port1].connect(g_conprof1)
1315 ret1 = g_out_ports[g_port2].connect(g_conprof2)
1318 ret2 = g_out_ports[g_port3].connect(g_conprof3)
1320 time.sleep(sleep_connect_time)
1323 g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
1324 g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
1325 g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
1328 fout = open(g_test_result_file,
'a')
1329 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
1330 message = message + g_test_ok
1332 fout.write(message +
'\n')
1335 time.sleep(sleep_for_time)
1340 case_no = case_no + 1
1341 fout = open(g_test_result_file,
'a')
1342 message = g_mess_header + g_test_case + str(case_no) +
" " 1343 message = message +
"Connect(out->in, new,NEW) -> Disconnect" 1344 message = message + g_mess_footer
1345 fout.write(message +
'\n')
1349 for i
in range(loop_count):
1356 ret0 = g_out_ports[g_port1].connect(g_conprof1)
1359 ret1 = g_out_ports[g_port2].connect(g_conprof2)
1362 ret2 = g_out_ports[g_port3].connect(g_conprof3)
1364 time.sleep(sleep_connect_time)
1367 g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
1368 g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
1369 g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
1372 fout = open(g_test_result_file,
'a')
1373 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
1374 message = message + g_test_ok
1376 fout.write(message +
'\n')
1379 time.sleep(sleep_for_time)
1384 case_no = case_no + 1
1385 fout = open(g_test_result_file,
'a')
1386 message = g_mess_header + g_test_case + str(case_no) +
" " 1387 message = message +
"Connect(out->in, new,SKIP) -> Disconnect" 1388 message = message + g_mess_footer
1389 fout.write(message +
'\n')
1393 for i
in range(loop_count):
1400 ret0 = g_out_ports[g_port1].connect(g_conprof1)
1403 ret1 = g_out_ports[g_port2].connect(g_conprof2)
1406 ret2 = g_out_ports[g_port3].connect(g_conprof3)
1408 time.sleep(sleep_connect_time)
1411 g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
1412 g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
1413 g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
1416 fout = open(g_test_result_file,
'a')
1417 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
1418 message = message + g_test_ok
1420 fout.write(message +
'\n')
1423 time.sleep(sleep_for_time)
1428 case_no = case_no + 1
1429 fout = open(g_test_result_file,
'a')
1430 message = g_mess_header + g_test_case + str(case_no) +
" " 1431 message = message +
"Connect(in->out, new,ALL) -> Disconnect" 1432 message = message + g_mess_footer
1433 fout.write(message +
'\n')
1437 for i
in range(loop_count):
1444 ret0 = g_out_ports[g_port1].connect(g_conprof1)
1447 ret1 = g_out_ports[g_port2].connect(g_conprof2)
1450 ret2 = g_out_ports[g_port3].connect(g_conprof3)
1452 time.sleep(sleep_connect_time)
1455 g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
1456 g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
1457 g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
1460 fout = open(g_test_result_file,
'a')
1461 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
1462 message = message + g_test_ok
1464 fout.write(message +
'\n')
1467 time.sleep(sleep_for_time)
1472 case_no = case_no + 1
1473 fout = open(g_test_result_file,
'a')
1474 message = g_mess_header + g_test_case + str(case_no) +
" " 1475 message = message +
"Connect(in->out, new,FIFO) -> Disconnect" 1476 message = message + g_mess_footer
1477 fout.write(message +
'\n')
1481 for i
in range(loop_count):
1488 ret0 = g_out_ports[g_port1].connect(g_conprof1)
1491 ret1 = g_out_ports[g_port2].connect(g_conprof2)
1494 ret2 = g_out_ports[g_port3].connect(g_conprof3)
1496 time.sleep(sleep_connect_time)
1499 g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
1500 g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
1501 g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
1504 fout = open(g_test_result_file,
'a')
1505 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
1506 message = message + g_test_ok
1508 fout.write(message +
'\n')
1511 time.sleep(sleep_for_time)
1516 case_no = case_no + 1
1517 fout = open(g_test_result_file,
'a')
1518 message = g_mess_header + g_test_case + str(case_no) +
" " 1519 message = message +
"Connect(in->out, new,NEW) -> Disconnect" 1520 message = message + g_mess_footer
1521 fout.write(message +
'\n')
1525 for i
in range(loop_count):
1532 ret0 = g_out_ports[g_port1].connect(g_conprof1)
1535 ret1 = g_out_ports[g_port2].connect(g_conprof2)
1538 ret2 = g_out_ports[g_port3].connect(g_conprof3)
1540 time.sleep(sleep_connect_time)
1543 g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
1544 g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
1545 g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
1548 fout = open(g_test_result_file,
'a')
1549 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
1550 message = message + g_test_ok
1552 fout.write(message +
'\n')
1555 time.sleep(sleep_for_time)
1560 case_no = case_no + 1
1561 fout = open(g_test_result_file,
'a')
1562 message = g_mess_header + g_test_case + str(case_no) +
" " 1563 message = message +
"Connect(in->out, new,SKIP) -> Disconnect" 1564 message = message + g_mess_footer
1565 fout.write(message +
'\n')
1569 for i
in range(loop_count):
1576 ret0 = g_out_ports[g_port1].connect(g_conprof1)
1579 ret1 = g_out_ports[g_port2].connect(g_conprof2)
1582 ret2 = g_out_ports[g_port3].connect(g_conprof3)
1584 time.sleep(sleep_connect_time)
1587 g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
1588 g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
1589 g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
1592 fout = open(g_test_result_file,
'a')
1593 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
1594 message = message + g_test_ok
1596 fout.write(message +
'\n')
1599 time.sleep(sleep_for_time)
1604 case_no = case_no + 1
1605 fout = open(g_test_result_file,
'a')
1606 message = g_mess_header + g_test_case + str(case_no) +
" " 1607 message = message +
"Connecting(out->in, new,ALL), Activate -> send/recv -> Deactivate" 1608 message = message + g_mess_footer
1609 fout.write(message +
'\n')
1618 ret0 = g_out_ports[g_port1].connect(g_conprof1)
1621 ret1 = g_out_ports[g_port2].connect(g_conprof2)
1624 ret2 = g_out_ports[g_port3].connect(g_conprof3)
1626 for i
in range(loop_count):
1632 ec_recv[0].activate_component(g_compo_recv.rtc_ref)
1633 time.sleep(sleep_recv_act_time)
1634 ec_send[0].activate_component(g_compo_send.rtc_ref)
1636 time.sleep(sleep_act_time)
1639 ec_send[0].deactivate_component(g_compo_send.rtc_ref)
1640 ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
1643 if os.path.isfile(g_diff_recv_file) ==
False:
1644 fout = open(g_test_result_file,
'a')
1645 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
1646 message = message + g_check_message
1647 fout.write(message +
'\n')
1650 time.sleep(sleep_for_time)
1654 time.sleep(sleep_act_time)
1658 fout = open(g_test_result_file,
'a')
1659 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
1663 message = message + g_test_ok
1665 fout.write(message +
'\n')
1668 message = message + g_test_ng
1670 message = message + g_test_ng_message
1671 fout.write(message +
'\n')
1673 fin2 = open(g_diff_recv_file,
'r') 1675 s2 = fin2.readline() 1682 time.sleep(sleep_for_time)
1685 g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
1686 g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
1687 g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
1692 case_no = case_no + 1
1693 fout = open(g_test_result_file,
'a')
1694 message = g_mess_header + g_test_case + str(case_no) +
" " 1695 message = message +
"Connecting(out->in, new,FIFO), Activate -> send/recv -> Deactivate" 1696 message = message + g_mess_footer
1697 fout.write(message +
'\n')
1706 ret0 = g_out_ports[g_port1].connect(g_conprof1)
1709 ret1 = g_out_ports[g_port2].connect(g_conprof2)
1712 ret2 = g_out_ports[g_port3].connect(g_conprof3)
1714 for i
in range(loop_count):
1720 ec_recv[0].activate_component(g_compo_recv.rtc_ref)
1721 time.sleep(sleep_recv_act_time)
1722 ec_send[0].activate_component(g_compo_send.rtc_ref)
1724 time.sleep(sleep_act_time)
1727 ec_send[0].deactivate_component(g_compo_send.rtc_ref)
1728 ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
1731 if os.path.isfile(g_diff_recv_file) ==
False:
1732 fout = open(g_test_result_file,
'a')
1733 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
1734 message = message + g_check_message
1735 fout.write(message +
'\n')
1738 time.sleep(sleep_for_time)
1742 time.sleep(sleep_act_time)
1746 fout = open(g_test_result_file,
'a')
1747 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
1751 message = message + g_test_ok
1753 fout.write(message +
'\n')
1756 message = message + g_test_ng
1758 message = message + g_test_ng_message
1759 fout.write(message +
'\n')
1761 fin2 = open(g_diff_recv_file,
'r') 1763 s2 = fin2.readline() 1770 time.sleep(sleep_for_time)
1773 g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
1774 g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
1775 g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
1780 case_no = case_no + 1
1781 fout = open(g_test_result_file,
'a')
1782 message = g_mess_header + g_test_case + str(case_no) +
" " 1783 message = message +
"Connecting(out->in, new,NEW), Activate -> send/recv -> Deactivate" 1784 message = message + g_mess_footer
1785 fout.write(message +
'\n')
1794 ret0 = g_out_ports[g_port1].connect(g_conprof1)
1797 ret1 = g_out_ports[g_port2].connect(g_conprof2)
1800 ret2 = g_out_ports[g_port3].connect(g_conprof3)
1802 for i
in range(loop_count):
1808 ec_recv[0].activate_component(g_compo_recv.rtc_ref)
1809 time.sleep(sleep_recv_act_time)
1810 ec_send[0].activate_component(g_compo_send.rtc_ref)
1812 time.sleep(sleep_act_time)
1815 ec_send[0].deactivate_component(g_compo_send.rtc_ref)
1816 ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
1819 if os.path.isfile(g_diff_recv_file) ==
False:
1820 fout = open(g_test_result_file,
'a')
1821 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
1822 message = message + g_check_message
1823 fout.write(message +
'\n')
1826 time.sleep(sleep_for_time)
1830 time.sleep(sleep_act_time)
1834 fout = open(g_test_result_file,
'a')
1835 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
1839 message = message + g_test_ok
1841 fout.write(message +
'\n')
1844 message = message + g_test_ng
1846 message = message + g_test_ng_message
1847 fout.write(message +
'\n')
1849 fin2 = open(g_diff_recv_file,
'r') 1851 s2 = fin2.readline() 1858 time.sleep(sleep_for_time)
1861 g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
1862 g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
1863 g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
1868 case_no = case_no + 1
1869 fout = open(g_test_result_file,
'a')
1870 message = g_mess_header + g_test_case + str(case_no) +
" " 1871 message = message +
"Connecting(out->in, new,SKIP), Activate -> send/recv -> Deactivate" 1872 message = message + g_mess_footer
1873 fout.write(message +
'\n')
1882 ret0 = g_out_ports[g_port1].connect(g_conprof1)
1885 ret1 = g_out_ports[g_port2].connect(g_conprof2)
1888 ret2 = g_out_ports[g_port3].connect(g_conprof3)
1890 for i
in range(loop_count):
1896 ec_recv[0].activate_component(g_compo_recv.rtc_ref)
1897 time.sleep(sleep_recv_act_time)
1898 ec_send[0].activate_component(g_compo_send.rtc_ref)
1900 time.sleep(sleep_act_time)
1903 ec_send[0].deactivate_component(g_compo_send.rtc_ref)
1904 ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
1907 if os.path.isfile(g_diff_recv_file) ==
False:
1908 fout = open(g_test_result_file,
'a')
1909 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
1910 message = message + g_check_message
1911 fout.write(message +
'\n')
1914 time.sleep(sleep_for_time)
1918 time.sleep(sleep_act_time)
1922 fout = open(g_test_result_file,
'a')
1923 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
1927 message = message + g_test_ok
1929 fout.write(message +
'\n')
1932 message = message + g_test_ng
1934 message = message + g_test_ng_message
1935 fout.write(message +
'\n')
1937 fin2 = open(g_diff_recv_file,
'r') 1939 s2 = fin2.readline() 1946 time.sleep(sleep_for_time)
1949 g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
1950 g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
1951 g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
1956 case_no = case_no + 1
1957 fout = open(g_test_result_file,
'a')
1958 message = g_mess_header + g_test_case + str(case_no) +
" " 1959 message = message +
"Connecting(in->out, new,ALL), Activate -> send/recv -> Deactivate" 1960 message = message + g_mess_footer
1961 fout.write(message +
'\n')
1970 ret0 = g_out_ports[g_port1].connect(g_conprof1)
1973 ret1 = g_out_ports[g_port2].connect(g_conprof2)
1976 ret2 = g_out_ports[g_port3].connect(g_conprof3)
1978 for i
in range(loop_count):
1984 ec_recv[0].activate_component(g_compo_recv.rtc_ref)
1985 time.sleep(sleep_recv_act_time)
1986 ec_send[0].activate_component(g_compo_send.rtc_ref)
1988 time.sleep(sleep_act_time)
1991 ec_send[0].deactivate_component(g_compo_send.rtc_ref)
1992 ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
1995 if os.path.isfile(g_diff_recv_file) ==
False:
1996 fout = open(g_test_result_file,
'a')
1997 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
1998 message = message + g_check_message
1999 fout.write(message +
'\n')
2002 time.sleep(sleep_for_time)
2006 time.sleep(sleep_act_time)
2010 fout = open(g_test_result_file,
'a')
2011 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
2015 message = message + g_test_ok
2017 fout.write(message +
'\n')
2020 message = message + g_test_ng
2022 message = message + g_test_ng_message
2023 fout.write(message +
'\n')
2025 fin2 = open(g_diff_recv_file,
'r') 2027 s2 = fin2.readline() 2034 time.sleep(sleep_for_time)
2037 g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
2038 g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
2039 g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
2044 case_no = case_no + 1
2045 fout = open(g_test_result_file,
'a')
2046 message = g_mess_header + g_test_case + str(case_no) +
" " 2047 message = message +
"Connecting(in->out, new,FIFO), Activate -> send/recv -> Deactivate" 2048 message = message + g_mess_footer
2049 fout.write(message +
'\n')
2058 ret0 = g_out_ports[g_port1].connect(g_conprof1)
2061 ret1 = g_out_ports[g_port2].connect(g_conprof2)
2064 ret2 = g_out_ports[g_port3].connect(g_conprof3)
2066 for i
in range(loop_count):
2072 ec_recv[0].activate_component(g_compo_recv.rtc_ref)
2073 time.sleep(sleep_recv_act_time)
2074 ec_send[0].activate_component(g_compo_send.rtc_ref)
2076 time.sleep(sleep_act_time)
2079 ec_send[0].deactivate_component(g_compo_send.rtc_ref)
2080 ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
2083 if os.path.isfile(g_diff_recv_file) ==
False:
2084 fout = open(g_test_result_file,
'a')
2085 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
2086 message = message + g_check_message
2087 fout.write(message +
'\n')
2090 time.sleep(sleep_for_time)
2094 time.sleep(sleep_act_time)
2098 fout = open(g_test_result_file,
'a')
2099 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
2103 message = message + g_test_ok
2105 fout.write(message +
'\n')
2108 message = message + g_test_ng
2110 message = message + g_test_ng_message
2111 fout.write(message +
'\n')
2113 fin2 = open(g_diff_recv_file,
'r') 2115 s2 = fin2.readline() 2122 time.sleep(sleep_for_time)
2125 g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
2126 g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
2127 g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
2132 case_no = case_no + 1
2133 fout = open(g_test_result_file,
'a')
2134 message = g_mess_header + g_test_case + str(case_no) +
" " 2135 message = message +
"Connecting(in->out, new,NEW), Activate -> send/recv -> Deactivate" 2136 message = message + g_mess_footer
2137 fout.write(message +
'\n')
2146 ret0 = g_out_ports[g_port1].connect(g_conprof1)
2149 ret1 = g_out_ports[g_port2].connect(g_conprof2)
2152 ret2 = g_out_ports[g_port3].connect(g_conprof3)
2154 for i
in range(loop_count):
2160 ec_recv[0].activate_component(g_compo_recv.rtc_ref)
2161 time.sleep(sleep_recv_act_time)
2162 ec_send[0].activate_component(g_compo_send.rtc_ref)
2164 time.sleep(sleep_act_time)
2167 ec_send[0].deactivate_component(g_compo_send.rtc_ref)
2168 ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
2171 if os.path.isfile(g_diff_recv_file) ==
False:
2172 fout = open(g_test_result_file,
'a')
2173 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
2174 message = message + g_check_message
2175 fout.write(message +
'\n')
2178 time.sleep(sleep_for_time)
2182 time.sleep(sleep_act_time)
2186 fout = open(g_test_result_file,
'a')
2187 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
2191 message = message + g_test_ok
2193 fout.write(message +
'\n')
2196 message = message + g_test_ng
2198 message = message + g_test_ng_message
2199 fout.write(message +
'\n')
2201 fin2 = open(g_diff_recv_file,
'r') 2203 s2 = fin2.readline() 2210 time.sleep(sleep_for_time)
2213 g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
2214 g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
2215 g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
2220 case_no = case_no + 1
2221 fout = open(g_test_result_file,
'a')
2222 message = g_mess_header + g_test_case + str(case_no) +
" " 2223 message = message +
"Connecting(in->out, new,SKIP), Activate -> send/recv -> Deactivate" 2224 message = message + g_mess_footer
2225 fout.write(message +
'\n')
2234 ret0 = g_out_ports[g_port1].connect(g_conprof1)
2237 ret1 = g_out_ports[g_port2].connect(g_conprof2)
2240 ret2 = g_out_ports[g_port3].connect(g_conprof3)
2242 for i
in range(loop_count):
2248 ec_recv[0].activate_component(g_compo_recv.rtc_ref)
2249 time.sleep(sleep_recv_act_time)
2250 ec_send[0].activate_component(g_compo_send.rtc_ref)
2252 time.sleep(sleep_act_time)
2255 ec_send[0].deactivate_component(g_compo_send.rtc_ref)
2256 ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
2259 if os.path.isfile(g_diff_recv_file) ==
False:
2260 fout = open(g_test_result_file,
'a')
2261 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
2262 message = message + g_check_message
2263 fout.write(message +
'\n')
2266 time.sleep(sleep_for_time)
2270 time.sleep(sleep_act_time)
2274 fout = open(g_test_result_file,
'a')
2275 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
2279 message = message + g_test_ok
2281 fout.write(message +
'\n')
2284 message = message + g_test_ng
2286 message = message + g_test_ng_message
2287 fout.write(message +
'\n')
2289 fin2 = open(g_diff_recv_file,
'r') 2291 s2 = fin2.readline() 2298 time.sleep(sleep_for_time)
2301 g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
2302 g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
2303 g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
2308 case_no = case_no + 1
2309 fout = open(g_test_result_file,
'a')
2310 message = g_mess_header + g_test_case + str(case_no) +
" " 2311 message = message +
"Connect(out->in, new,ALL) -> Activate -> send/recv -> Deactivate -> Disconnect" 2312 message = message + g_mess_footer
2313 fout.write(message +
'\n')
2317 for i
in range(loop_count):
2327 ret0 = g_out_ports[g_port1].connect(g_conprof1)
2330 ret1 = g_out_ports[g_port2].connect(g_conprof2)
2333 ret2 = g_out_ports[g_port3].connect(g_conprof3)
2336 ec_recv[0].activate_component(g_compo_recv.rtc_ref)
2337 time.sleep(sleep_recv_act_time)
2338 ec_send[0].activate_component(g_compo_send.rtc_ref)
2340 time.sleep(sleep_act_time)
2343 ec_send[0].deactivate_component(g_compo_send.rtc_ref)
2344 ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
2347 g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
2348 g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
2349 g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
2352 if os.path.isfile(g_diff_recv_file) ==
False:
2353 fout = open(g_test_result_file,
'a')
2354 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
2355 message = message + g_check_message
2356 fout.write(message +
'\n')
2359 time.sleep(sleep_for_time)
2363 time.sleep(sleep_act_time)
2367 fout = open(g_test_result_file,
'a')
2368 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
2372 message = message + g_test_ok
2374 fout.write(message +
'\n')
2377 message = message + g_test_ng
2379 message = message + g_test_ng_message
2380 fout.write(message +
'\n')
2382 fin2 = open(g_diff_recv_file,
'r') 2384 s2 = fin2.readline() 2391 time.sleep(sleep_for_time)
2396 case_no = case_no + 1
2397 fout = open(g_test_result_file,
'a')
2398 message = g_mess_header + g_test_case + str(case_no) +
" " 2399 message = message +
"Connect(out->in, new,FIFO) -> Activate -> send/recv -> Deactivate -> Disconnect" 2400 message = message + g_mess_footer
2401 fout.write(message +
'\n')
2405 for i
in range(loop_count):
2415 ret0 = g_out_ports[g_port1].connect(g_conprof1)
2418 ret1 = g_out_ports[g_port2].connect(g_conprof2)
2421 ret2 = g_out_ports[g_port3].connect(g_conprof3)
2424 ec_recv[0].activate_component(g_compo_recv.rtc_ref)
2425 time.sleep(sleep_recv_act_time)
2426 ec_send[0].activate_component(g_compo_send.rtc_ref)
2428 time.sleep(sleep_act_time)
2431 ec_send[0].deactivate_component(g_compo_send.rtc_ref)
2432 ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
2435 g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
2436 g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
2437 g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
2440 if os.path.isfile(g_diff_recv_file) ==
False:
2441 fout = open(g_test_result_file,
'a')
2442 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
2443 message = message + g_check_message
2444 fout.write(message +
'\n')
2447 time.sleep(sleep_for_time)
2451 time.sleep(sleep_act_time)
2455 fout = open(g_test_result_file,
'a')
2456 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
2460 message = message + g_test_ok
2462 fout.write(message +
'\n')
2465 message = message + g_test_ng
2467 message = message + g_test_ng_message
2468 fout.write(message +
'\n')
2470 fin2 = open(g_diff_recv_file,
'r') 2472 s2 = fin2.readline() 2479 time.sleep(sleep_for_time)
2484 case_no = case_no + 1
2485 fout = open(g_test_result_file,
'a')
2486 message = g_mess_header + g_test_case + str(case_no) +
" " 2487 message = message +
"Connect(out->in, new,NEW) -> Activate -> send/recv -> Deactivate -> Disconnect" 2488 message = message + g_mess_footer
2489 fout.write(message +
'\n')
2493 for i
in range(loop_count):
2503 ret0 = g_out_ports[g_port1].connect(g_conprof1)
2506 ret1 = g_out_ports[g_port2].connect(g_conprof2)
2509 ret2 = g_out_ports[g_port3].connect(g_conprof3)
2512 ec_recv[0].activate_component(g_compo_recv.rtc_ref)
2513 time.sleep(sleep_recv_act_time)
2514 ec_send[0].activate_component(g_compo_send.rtc_ref)
2516 time.sleep(sleep_act_time)
2519 ec_send[0].deactivate_component(g_compo_send.rtc_ref)
2520 ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
2523 g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
2524 g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
2525 g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
2528 if os.path.isfile(g_diff_recv_file) ==
False:
2529 fout = open(g_test_result_file,
'a')
2530 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
2531 message = message + g_check_message
2532 fout.write(message +
'\n')
2535 time.sleep(sleep_for_time)
2539 time.sleep(sleep_act_time)
2543 fout = open(g_test_result_file,
'a')
2544 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
2548 message = message + g_test_ok
2550 fout.write(message +
'\n')
2553 message = message + g_test_ng
2555 message = message + g_test_ng_message
2556 fout.write(message +
'\n')
2558 fin2 = open(g_diff_recv_file,
'r') 2560 s2 = fin2.readline() 2567 time.sleep(sleep_for_time)
2572 case_no = case_no + 1
2573 fout = open(g_test_result_file,
'a')
2574 message = g_mess_header + g_test_case + str(case_no) +
" " 2575 message = message +
"Connect(out->in, new,SKIP) -> Activate -> send/recv -> Deactivate -> Disconnect" 2576 message = message + g_mess_footer
2577 fout.write(message +
'\n')
2581 for i
in range(loop_count):
2591 ret0 = g_out_ports[g_port1].connect(g_conprof1)
2594 ret1 = g_out_ports[g_port2].connect(g_conprof2)
2597 ret2 = g_out_ports[g_port3].connect(g_conprof3)
2600 ec_recv[0].activate_component(g_compo_recv.rtc_ref)
2601 time.sleep(sleep_recv_act_time)
2602 ec_send[0].activate_component(g_compo_send.rtc_ref)
2604 time.sleep(sleep_act_time)
2607 ec_send[0].deactivate_component(g_compo_send.rtc_ref)
2608 ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
2611 g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
2612 g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
2613 g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
2616 if os.path.isfile(g_diff_recv_file) ==
False:
2617 fout = open(g_test_result_file,
'a')
2618 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
2619 message = message + g_check_message
2620 fout.write(message +
'\n')
2623 time.sleep(sleep_for_time)
2627 time.sleep(sleep_act_time)
2631 fout = open(g_test_result_file,
'a')
2632 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
2636 message = message + g_test_ok
2638 fout.write(message +
'\n')
2641 message = message + g_test_ng
2643 message = message + g_test_ng_message
2644 fout.write(message +
'\n')
2646 fin2 = open(g_diff_recv_file,
'r') 2648 s2 = fin2.readline() 2655 time.sleep(sleep_for_time)
2660 case_no = case_no + 1
2661 fout = open(g_test_result_file,
'a')
2662 message = g_mess_header + g_test_case + str(case_no) +
" " 2663 message = message +
"Connect(in->out, new,ALL) -> Activate -> send/recv -> Deactivate -> Disconnect" 2664 message = message + g_mess_footer
2665 fout.write(message +
'\n')
2669 for i
in range(loop_count):
2679 ret0 = g_out_ports[g_port1].connect(g_conprof1)
2682 ret1 = g_out_ports[g_port2].connect(g_conprof2)
2685 ret2 = g_out_ports[g_port3].connect(g_conprof3)
2688 ec_recv[0].activate_component(g_compo_recv.rtc_ref)
2689 time.sleep(sleep_recv_act_time)
2690 ec_send[0].activate_component(g_compo_send.rtc_ref)
2692 time.sleep(sleep_act_time)
2695 ec_send[0].deactivate_component(g_compo_send.rtc_ref)
2696 ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
2699 g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
2700 g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
2701 g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
2704 if os.path.isfile(g_diff_recv_file) ==
False:
2705 fout = open(g_test_result_file,
'a')
2706 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
2707 message = message + g_check_message
2708 fout.write(message +
'\n')
2711 time.sleep(sleep_for_time)
2715 time.sleep(sleep_act_time)
2719 fout = open(g_test_result_file,
'a')
2720 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
2724 message = message + g_test_ok
2726 fout.write(message +
'\n')
2729 message = message + g_test_ng
2731 message = message + g_test_ng_message
2732 fout.write(message +
'\n')
2734 fin2 = open(g_diff_recv_file,
'r') 2736 s2 = fin2.readline() 2743 time.sleep(sleep_for_time)
2748 case_no = case_no + 1
2749 fout = open(g_test_result_file,
'a')
2750 message = g_mess_header + g_test_case + str(case_no) +
" " 2751 message = message +
"Connect(in->out, new,FIFO) -> Activate -> send/recv -> Deactivate -> Disconnect" 2752 message = message + g_mess_footer
2753 fout.write(message +
'\n')
2757 for i
in range(loop_count):
2767 ret0 = g_out_ports[g_port1].connect(g_conprof1)
2770 ret1 = g_out_ports[g_port2].connect(g_conprof2)
2773 ret2 = g_out_ports[g_port3].connect(g_conprof3)
2776 ec_recv[0].activate_component(g_compo_recv.rtc_ref)
2777 time.sleep(sleep_recv_act_time)
2778 ec_send[0].activate_component(g_compo_send.rtc_ref)
2780 time.sleep(sleep_act_time)
2783 ec_send[0].deactivate_component(g_compo_send.rtc_ref)
2784 ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
2787 g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
2788 g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
2789 g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
2792 if os.path.isfile(g_diff_recv_file) ==
False:
2793 fout = open(g_test_result_file,
'a')
2794 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
2795 message = message + g_check_message
2796 fout.write(message +
'\n')
2799 time.sleep(sleep_for_time)
2803 time.sleep(sleep_act_time)
2807 fout = open(g_test_result_file,
'a')
2808 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
2812 message = message + g_test_ok
2814 fout.write(message +
'\n')
2817 message = message + g_test_ng
2819 message = message + g_test_ng_message
2820 fout.write(message +
'\n')
2822 fin2 = open(g_diff_recv_file,
'r') 2824 s2 = fin2.readline() 2831 time.sleep(sleep_for_time)
2836 case_no = case_no + 1
2837 fout = open(g_test_result_file,
'a')
2838 message = g_mess_header + g_test_case + str(case_no) +
" " 2839 message = message +
"Connect(in->out, new,NEW) -> Activate -> send/recv -> Deactivate -> Disconnect" 2840 message = message + g_mess_footer
2841 fout.write(message +
'\n')
2845 for i
in range(loop_count):
2855 ret0 = g_out_ports[g_port1].connect(g_conprof1)
2858 ret1 = g_out_ports[g_port2].connect(g_conprof2)
2861 ret2 = g_out_ports[g_port3].connect(g_conprof3)
2864 ec_recv[0].activate_component(g_compo_recv.rtc_ref)
2865 time.sleep(sleep_recv_act_time)
2866 ec_send[0].activate_component(g_compo_send.rtc_ref)
2868 time.sleep(sleep_act_time)
2871 ec_send[0].deactivate_component(g_compo_send.rtc_ref)
2872 ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
2875 g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
2876 g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
2877 g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
2880 if os.path.isfile(g_diff_recv_file) ==
False:
2881 fout = open(g_test_result_file,
'a')
2882 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
2883 message = message + g_check_message
2884 fout.write(message +
'\n')
2887 time.sleep(sleep_for_time)
2891 time.sleep(sleep_act_time)
2895 fout = open(g_test_result_file,
'a')
2896 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
2900 message = message + g_test_ok
2902 fout.write(message +
'\n')
2905 message = message + g_test_ng
2907 message = message + g_test_ng_message
2908 fout.write(message +
'\n')
2910 fin2 = open(g_diff_recv_file,
'r') 2912 s2 = fin2.readline() 2919 time.sleep(sleep_for_time)
2924 case_no = case_no + 1
2925 fout = open(g_test_result_file,
'a')
2926 message = g_mess_header + g_test_case + str(case_no) +
" " 2927 message = message +
"Connect(in->out, new,SKIP) -> Activate -> send/recv -> Deactivate -> Disconnect" 2928 message = message + g_mess_footer
2929 fout.write(message +
'\n')
2933 for i
in range(loop_count):
2943 ret0 = g_out_ports[g_port1].connect(g_conprof1)
2946 ret1 = g_out_ports[g_port2].connect(g_conprof2)
2949 ret2 = g_out_ports[g_port3].connect(g_conprof3)
2952 ec_recv[0].activate_component(g_compo_recv.rtc_ref)
2953 time.sleep(sleep_recv_act_time)
2954 ec_send[0].activate_component(g_compo_send.rtc_ref)
2956 time.sleep(sleep_act_time)
2959 ec_send[0].deactivate_component(g_compo_send.rtc_ref)
2960 ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
2963 g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
2964 g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
2965 g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
2968 if os.path.isfile(g_diff_recv_file) ==
False:
2969 fout = open(g_test_result_file,
'a')
2970 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
2971 message = message + g_check_message
2972 fout.write(message +
'\n')
2975 time.sleep(sleep_for_time)
2979 time.sleep(sleep_act_time)
2983 fout = open(g_test_result_file,
'a')
2984 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
2988 message = message + g_test_ok
2990 fout.write(message +
'\n')
2993 message = message + g_test_ng
2995 message = message + g_test_ng_message
2996 fout.write(message +
'\n')
2998 fin2 = open(g_diff_recv_file,
'r') 3000 s2 = fin2.readline() 3007 time.sleep(sleep_for_time)
3013 case_no = case_no + 1
3014 fout = open(g_test_result_file,
'a')
3015 message = g_mess_header + g_test_case + str(case_no) +
" " 3016 message = message +
"Connect(out->in, periodic,ALL) -> Disconnect" 3017 message = message + g_mess_footer
3018 fout.write(message +
'\n')
3022 for i
in range(loop_count):
3029 ret0 = g_out_ports[g_port1].connect(g_conprof1)
3032 ret1 = g_out_ports[g_port2].connect(g_conprof2)
3035 ret2 = g_out_ports[g_port3].connect(g_conprof3)
3037 time.sleep(sleep_connect_time)
3040 g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
3041 g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
3042 g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
3045 fout = open(g_test_result_file,
'a')
3046 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
3047 message = message + g_test_ok
3049 fout.write(message +
'\n')
3052 time.sleep(sleep_for_time)
3057 case_no = case_no + 1
3058 fout = open(g_test_result_file,
'a')
3059 message = g_mess_header + g_test_case + str(case_no) +
" " 3060 message = message +
"Connect(out->in, periodic,FIFO) -> Disconnect" 3061 message = message + g_mess_footer
3062 fout.write(message +
'\n')
3066 for i
in range(loop_count):
3073 ret0 = g_out_ports[g_port1].connect(g_conprof1)
3076 ret1 = g_out_ports[g_port2].connect(g_conprof2)
3079 ret2 = g_out_ports[g_port3].connect(g_conprof3)
3081 time.sleep(sleep_connect_time)
3084 g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
3085 g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
3086 g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
3089 fout = open(g_test_result_file,
'a')
3090 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
3091 message = message + g_test_ok
3093 fout.write(message +
'\n')
3096 time.sleep(sleep_for_time)
3101 case_no = case_no + 1
3102 fout = open(g_test_result_file,
'a')
3103 message = g_mess_header + g_test_case + str(case_no) +
" " 3104 message = message +
"Connect(out->in, periodic,NEW) -> Disconnect" 3105 message = message + g_mess_footer
3106 fout.write(message +
'\n')
3110 for i
in range(loop_count):
3117 ret0 = g_out_ports[g_port1].connect(g_conprof1)
3120 ret1 = g_out_ports[g_port2].connect(g_conprof2)
3123 ret2 = g_out_ports[g_port3].connect(g_conprof3)
3125 time.sleep(sleep_connect_time)
3128 g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
3129 g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
3130 g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
3133 fout = open(g_test_result_file,
'a')
3134 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
3135 message = message + g_test_ok
3137 fout.write(message +
'\n')
3140 time.sleep(sleep_for_time)
3145 case_no = case_no + 1
3146 fout = open(g_test_result_file,
'a')
3147 message = g_mess_header + g_test_case + str(case_no) +
" " 3148 message = message +
"Connect(out->in, periodic,SKIP) -> Disconnect" 3149 message = message + g_mess_footer
3150 fout.write(message +
'\n')
3154 for i
in range(loop_count):
3161 ret0 = g_out_ports[g_port1].connect(g_conprof1)
3164 ret1 = g_out_ports[g_port2].connect(g_conprof2)
3167 ret2 = g_out_ports[g_port3].connect(g_conprof3)
3169 time.sleep(sleep_connect_time)
3172 g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
3173 g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
3174 g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
3177 fout = open(g_test_result_file,
'a')
3178 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
3179 message = message + g_test_ok
3181 fout.write(message +
'\n')
3184 time.sleep(sleep_for_time)
3189 case_no = case_no + 1
3190 fout = open(g_test_result_file,
'a')
3191 message = g_mess_header + g_test_case + str(case_no) +
" " 3192 message = message +
"Connect(in->out, periodic,ALL) -> Disconnect" 3193 message = message + g_mess_footer
3194 fout.write(message +
'\n')
3198 for i
in range(loop_count):
3205 ret0 = g_out_ports[g_port1].connect(g_conprof1)
3208 ret1 = g_out_ports[g_port2].connect(g_conprof2)
3211 ret2 = g_out_ports[g_port3].connect(g_conprof3)
3213 time.sleep(sleep_connect_time)
3216 g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
3217 g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
3218 g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
3221 fout = open(g_test_result_file,
'a')
3222 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
3223 message = message + g_test_ok
3225 fout.write(message +
'\n')
3228 time.sleep(sleep_for_time)
3233 case_no = case_no + 1
3234 fout = open(g_test_result_file,
'a')
3235 message = g_mess_header + g_test_case + str(case_no) +
" " 3236 message = message +
"Connect(in->out, periodic,FIFO) -> Disconnect" 3237 message = message + g_mess_footer
3238 fout.write(message +
'\n')
3242 for i
in range(loop_count):
3249 ret0 = g_out_ports[g_port1].connect(g_conprof1)
3252 ret1 = g_out_ports[g_port2].connect(g_conprof2)
3255 ret2 = g_out_ports[g_port3].connect(g_conprof3)
3257 time.sleep(sleep_connect_time)
3260 g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
3261 g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
3262 g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
3265 fout = open(g_test_result_file,
'a')
3266 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
3267 message = message + g_test_ok
3269 fout.write(message +
'\n')
3272 time.sleep(sleep_for_time)
3277 case_no = case_no + 1
3278 fout = open(g_test_result_file,
'a')
3279 message = g_mess_header + g_test_case + str(case_no) +
" " 3280 message = message +
"Connect(in->out, periodic,NEW) -> Disconnect" 3281 message = message + g_mess_footer
3282 fout.write(message +
'\n')
3286 for i
in range(loop_count):
3293 ret0 = g_out_ports[g_port1].connect(g_conprof1)
3296 ret1 = g_out_ports[g_port2].connect(g_conprof2)
3299 ret2 = g_out_ports[g_port3].connect(g_conprof3)
3301 time.sleep(sleep_connect_time)
3304 g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
3305 g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
3306 g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
3309 fout = open(g_test_result_file,
'a')
3310 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
3311 message = message + g_test_ok
3313 fout.write(message +
'\n')
3316 time.sleep(sleep_for_time)
3321 case_no = case_no + 1
3322 fout = open(g_test_result_file,
'a')
3323 message = g_mess_header + g_test_case + str(case_no) +
" " 3324 message = message +
"Connect(in->out, periodic,SKIP) -> Disconnect" 3325 message = message + g_mess_footer
3326 fout.write(message +
'\n')
3330 for i
in range(loop_count):
3337 ret0 = g_out_ports[g_port1].connect(g_conprof1)
3340 ret1 = g_out_ports[g_port2].connect(g_conprof2)
3343 ret2 = g_out_ports[g_port3].connect(g_conprof3)
3345 time.sleep(sleep_connect_time)
3348 g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
3349 g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
3350 g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
3353 fout = open(g_test_result_file,
'a')
3354 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
3355 message = message + g_test_ok
3357 fout.write(message +
'\n')
3360 time.sleep(sleep_for_time)
3365 case_no = case_no + 1
3366 fout = open(g_test_result_file,
'a')
3367 message = g_mess_header + g_test_case + str(case_no) +
" " 3368 message = message +
"Connecting(out->in, periodic,ALL), Activate -> send/recv -> Deactivate" 3369 message = message + g_mess_footer
3370 fout.write(message +
'\n')
3379 ret0 = g_out_ports[g_port1].connect(g_conprof1)
3382 ret1 = g_out_ports[g_port2].connect(g_conprof2)
3385 ret2 = g_out_ports[g_port3].connect(g_conprof3)
3387 for i
in range(loop_count):
3393 ec_recv[0].activate_component(g_compo_recv.rtc_ref)
3394 time.sleep(sleep_recv_act_time)
3395 ec_send[0].activate_component(g_compo_send.rtc_ref)
3397 time.sleep(sleep_act_time)
3400 ec_send[0].deactivate_component(g_compo_send.rtc_ref)
3401 ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
3404 if os.path.isfile(g_diff_recv_file) ==
False:
3405 fout = open(g_test_result_file,
'a')
3406 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
3407 message = message + g_check_message
3408 fout.write(message +
'\n')
3411 time.sleep(sleep_for_time)
3415 time.sleep(sleep_act_time)
3419 fout = open(g_test_result_file,
'a')
3420 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
3424 message = message + g_test_ok
3426 fout.write(message +
'\n')
3429 message = message + g_test_ng
3431 message = message + g_test_ng_message
3432 fout.write(message +
'\n')
3434 fin2 = open(g_diff_recv_file,
'r') 3436 s2 = fin2.readline() 3443 time.sleep(sleep_for_time)
3446 g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
3447 g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
3448 g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
3453 case_no = case_no + 1
3454 fout = open(g_test_result_file,
'a')
3455 message = g_mess_header + g_test_case + str(case_no) +
" " 3456 message = message +
"Connecting(out->in, periodic,FIFO), Activate -> send/recv -> Deactivate" 3457 message = message + g_mess_footer
3458 fout.write(message +
'\n')
3467 ret0 = g_out_ports[g_port1].connect(g_conprof1)
3470 ret1 = g_out_ports[g_port2].connect(g_conprof2)
3473 ret2 = g_out_ports[g_port3].connect(g_conprof3)
3475 for i
in range(loop_count):
3481 ec_recv[0].activate_component(g_compo_recv.rtc_ref)
3482 time.sleep(sleep_recv_act_time)
3483 ec_send[0].activate_component(g_compo_send.rtc_ref)
3485 time.sleep(sleep_act_time)
3488 ec_send[0].deactivate_component(g_compo_send.rtc_ref)
3489 ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
3492 if os.path.isfile(g_diff_recv_file) ==
False:
3493 fout = open(g_test_result_file,
'a')
3494 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
3495 message = message + g_check_message
3496 fout.write(message +
'\n')
3499 time.sleep(sleep_for_time)
3503 time.sleep(sleep_act_time)
3507 fout = open(g_test_result_file,
'a')
3508 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
3512 message = message + g_test_ok
3514 fout.write(message +
'\n')
3517 message = message + g_test_ng
3519 message = message + g_test_ng_message
3520 fout.write(message +
'\n')
3522 fin2 = open(g_diff_recv_file,
'r') 3524 s2 = fin2.readline() 3531 time.sleep(sleep_for_time)
3534 g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
3535 g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
3536 g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
3541 case_no = case_no + 1
3542 fout = open(g_test_result_file,
'a')
3543 message = g_mess_header + g_test_case + str(case_no) +
" " 3544 message = message +
"Connecting(out->in, periodic,NEW), Activate -> send/recv -> Deactivate" 3545 message = message + g_mess_footer
3546 fout.write(message +
'\n')
3555 ret0 = g_out_ports[g_port1].connect(g_conprof1)
3558 ret1 = g_out_ports[g_port2].connect(g_conprof2)
3561 ret2 = g_out_ports[g_port3].connect(g_conprof3)
3563 for i
in range(loop_count):
3569 ec_recv[0].activate_component(g_compo_recv.rtc_ref)
3570 time.sleep(sleep_recv_act_time)
3571 ec_send[0].activate_component(g_compo_send.rtc_ref)
3573 time.sleep(sleep_act_time)
3576 ec_send[0].deactivate_component(g_compo_send.rtc_ref)
3577 ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
3580 if os.path.isfile(g_diff_recv_file) ==
False:
3581 fout = open(g_test_result_file,
'a')
3582 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
3583 message = message + g_check_message
3584 fout.write(message +
'\n')
3587 time.sleep(sleep_for_time)
3591 time.sleep(sleep_act_time)
3595 fout = open(g_test_result_file,
'a')
3596 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
3600 message = message + g_test_ok
3602 fout.write(message +
'\n')
3605 message = message + g_test_ng
3607 message = message + g_test_ng_message
3608 fout.write(message +
'\n')
3610 fin2 = open(g_diff_recv_file,
'r') 3612 s2 = fin2.readline() 3619 time.sleep(sleep_for_time)
3622 g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
3623 g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
3624 g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
3629 case_no = case_no + 1
3630 fout = open(g_test_result_file,
'a')
3631 message = g_mess_header + g_test_case + str(case_no) +
" " 3632 message = message +
"Connecting(out->in, periodic,SKIP), Activate -> send/recv -> Deactivate" 3633 message = message + g_mess_footer
3634 fout.write(message +
'\n')
3643 ret0 = g_out_ports[g_port1].connect(g_conprof1)
3646 ret1 = g_out_ports[g_port2].connect(g_conprof2)
3649 ret2 = g_out_ports[g_port3].connect(g_conprof3)
3651 for i
in range(loop_count):
3657 ec_recv[0].activate_component(g_compo_recv.rtc_ref)
3658 time.sleep(sleep_recv_act_time)
3659 ec_send[0].activate_component(g_compo_send.rtc_ref)
3661 time.sleep(sleep_act_time)
3664 ec_send[0].deactivate_component(g_compo_send.rtc_ref)
3665 ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
3668 if os.path.isfile(g_diff_recv_file) ==
False:
3669 fout = open(g_test_result_file,
'a')
3670 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
3671 message = message + g_check_message
3672 fout.write(message +
'\n')
3675 time.sleep(sleep_for_time)
3679 time.sleep(sleep_act_time)
3683 fout = open(g_test_result_file,
'a')
3684 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
3688 message = message + g_test_ok
3690 fout.write(message +
'\n')
3693 message = message + g_test_ng
3695 message = message + g_test_ng_message
3696 fout.write(message +
'\n')
3698 fin2 = open(g_diff_recv_file,
'r') 3700 s2 = fin2.readline() 3707 time.sleep(sleep_for_time)
3710 g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
3711 g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
3712 g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
3717 case_no = case_no + 1
3718 fout = open(g_test_result_file,
'a')
3719 message = g_mess_header + g_test_case + str(case_no) +
" " 3720 message = message +
"Connecting(in->out, periodic,ALL), Activate -> send/recv -> Deactivate" 3721 message = message + g_mess_footer
3722 fout.write(message +
'\n')
3731 ret0 = g_out_ports[g_port1].connect(g_conprof1)
3734 ret1 = g_out_ports[g_port2].connect(g_conprof2)
3737 ret2 = g_out_ports[g_port3].connect(g_conprof3)
3739 for i
in range(loop_count):
3745 ec_recv[0].activate_component(g_compo_recv.rtc_ref)
3746 time.sleep(sleep_recv_act_time)
3747 ec_send[0].activate_component(g_compo_send.rtc_ref)
3749 time.sleep(sleep_act_time)
3752 ec_send[0].deactivate_component(g_compo_send.rtc_ref)
3753 ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
3756 if os.path.isfile(g_diff_recv_file) ==
False:
3757 fout = open(g_test_result_file,
'a')
3758 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
3759 message = message + g_check_message
3760 fout.write(message +
'\n')
3763 time.sleep(sleep_for_time)
3767 time.sleep(sleep_act_time)
3771 fout = open(g_test_result_file,
'a')
3772 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
3776 message = message + g_test_ok
3778 fout.write(message +
'\n')
3781 message = message + g_test_ng
3783 message = message + g_test_ng_message
3784 fout.write(message +
'\n')
3786 fin2 = open(g_diff_recv_file,
'r') 3788 s2 = fin2.readline() 3795 time.sleep(sleep_for_time)
3798 g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
3799 g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
3800 g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
3805 case_no = case_no + 1
3806 fout = open(g_test_result_file,
'a')
3807 message = g_mess_header + g_test_case + str(case_no) +
" " 3808 message = message +
"Connecting(in->out, periodic,FIFO), Activate -> send/recv -> Deactivate" 3809 message = message + g_mess_footer
3810 fout.write(message +
'\n')
3819 ret0 = g_out_ports[g_port1].connect(g_conprof1)
3822 ret1 = g_out_ports[g_port2].connect(g_conprof2)
3825 ret2 = g_out_ports[g_port3].connect(g_conprof3)
3827 for i
in range(loop_count):
3833 ec_recv[0].activate_component(g_compo_recv.rtc_ref)
3834 time.sleep(sleep_recv_act_time)
3835 ec_send[0].activate_component(g_compo_send.rtc_ref)
3837 time.sleep(sleep_act_time)
3840 ec_send[0].deactivate_component(g_compo_send.rtc_ref)
3841 ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
3844 if os.path.isfile(g_diff_recv_file) ==
False:
3845 fout = open(g_test_result_file,
'a')
3846 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
3847 message = message + g_check_message
3848 fout.write(message +
'\n')
3851 time.sleep(sleep_for_time)
3855 time.sleep(sleep_act_time)
3859 fout = open(g_test_result_file,
'a')
3860 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
3864 message = message + g_test_ok
3866 fout.write(message +
'\n')
3869 message = message + g_test_ng
3871 message = message + g_test_ng_message
3872 fout.write(message +
'\n')
3874 fin2 = open(g_diff_recv_file,
'r') 3876 s2 = fin2.readline() 3883 time.sleep(sleep_for_time)
3886 g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
3887 g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
3888 g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
3893 case_no = case_no + 1
3894 fout = open(g_test_result_file,
'a')
3895 message = g_mess_header + g_test_case + str(case_no) +
" " 3896 message = message +
"Connecting(in->out, periodic,NEW), Activate -> send/recv -> Deactivate" 3897 message = message + g_mess_footer
3898 fout.write(message +
'\n')
3907 ret0 = g_out_ports[g_port1].connect(g_conprof1)
3910 ret1 = g_out_ports[g_port2].connect(g_conprof2)
3913 ret2 = g_out_ports[g_port3].connect(g_conprof3)
3915 for i
in range(loop_count):
3921 ec_recv[0].activate_component(g_compo_recv.rtc_ref)
3922 time.sleep(sleep_recv_act_time)
3923 ec_send[0].activate_component(g_compo_send.rtc_ref)
3925 time.sleep(sleep_act_time)
3928 ec_send[0].deactivate_component(g_compo_send.rtc_ref)
3929 ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
3932 if os.path.isfile(g_diff_recv_file) ==
False:
3933 fout = open(g_test_result_file,
'a')
3934 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
3935 message = message + g_check_message
3936 fout.write(message +
'\n')
3939 time.sleep(sleep_for_time)
3943 time.sleep(sleep_act_time)
3947 fout = open(g_test_result_file,
'a')
3948 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
3952 message = message + g_test_ok
3954 fout.write(message +
'\n')
3957 message = message + g_test_ng
3959 message = message + g_test_ng_message
3960 fout.write(message +
'\n')
3962 fin2 = open(g_diff_recv_file,
'r') 3964 s2 = fin2.readline() 3971 time.sleep(sleep_for_time)
3974 g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
3975 g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
3976 g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
3981 case_no = case_no + 1
3982 fout = open(g_test_result_file,
'a')
3983 message = g_mess_header + g_test_case + str(case_no) +
" " 3984 message = message +
"Connecting(in->out, periodic,SKIP), Activate -> send/recv -> Deactivate" 3985 message = message + g_mess_footer
3986 fout.write(message +
'\n')
3995 ret0 = g_out_ports[g_port1].connect(g_conprof1)
3998 ret1 = g_out_ports[g_port2].connect(g_conprof2)
4001 ret2 = g_out_ports[g_port3].connect(g_conprof3)
4003 for i
in range(loop_count):
4009 ec_recv[0].activate_component(g_compo_recv.rtc_ref)
4010 time.sleep(sleep_recv_act_time)
4011 ec_send[0].activate_component(g_compo_send.rtc_ref)
4013 time.sleep(sleep_act_time)
4016 ec_send[0].deactivate_component(g_compo_send.rtc_ref)
4017 ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
4020 if os.path.isfile(g_diff_recv_file) ==
False:
4021 fout = open(g_test_result_file,
'a')
4022 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
4023 message = message + g_check_message
4024 fout.write(message +
'\n')
4027 time.sleep(sleep_for_time)
4031 time.sleep(sleep_act_time)
4035 fout = open(g_test_result_file,
'a')
4036 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
4040 message = message + g_test_ok
4042 fout.write(message +
'\n')
4045 message = message + g_test_ng
4047 message = message + g_test_ng_message
4048 fout.write(message +
'\n')
4050 fin2 = open(g_diff_recv_file,
'r') 4052 s2 = fin2.readline() 4059 time.sleep(sleep_for_time)
4062 g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
4063 g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
4064 g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
4069 case_no = case_no + 1
4070 fout = open(g_test_result_file,
'a')
4071 message = g_mess_header + g_test_case + str(case_no) +
" " 4072 message = message +
"Connect(out->in, periodic,ALL) -> Activate -> send/recv -> Deactivate -> Disconnect" 4073 message = message + g_mess_footer
4074 fout.write(message +
'\n')
4078 for i
in range(loop_count):
4088 ret0 = g_out_ports[g_port1].connect(g_conprof1)
4091 ret1 = g_out_ports[g_port2].connect(g_conprof2)
4094 ret2 = g_out_ports[g_port3].connect(g_conprof3)
4097 ec_recv[0].activate_component(g_compo_recv.rtc_ref)
4098 time.sleep(sleep_recv_act_time)
4099 ec_send[0].activate_component(g_compo_send.rtc_ref)
4101 time.sleep(sleep_act_time)
4104 ec_send[0].deactivate_component(g_compo_send.rtc_ref)
4105 ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
4108 g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
4109 g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
4110 g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
4113 if os.path.isfile(g_diff_recv_file) ==
False:
4114 fout = open(g_test_result_file,
'a')
4115 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
4116 message = message + g_check_message
4117 fout.write(message +
'\n')
4120 time.sleep(sleep_for_time)
4124 time.sleep(sleep_act_time)
4128 fout = open(g_test_result_file,
'a')
4129 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
4133 message = message + g_test_ok
4135 fout.write(message +
'\n')
4138 message = message + g_test_ng
4140 message = message + g_test_ng_message
4141 fout.write(message +
'\n')
4143 fin2 = open(g_diff_recv_file,
'r') 4145 s2 = fin2.readline() 4152 time.sleep(sleep_for_time)
4157 case_no = case_no + 1
4158 fout = open(g_test_result_file,
'a')
4159 message = g_mess_header + g_test_case + str(case_no) +
" " 4160 message = message +
"Connect(out->in, periodic,FIFO) -> Activate -> send/recv -> Deactivate -> Disconnect" 4161 message = message + g_mess_footer
4162 fout.write(message +
'\n')
4166 for i
in range(loop_count):
4176 ret0 = g_out_ports[g_port1].connect(g_conprof1)
4179 ret1 = g_out_ports[g_port2].connect(g_conprof2)
4182 ret2 = g_out_ports[g_port3].connect(g_conprof3)
4185 ec_recv[0].activate_component(g_compo_recv.rtc_ref)
4186 time.sleep(sleep_recv_act_time)
4187 ec_send[0].activate_component(g_compo_send.rtc_ref)
4189 time.sleep(sleep_act_time)
4192 ec_send[0].deactivate_component(g_compo_send.rtc_ref)
4193 ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
4196 g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
4197 g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
4198 g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
4201 if os.path.isfile(g_diff_recv_file) ==
False:
4202 fout = open(g_test_result_file,
'a')
4203 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
4204 message = message + g_check_message
4205 fout.write(message +
'\n')
4208 time.sleep(sleep_for_time)
4212 time.sleep(sleep_act_time)
4216 fout = open(g_test_result_file,
'a')
4217 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
4221 message = message + g_test_ok
4223 fout.write(message +
'\n')
4226 message = message + g_test_ng
4228 message = message + g_test_ng_message
4229 fout.write(message +
'\n')
4231 fin2 = open(g_diff_recv_file,
'r') 4233 s2 = fin2.readline() 4240 time.sleep(sleep_for_time)
4245 case_no = case_no + 1
4246 fout = open(g_test_result_file,
'a')
4247 message = g_mess_header + g_test_case + str(case_no) +
" " 4248 message = message +
"Connect(out->in, periodic,NEW) -> Activate -> send/recv -> Deactivate -> Disconnect" 4249 message = message + g_mess_footer
4250 fout.write(message +
'\n')
4254 for i
in range(loop_count):
4264 ret0 = g_out_ports[g_port1].connect(g_conprof1)
4267 ret1 = g_out_ports[g_port2].connect(g_conprof2)
4270 ret2 = g_out_ports[g_port3].connect(g_conprof3)
4273 ec_recv[0].activate_component(g_compo_recv.rtc_ref)
4274 time.sleep(sleep_recv_act_time)
4275 ec_send[0].activate_component(g_compo_send.rtc_ref)
4277 time.sleep(sleep_act_time)
4280 ec_send[0].deactivate_component(g_compo_send.rtc_ref)
4281 ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
4284 g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
4285 g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
4286 g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
4289 if os.path.isfile(g_diff_recv_file) ==
False:
4290 fout = open(g_test_result_file,
'a')
4291 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
4292 message = message + g_check_message
4293 fout.write(message +
'\n')
4296 time.sleep(sleep_for_time)
4300 time.sleep(sleep_act_time)
4304 fout = open(g_test_result_file,
'a')
4305 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
4309 message = message + g_test_ok
4311 fout.write(message +
'\n')
4314 message = message + g_test_ng
4316 message = message + g_test_ng_message
4317 fout.write(message +
'\n')
4319 fin2 = open(g_diff_recv_file,
'r') 4321 s2 = fin2.readline() 4328 time.sleep(sleep_for_time)
4333 case_no = case_no + 1
4334 fout = open(g_test_result_file,
'a')
4335 message = g_mess_header + g_test_case + str(case_no) +
" " 4336 message = message +
"Connect(out->in, periodic,SKIP) -> Activate -> send/recv -> Deactivate -> Disconnect" 4337 message = message + g_mess_footer
4338 fout.write(message +
'\n')
4342 for i
in range(loop_count):
4352 ret0 = g_out_ports[g_port1].connect(g_conprof1)
4355 ret1 = g_out_ports[g_port2].connect(g_conprof2)
4358 ret2 = g_out_ports[g_port3].connect(g_conprof3)
4361 ec_recv[0].activate_component(g_compo_recv.rtc_ref)
4362 time.sleep(sleep_recv_act_time)
4363 ec_send[0].activate_component(g_compo_send.rtc_ref)
4365 time.sleep(sleep_act_time)
4368 ec_send[0].deactivate_component(g_compo_send.rtc_ref)
4369 ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
4372 g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
4373 g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
4374 g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
4377 if os.path.isfile(g_diff_recv_file) ==
False:
4378 fout = open(g_test_result_file,
'a')
4379 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
4380 message = message + g_check_message
4381 fout.write(message +
'\n')
4384 time.sleep(sleep_for_time)
4388 time.sleep(sleep_act_time)
4392 fout = open(g_test_result_file,
'a')
4393 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
4397 message = message + g_test_ok
4399 fout.write(message +
'\n')
4402 message = message + g_test_ng
4404 message = message + g_test_ng_message
4405 fout.write(message +
'\n')
4407 fin2 = open(g_diff_recv_file,
'r') 4409 s2 = fin2.readline() 4416 time.sleep(sleep_for_time)
4421 case_no = case_no + 1
4422 fout = open(g_test_result_file,
'a')
4423 message = g_mess_header + g_test_case + str(case_no) +
" " 4424 message = message +
"Connect(in->out, periodic,ALL) -> Activate -> send/recv -> Deactivate -> Disconnect" 4425 message = message + g_mess_footer
4426 fout.write(message +
'\n')
4430 for i
in range(loop_count):
4440 ret0 = g_out_ports[g_port1].connect(g_conprof1)
4443 ret1 = g_out_ports[g_port2].connect(g_conprof2)
4446 ret2 = g_out_ports[g_port3].connect(g_conprof3)
4449 ec_recv[0].activate_component(g_compo_recv.rtc_ref)
4450 time.sleep(sleep_recv_act_time)
4451 ec_send[0].activate_component(g_compo_send.rtc_ref)
4453 time.sleep(sleep_act_time)
4456 ec_send[0].deactivate_component(g_compo_send.rtc_ref)
4457 ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
4460 g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
4461 g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
4462 g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
4465 if os.path.isfile(g_diff_recv_file) ==
False:
4466 fout = open(g_test_result_file,
'a')
4467 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
4468 message = message + g_check_message
4469 fout.write(message +
'\n')
4472 time.sleep(sleep_for_time)
4476 time.sleep(sleep_act_time)
4480 fout = open(g_test_result_file,
'a')
4481 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
4485 message = message + g_test_ok
4487 fout.write(message +
'\n')
4490 message = message + g_test_ng
4492 message = message + g_test_ng_message
4493 fout.write(message +
'\n')
4495 fin2 = open(g_diff_recv_file,
'r') 4497 s2 = fin2.readline() 4504 time.sleep(sleep_for_time)
4509 case_no = case_no + 1
4510 fout = open(g_test_result_file,
'a')
4511 message = g_mess_header + g_test_case + str(case_no) +
" " 4512 message = message +
"Connect(in->out, periodic,FIFO) -> Activate -> send/recv -> Deactivate -> Disconnect" 4513 message = message + g_mess_footer
4514 fout.write(message +
'\n')
4518 for i
in range(loop_count):
4528 ret0 = g_out_ports[g_port1].connect(g_conprof1)
4531 ret1 = g_out_ports[g_port2].connect(g_conprof2)
4534 ret2 = g_out_ports[g_port3].connect(g_conprof3)
4537 ec_recv[0].activate_component(g_compo_recv.rtc_ref)
4538 time.sleep(sleep_recv_act_time)
4539 ec_send[0].activate_component(g_compo_send.rtc_ref)
4541 time.sleep(sleep_act_time)
4544 ec_send[0].deactivate_component(g_compo_send.rtc_ref)
4545 ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
4548 g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
4549 g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
4550 g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
4553 if os.path.isfile(g_diff_recv_file) ==
False:
4554 fout = open(g_test_result_file,
'a')
4555 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
4556 message = message + g_check_message
4557 fout.write(message +
'\n')
4560 time.sleep(sleep_for_time)
4564 time.sleep(sleep_act_time)
4568 fout = open(g_test_result_file,
'a')
4569 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
4573 message = message + g_test_ok
4575 fout.write(message +
'\n')
4578 message = message + g_test_ng
4580 message = message + g_test_ng_message
4581 fout.write(message +
'\n')
4583 fin2 = open(g_diff_recv_file,
'r') 4585 s2 = fin2.readline() 4592 time.sleep(sleep_for_time)
4597 case_no = case_no + 1
4598 fout = open(g_test_result_file,
'a')
4599 message = g_mess_header + g_test_case + str(case_no) +
" " 4600 message = message +
"Connect(in->out, periodic,NEW) -> Activate -> send/recv -> Deactivate -> Disconnect" 4601 message = message + g_mess_footer
4602 fout.write(message +
'\n')
4606 for i
in range(loop_count):
4616 ret0 = g_out_ports[g_port1].connect(g_conprof1)
4619 ret1 = g_out_ports[g_port2].connect(g_conprof2)
4622 ret2 = g_out_ports[g_port3].connect(g_conprof3)
4625 ec_recv[0].activate_component(g_compo_recv.rtc_ref)
4626 time.sleep(sleep_recv_act_time)
4627 ec_send[0].activate_component(g_compo_send.rtc_ref)
4629 time.sleep(sleep_act_time)
4632 ec_send[0].deactivate_component(g_compo_send.rtc_ref)
4633 ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
4636 g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
4637 g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
4638 g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
4641 if os.path.isfile(g_diff_recv_file) ==
False:
4642 fout = open(g_test_result_file,
'a')
4643 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
4644 message = message + g_check_message
4645 fout.write(message +
'\n')
4648 time.sleep(sleep_for_time)
4652 time.sleep(sleep_act_time)
4656 fout = open(g_test_result_file,
'a')
4657 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
4661 message = message + g_test_ok
4663 fout.write(message +
'\n')
4666 message = message + g_test_ng
4668 message = message + g_test_ng_message
4669 fout.write(message +
'\n')
4671 fin2 = open(g_diff_recv_file,
'r') 4673 s2 = fin2.readline() 4680 time.sleep(sleep_for_time)
4685 case_no = case_no + 1
4686 fout = open(g_test_result_file,
'a')
4687 message = g_mess_header + g_test_case + str(case_no) +
" " 4688 message = message +
"Connect(in->out, periodic,SKIP) -> Activate -> send/recv -> Deactivate -> Disconnect" 4689 message = message + g_mess_footer
4690 fout.write(message +
'\n')
4694 for i
in range(loop_count):
4704 ret0 = g_out_ports[g_port1].connect(g_conprof1)
4707 ret1 = g_out_ports[g_port2].connect(g_conprof2)
4710 ret2 = g_out_ports[g_port3].connect(g_conprof3)
4713 ec_recv[0].activate_component(g_compo_recv.rtc_ref)
4714 time.sleep(sleep_recv_act_time)
4715 ec_send[0].activate_component(g_compo_send.rtc_ref)
4717 time.sleep(sleep_act_time)
4720 ec_send[0].deactivate_component(g_compo_send.rtc_ref)
4721 ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
4724 g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
4725 g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
4726 g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
4729 if os.path.isfile(g_diff_recv_file) ==
False:
4730 fout = open(g_test_result_file,
'a')
4731 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
4732 message = message + g_check_message
4733 fout.write(message +
'\n')
4736 time.sleep(sleep_for_time)
4740 time.sleep(sleep_act_time)
4744 fout = open(g_test_result_file,
'a')
4745 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
4749 message = message + g_test_ok
4751 fout.write(message +
'\n')
4754 message = message + g_test_ng
4756 message = message + g_test_ng_message
4757 fout.write(message +
'\n')
4759 fin2 = open(g_diff_recv_file,
'r') 4761 s2 = fin2.readline() 4768 time.sleep(sleep_for_time)
4770 print "Test Complete."
def delete_recv_file()
内部関数:受信ファイル削除
def diff_file()
内部関数:送受信ファイルのデータ比較
def make_connecter_profile(subscription_type, push_policy, connect_direction)
内部関数:コネクタープロファイル設定(データポート)