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') f_recv = open(g_diff_recv_file, 'r') 177 str_send = f_send.readline() 178 str_recv = f_recv.readline() 179 if len(str_send) == 0:
188 str_send2 = str_send.rstrip(
'\n')
189 str_send2 = str_send2.rstrip(
'\r')
190 str_recv2 = str_recv.rstrip(
'\n')
191 str_recv2 = str_recv2.rstrip(
'\r')
197 if str_send2 != str_recv2:
217 sleep_recv_act_time = 1
226 sleep_connect_time = 2
229 fout = open(g_test_result_file,
'w')
230 fout.write(g_test_name +
'\n')
239 case_no = case_no + 1
240 fout = open(g_test_result_file,
'a')
241 message = g_mess_header + g_test_case + str(case_no) +
" " 242 message = message +
"Connect(out->in, flush) -> Disconnect" 243 message = message + g_mess_footer
244 fout.write(message +
'\n')
248 for i
in range(loop_count):
255 ret0 = g_out_ports[g_port1].connect(g_conprof1)
258 ret1 = g_out_ports[g_port2].connect(g_conprof2)
261 ret2 = g_out_ports[g_port3].connect(g_conprof3)
263 time.sleep(sleep_connect_time)
266 g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
267 g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
268 g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
271 fout = open(g_test_result_file,
'a')
272 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
273 message = message + g_test_ok
275 fout.write(message +
'\n')
278 time.sleep(sleep_for_time)
283 case_no = case_no + 1
284 fout = open(g_test_result_file,
'a')
285 message = g_mess_header + g_test_case + str(case_no) +
" " 286 message = message +
"Connect(in->out, flush) -> Disconnect" 287 message = message + g_mess_footer
288 fout.write(message +
'\n')
292 for i
in range(loop_count):
299 ret0 = g_out_ports[g_port1].connect(g_conprof1)
302 ret1 = g_out_ports[g_port2].connect(g_conprof2)
305 ret2 = g_out_ports[g_port3].connect(g_conprof3)
307 time.sleep(sleep_connect_time)
310 g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
311 g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
312 g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
315 fout = open(g_test_result_file,
'a')
316 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
317 message = message + g_test_ok
319 fout.write(message +
'\n')
322 time.sleep(sleep_for_time)
327 case_no = case_no + 1
328 fout = open(g_test_result_file,
'a')
329 message = g_mess_header + g_test_case + str(case_no) +
" " 330 message = message +
"Connecting(out->in, flush), Activate -> send/recv -> Deactivate" 331 message = message + g_mess_footer
332 fout.write(message +
'\n')
341 ret0 = g_out_ports[g_port1].connect(g_conprof1)
344 ret1 = g_out_ports[g_port2].connect(g_conprof2)
347 ret2 = g_out_ports[g_port3].connect(g_conprof3)
349 for i
in range(loop_count):
355 ec_recv[0].activate_component(g_compo_recv.rtc_ref)
356 time.sleep(sleep_recv_act_time)
357 ec_send[0].activate_component(g_compo_send.rtc_ref)
359 time.sleep(sleep_act_time)
362 ec_send[0].deactivate_component(g_compo_send.rtc_ref)
363 ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
366 if os.path.isfile(g_diff_recv_file) ==
False:
367 fout = open(g_test_result_file,
'a')
368 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
369 message = message + g_check_message
370 fout.write(message +
'\n')
373 time.sleep(sleep_for_time)
377 time.sleep(sleep_act_time)
381 fout = open(g_test_result_file,
'a')
382 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
386 message = message + g_test_ok
388 fout.write(message +
'\n')
391 message = message + g_test_ng
393 message = message + g_test_ng_message
394 fout.write(message +
'\n')
396 fin2 = open(g_diff_recv_file,
'r') while(1): 404 time.sleep(sleep_for_time)
407 g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
408 g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
409 g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
414 case_no = case_no + 1
415 fout = open(g_test_result_file,
'a')
416 message = g_mess_header + g_test_case + str(case_no) +
" " 417 message = message +
"Connecting(in->out, flush), Activate -> send/recv -> Deactivate" 418 message = message + g_mess_footer
419 fout.write(message +
'\n')
428 ret0 = g_out_ports[g_port1].connect(g_conprof1)
431 ret1 = g_out_ports[g_port2].connect(g_conprof2)
434 ret2 = g_out_ports[g_port3].connect(g_conprof3)
436 for i
in range(loop_count):
442 ec_recv[0].activate_component(g_compo_recv.rtc_ref)
443 time.sleep(sleep_recv_act_time)
444 ec_send[0].activate_component(g_compo_send.rtc_ref)
446 time.sleep(sleep_act_time)
449 ec_send[0].deactivate_component(g_compo_send.rtc_ref)
450 ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
453 if os.path.isfile(g_diff_recv_file) ==
False:
454 fout = open(g_test_result_file,
'a')
455 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
456 message = message + g_check_message
457 fout.write(message +
'\n')
460 time.sleep(sleep_for_time)
464 time.sleep(sleep_act_time)
468 fout = open(g_test_result_file,
'a')
469 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
473 message = message + g_test_ok
475 fout.write(message +
'\n')
478 message = message + g_test_ng
480 message = message + g_test_ng_message
481 fout.write(message +
'\n')
483 fin2 = open(g_diff_recv_file,
'r') while(1): 491 time.sleep(sleep_for_time)
494 g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
495 g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
496 g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
501 case_no = case_no + 1
502 fout = open(g_test_result_file,
'a')
503 message = g_mess_header + g_test_case + str(case_no) +
" " 504 message = message +
"Not Connect(out->in, flush), Activate -> Deactivate" 505 message = message + g_mess_footer
506 fout.write(message +
'\n')
510 for i
in range(loop_count):
516 ec_recv[0].activate_component(g_compo_recv.rtc_ref)
517 time.sleep(sleep_recv_act_time)
518 ec_send[0].activate_component(g_compo_send.rtc_ref)
520 time.sleep(sleep_act_time)
523 ec_send[0].deactivate_component(g_compo_send.rtc_ref)
524 ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
527 fout = open(g_test_result_file,
'a')
528 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
529 message = message + g_test_ok
531 fout.write(message +
'\n')
534 time.sleep(sleep_for_time)
539 case_no = case_no + 1
540 fout = open(g_test_result_file,
'a')
541 message = g_mess_header + g_test_case + str(case_no) +
" " 542 message = message +
"Connect(out->in, flush) -> Activate -> send/recv -> Deactivate -> Disconnect" 543 message = message + g_mess_footer
544 fout.write(message +
'\n')
548 for i
in range(loop_count):
558 ret0 = g_out_ports[g_port1].connect(g_conprof1)
561 ret1 = g_out_ports[g_port2].connect(g_conprof2)
564 ret2 = g_out_ports[g_port3].connect(g_conprof3)
567 ec_recv[0].activate_component(g_compo_recv.rtc_ref)
568 time.sleep(sleep_recv_act_time)
569 ec_send[0].activate_component(g_compo_send.rtc_ref)
571 time.sleep(sleep_act_time)
574 ec_send[0].deactivate_component(g_compo_send.rtc_ref)
575 ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
578 g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
579 g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
580 g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
583 if os.path.isfile(g_diff_recv_file) ==
False:
584 fout = open(g_test_result_file,
'a')
585 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
586 message = message + g_check_message
587 fout.write(message +
'\n')
590 time.sleep(sleep_for_time)
594 time.sleep(sleep_act_time)
598 fout = open(g_test_result_file,
'a')
599 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
603 message = message + g_test_ok
605 fout.write(message +
'\n')
608 message = message + g_test_ng
610 message = message + g_test_ng_message
611 fout.write(message +
'\n')
613 fin2 = open(g_diff_recv_file,
'r') while(1): 621 time.sleep(sleep_for_time)
626 case_no = case_no + 1
627 fout = open(g_test_result_file,
'a')
628 message = g_mess_header + g_test_case + str(case_no) +
" " 629 message = message +
"Connect(in->out, flush) -> Activate -> send/recv -> Deactivate -> Disconnect" 630 message = message + g_mess_footer
631 fout.write(message +
'\n')
635 for i
in range(loop_count):
645 ret0 = g_out_ports[g_port1].connect(g_conprof1)
648 ret1 = g_out_ports[g_port2].connect(g_conprof2)
651 ret2 = g_out_ports[g_port3].connect(g_conprof3)
654 ec_recv[0].activate_component(g_compo_recv.rtc_ref)
655 time.sleep(sleep_recv_act_time)
656 ec_send[0].activate_component(g_compo_send.rtc_ref)
658 time.sleep(sleep_act_time)
661 ec_send[0].deactivate_component(g_compo_send.rtc_ref)
662 ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
665 g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
666 g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
667 g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
670 if os.path.isfile(g_diff_recv_file) ==
False:
671 fout = open(g_test_result_file,
'a')
672 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
673 message = message + g_check_message
674 fout.write(message +
'\n')
677 time.sleep(sleep_for_time)
681 time.sleep(sleep_act_time)
685 fout = open(g_test_result_file,
'a')
686 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
690 message = message + g_test_ok
692 fout.write(message +
'\n')
695 message = message + g_test_ng
697 message = message + g_test_ng_message
698 fout.write(message +
'\n')
700 fin2 = open(g_diff_recv_file,
'r') while(1): 708 time.sleep(sleep_for_time)
713 case_no = case_no + 1
714 fout = open(g_test_result_file,
'a')
715 message = g_mess_header + g_test_case + str(case_no) +
" " 716 message = message +
"Connect(out->in, flush) -> Activate -> send/recv -> Disconnect -> Deactivate" 717 message = message + g_mess_footer
718 fout.write(message +
'\n')
722 for i
in range(loop_count):
732 ret0 = g_out_ports[g_port1].connect(g_conprof1)
735 ret1 = g_out_ports[g_port2].connect(g_conprof2)
738 ret2 = g_out_ports[g_port3].connect(g_conprof3)
741 ec_recv[0].activate_component(g_compo_recv.rtc_ref)
742 time.sleep(sleep_recv_act_time)
743 ec_send[0].activate_component(g_compo_send.rtc_ref)
745 time.sleep(sleep_act_time)
748 g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
749 g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
750 g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
753 ec_send[0].deactivate_component(g_compo_send.rtc_ref)
754 ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
757 if os.path.isfile(g_diff_recv_file) ==
False:
758 fout = open(g_test_result_file,
'a')
759 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
760 message = message + g_check_message
761 fout.write(message +
'\n')
764 time.sleep(sleep_for_time)
768 time.sleep(sleep_act_time)
772 fout = open(g_test_result_file,
'a')
773 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
777 message = message + g_test_ok
779 fout.write(message +
'\n')
782 message = message + g_test_ng
784 message = message + g_test_ng_message
785 fout.write(message +
'\n')
787 fin2 = open(g_diff_recv_file,
'r') while(1): 795 time.sleep(sleep_for_time)
800 case_no = case_no + 1
801 fout = open(g_test_result_file,
'a')
802 message = g_mess_header + g_test_case + str(case_no) +
" " 803 message = message +
"Connect(in->out, flush) -> Activate -> send/recv -> Disconnect -> Deactivate" 804 message = message + g_mess_footer
805 fout.write(message +
'\n')
809 for i
in range(loop_count):
819 ret0 = g_out_ports[g_port1].connect(g_conprof1)
822 ret1 = g_out_ports[g_port2].connect(g_conprof2)
825 ret2 = g_out_ports[g_port3].connect(g_conprof3)
828 ec_recv[0].activate_component(g_compo_recv.rtc_ref)
829 time.sleep(sleep_recv_act_time)
830 ec_send[0].activate_component(g_compo_send.rtc_ref)
832 time.sleep(sleep_act_time)
835 g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
836 g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
837 g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
840 ec_send[0].deactivate_component(g_compo_send.rtc_ref)
841 ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
844 if os.path.isfile(g_diff_recv_file) ==
False:
845 fout = open(g_test_result_file,
'a')
846 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
847 message = message + g_check_message
848 fout.write(message +
'\n')
851 time.sleep(sleep_for_time)
855 time.sleep(sleep_act_time)
859 fout = open(g_test_result_file,
'a')
860 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
864 message = message + g_test_ok
866 fout.write(message +
'\n')
869 message = message + g_test_ng
871 message = message + g_test_ng_message
872 fout.write(message +
'\n')
874 fin2 = open(g_diff_recv_file,
'r') while(1): 882 time.sleep(sleep_for_time)
889 case_no = case_no + 1
890 fout = open(g_test_result_file,
'a')
891 message = g_mess_header + g_test_case + str(case_no) +
" " 892 message = message +
"Activate -> Connect(out->in, flush) -> send/recv -> Deactivate -> Disconnect" 893 message = message + g_mess_footer
894 fout.write(message +
'\n')
898 for i
in range(loop_count):
907 ec_recv[0].activate_component(g_compo_recv.rtc_ref)
908 time.sleep(sleep_recv_act_time)
909 ec_send[0].activate_component(g_compo_send.rtc_ref)
913 ret0 = g_out_ports[g_port1].connect(g_conprof1)
916 ret1 = g_out_ports[g_port2].connect(g_conprof2)
919 ret2 = g_out_ports[g_port3].connect(g_conprof3)
921 time.sleep(sleep_act_time)
924 ec_send[0].deactivate_component(g_compo_send.rtc_ref)
925 ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
928 g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
929 g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
930 g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
933 if os.path.isfile(g_diff_recv_file) ==
False:
934 fout = open(g_test_result_file,
'a')
935 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
936 message = message + g_check_message
937 fout.write(message +
'\n')
940 time.sleep(sleep_for_time)
944 time.sleep(sleep_act_time)
948 fout = open(g_test_result_file,
'a')
949 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
953 message = message + g_test_ok
955 fout.write(message +
'\n')
958 message = message + g_test_ng
960 message = message + g_test_ng_message
961 fout.write(message +
'\n')
963 fin2 = open(g_diff_recv_file,
'r') while(1): 971 time.sleep(sleep_for_time)
977 case_no = case_no + 1
978 fout = open(g_test_result_file,
'a')
979 message = g_mess_header + g_test_case + str(case_no) +
" " 980 message = message +
"Activate -> Connect(in->out, flush) -> send/recv -> Deactivate -> Disconnect" 981 message = message + g_mess_footer
982 fout.write(message +
'\n')
986 for i
in range(loop_count):
995 ec_recv[0].activate_component(g_compo_recv.rtc_ref)
996 time.sleep(sleep_recv_act_time)
997 ec_send[0].activate_component(g_compo_send.rtc_ref)
1001 ret0 = g_out_ports[g_port1].connect(g_conprof1)
1004 ret1 = g_out_ports[g_port2].connect(g_conprof2)
1007 ret2 = g_out_ports[g_port3].connect(g_conprof3)
1009 time.sleep(sleep_act_time)
1012 ec_send[0].deactivate_component(g_compo_send.rtc_ref)
1013 ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
1016 g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
1017 g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
1018 g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
1021 if os.path.isfile(g_diff_recv_file) ==
False:
1022 fout = open(g_test_result_file,
'a')
1023 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
1024 message = message + g_check_message
1025 fout.write(message +
'\n')
1028 time.sleep(sleep_for_time)
1032 time.sleep(sleep_act_time)
1036 fout = open(g_test_result_file,
'a')
1037 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
1041 message = message + g_test_ok
1043 fout.write(message +
'\n')
1046 message = message + g_test_ng
1048 message = message + g_test_ng_message
1049 fout.write(message +
'\n')
1051 fin2 = open(g_diff_recv_file,
'r') while(1): 1052 s2 = fin2.readline() 1059 time.sleep(sleep_for_time)
1065 case_no = case_no + 1
1066 fout = open(g_test_result_file,
'a')
1067 message = g_mess_header + g_test_case + str(case_no) +
" " 1068 message = message +
"Activate -> Connect(out->in, flush) -> send/recv -> Disconnect -> Deactivate" 1069 message = message + g_mess_footer
1070 fout.write(message +
'\n')
1074 for i
in range(loop_count):
1083 ec_recv[0].activate_component(g_compo_recv.rtc_ref)
1084 time.sleep(sleep_recv_act_time)
1085 ec_send[0].activate_component(g_compo_send.rtc_ref)
1089 ret0 = g_out_ports[g_port1].connect(g_conprof1)
1092 ret1 = g_out_ports[g_port2].connect(g_conprof2)
1095 ret2 = g_out_ports[g_port3].connect(g_conprof3)
1097 time.sleep(sleep_act_time)
1100 g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
1101 g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
1102 g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
1105 ec_send[0].deactivate_component(g_compo_send.rtc_ref)
1106 ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
1109 if os.path.isfile(g_diff_recv_file) ==
False:
1110 fout = open(g_test_result_file,
'a')
1111 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
1112 message = message + g_check_message
1113 fout.write(message +
'\n')
1116 time.sleep(sleep_for_time)
1120 time.sleep(sleep_act_time)
1124 fout = open(g_test_result_file,
'a')
1125 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
1129 message = message + g_test_ok
1131 fout.write(message +
'\n')
1134 message = message + g_test_ng
1136 message = message + g_test_ng_message
1137 fout.write(message +
'\n')
1139 fin2 = open(g_diff_recv_file,
'r') while(1): 1140 s2 = fin2.readline() 1147 time.sleep(sleep_for_time)
1153 case_no = case_no + 1
1154 fout = open(g_test_result_file,
'a')
1155 message = g_mess_header + g_test_case + str(case_no) +
" " 1156 message = message +
"Activate -> Connect(in->out, flush) -> send/recv -> Disconnect -> Deactivate" 1157 message = message + g_mess_footer
1158 fout.write(message +
'\n')
1162 for i
in range(loop_count):
1171 ec_recv[0].activate_component(g_compo_recv.rtc_ref)
1172 time.sleep(sleep_recv_act_time)
1173 ec_send[0].activate_component(g_compo_send.rtc_ref)
1177 ret0 = g_out_ports[g_port1].connect(g_conprof1)
1180 ret1 = g_out_ports[g_port2].connect(g_conprof2)
1183 ret2 = g_out_ports[g_port3].connect(g_conprof3)
1185 time.sleep(sleep_act_time)
1188 g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
1189 g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
1190 g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
1193 ec_send[0].deactivate_component(g_compo_send.rtc_ref)
1194 ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
1197 if os.path.isfile(g_diff_recv_file) ==
False:
1198 fout = open(g_test_result_file,
'a')
1199 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
1200 message = message + g_check_message
1201 fout.write(message +
'\n')
1204 time.sleep(sleep_for_time)
1208 time.sleep(sleep_act_time)
1212 fout = open(g_test_result_file,
'a')
1213 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
1217 message = message + g_test_ok
1219 fout.write(message +
'\n')
1222 message = message + g_test_ng
1224 message = message + g_test_ng_message
1225 fout.write(message +
'\n')
1227 fin2 = open(g_diff_recv_file,
'r') while(1): 1228 s2 = fin2.readline() 1235 time.sleep(sleep_for_time)
1241 case_no = case_no + 1
1242 fout = open(g_test_result_file,
'a')
1243 message = g_mess_header + g_test_case + str(case_no) +
" " 1244 message = message +
"Connect(out->in, new,ALL) -> Disconnect" 1245 message = message + g_mess_footer
1246 fout.write(message +
'\n')
1250 for i
in range(loop_count):
1257 ret0 = g_out_ports[g_port1].connect(g_conprof1)
1260 ret1 = g_out_ports[g_port2].connect(g_conprof2)
1263 ret2 = g_out_ports[g_port3].connect(g_conprof3)
1265 time.sleep(sleep_connect_time)
1268 g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
1269 g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
1270 g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
1273 fout = open(g_test_result_file,
'a')
1274 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
1275 message = message + g_test_ok
1277 fout.write(message +
'\n')
1280 time.sleep(sleep_for_time)
1285 case_no = case_no + 1
1286 fout = open(g_test_result_file,
'a')
1287 message = g_mess_header + g_test_case + str(case_no) +
" " 1288 message = message +
"Connect(out->in, new,FIFO) -> Disconnect" 1289 message = message + g_mess_footer
1290 fout.write(message +
'\n')
1294 for i
in range(loop_count):
1301 ret0 = g_out_ports[g_port1].connect(g_conprof1)
1304 ret1 = g_out_ports[g_port2].connect(g_conprof2)
1307 ret2 = g_out_ports[g_port3].connect(g_conprof3)
1309 time.sleep(sleep_connect_time)
1312 g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
1313 g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
1314 g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
1317 fout = open(g_test_result_file,
'a')
1318 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
1319 message = message + g_test_ok
1321 fout.write(message +
'\n')
1324 time.sleep(sleep_for_time)
1329 case_no = case_no + 1
1330 fout = open(g_test_result_file,
'a')
1331 message = g_mess_header + g_test_case + str(case_no) +
" " 1332 message = message +
"Connect(out->in, new,NEW) -> Disconnect" 1333 message = message + g_mess_footer
1334 fout.write(message +
'\n')
1338 for i
in range(loop_count):
1345 ret0 = g_out_ports[g_port1].connect(g_conprof1)
1348 ret1 = g_out_ports[g_port2].connect(g_conprof2)
1351 ret2 = g_out_ports[g_port3].connect(g_conprof3)
1353 time.sleep(sleep_connect_time)
1356 g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
1357 g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
1358 g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
1361 fout = open(g_test_result_file,
'a')
1362 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
1363 message = message + g_test_ok
1365 fout.write(message +
'\n')
1368 time.sleep(sleep_for_time)
1373 case_no = case_no + 1
1374 fout = open(g_test_result_file,
'a')
1375 message = g_mess_header + g_test_case + str(case_no) +
" " 1376 message = message +
"Connect(out->in, new,SKIP) -> Disconnect" 1377 message = message + g_mess_footer
1378 fout.write(message +
'\n')
1382 for i
in range(loop_count):
1389 ret0 = g_out_ports[g_port1].connect(g_conprof1)
1392 ret1 = g_out_ports[g_port2].connect(g_conprof2)
1395 ret2 = g_out_ports[g_port3].connect(g_conprof3)
1397 time.sleep(sleep_connect_time)
1400 g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
1401 g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
1402 g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
1405 fout = open(g_test_result_file,
'a')
1406 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
1407 message = message + g_test_ok
1409 fout.write(message +
'\n')
1412 time.sleep(sleep_for_time)
1417 case_no = case_no + 1
1418 fout = open(g_test_result_file,
'a')
1419 message = g_mess_header + g_test_case + str(case_no) +
" " 1420 message = message +
"Connect(in->out, new,ALL) -> Disconnect" 1421 message = message + g_mess_footer
1422 fout.write(message +
'\n')
1426 for i
in range(loop_count):
1433 ret0 = g_out_ports[g_port1].connect(g_conprof1)
1436 ret1 = g_out_ports[g_port2].connect(g_conprof2)
1439 ret2 = g_out_ports[g_port3].connect(g_conprof3)
1441 time.sleep(sleep_connect_time)
1444 g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
1445 g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
1446 g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
1449 fout = open(g_test_result_file,
'a')
1450 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
1451 message = message + g_test_ok
1453 fout.write(message +
'\n')
1456 time.sleep(sleep_for_time)
1461 case_no = case_no + 1
1462 fout = open(g_test_result_file,
'a')
1463 message = g_mess_header + g_test_case + str(case_no) +
" " 1464 message = message +
"Connect(in->out, new,FIFO) -> Disconnect" 1465 message = message + g_mess_footer
1466 fout.write(message +
'\n')
1470 for i
in range(loop_count):
1477 ret0 = g_out_ports[g_port1].connect(g_conprof1)
1480 ret1 = g_out_ports[g_port2].connect(g_conprof2)
1483 ret2 = g_out_ports[g_port3].connect(g_conprof3)
1485 time.sleep(sleep_connect_time)
1488 g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
1489 g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
1490 g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
1493 fout = open(g_test_result_file,
'a')
1494 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
1495 message = message + g_test_ok
1497 fout.write(message +
'\n')
1500 time.sleep(sleep_for_time)
1505 case_no = case_no + 1
1506 fout = open(g_test_result_file,
'a')
1507 message = g_mess_header + g_test_case + str(case_no) +
" " 1508 message = message +
"Connect(in->out, new,NEW) -> Disconnect" 1509 message = message + g_mess_footer
1510 fout.write(message +
'\n')
1514 for i
in range(loop_count):
1521 ret0 = g_out_ports[g_port1].connect(g_conprof1)
1524 ret1 = g_out_ports[g_port2].connect(g_conprof2)
1527 ret2 = g_out_ports[g_port3].connect(g_conprof3)
1529 time.sleep(sleep_connect_time)
1532 g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
1533 g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
1534 g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
1537 fout = open(g_test_result_file,
'a')
1538 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
1539 message = message + g_test_ok
1541 fout.write(message +
'\n')
1544 time.sleep(sleep_for_time)
1549 case_no = case_no + 1
1550 fout = open(g_test_result_file,
'a')
1551 message = g_mess_header + g_test_case + str(case_no) +
" " 1552 message = message +
"Connect(in->out, new,SKIP) -> Disconnect" 1553 message = message + g_mess_footer
1554 fout.write(message +
'\n')
1558 for i
in range(loop_count):
1565 ret0 = g_out_ports[g_port1].connect(g_conprof1)
1568 ret1 = g_out_ports[g_port2].connect(g_conprof2)
1571 ret2 = g_out_ports[g_port3].connect(g_conprof3)
1573 time.sleep(sleep_connect_time)
1576 g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
1577 g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
1578 g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
1581 fout = open(g_test_result_file,
'a')
1582 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
1583 message = message + g_test_ok
1585 fout.write(message +
'\n')
1588 time.sleep(sleep_for_time)
1593 case_no = case_no + 1
1594 fout = open(g_test_result_file,
'a')
1595 message = g_mess_header + g_test_case + str(case_no) +
" " 1596 message = message +
"Connecting(out->in, new,ALL), Activate -> send/recv -> Deactivate" 1597 message = message + g_mess_footer
1598 fout.write(message +
'\n')
1607 ret0 = g_out_ports[g_port1].connect(g_conprof1)
1610 ret1 = g_out_ports[g_port2].connect(g_conprof2)
1613 ret2 = g_out_ports[g_port3].connect(g_conprof3)
1615 for i
in range(loop_count):
1621 ec_recv[0].activate_component(g_compo_recv.rtc_ref)
1622 time.sleep(sleep_recv_act_time)
1623 ec_send[0].activate_component(g_compo_send.rtc_ref)
1625 time.sleep(sleep_act_time)
1628 ec_send[0].deactivate_component(g_compo_send.rtc_ref)
1629 ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
1632 if os.path.isfile(g_diff_recv_file) ==
False:
1633 fout = open(g_test_result_file,
'a')
1634 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
1635 message = message + g_check_message
1636 fout.write(message +
'\n')
1639 time.sleep(sleep_for_time)
1643 time.sleep(sleep_act_time)
1647 fout = open(g_test_result_file,
'a')
1648 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
1652 message = message + g_test_ok
1654 fout.write(message +
'\n')
1657 message = message + g_test_ng
1659 message = message + g_test_ng_message
1660 fout.write(message +
'\n')
1662 fin2 = open(g_diff_recv_file,
'r') while(1): 1663 s2 = fin2.readline() 1670 time.sleep(sleep_for_time)
1673 g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
1674 g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
1675 g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
1680 case_no = case_no + 1
1681 fout = open(g_test_result_file,
'a')
1682 message = g_mess_header + g_test_case + str(case_no) +
" " 1683 message = message +
"Connecting(out->in, new,FIFO), Activate -> send/recv -> Deactivate" 1684 message = message + g_mess_footer
1685 fout.write(message +
'\n')
1694 ret0 = g_out_ports[g_port1].connect(g_conprof1)
1697 ret1 = g_out_ports[g_port2].connect(g_conprof2)
1700 ret2 = g_out_ports[g_port3].connect(g_conprof3)
1702 for i
in range(loop_count):
1708 ec_recv[0].activate_component(g_compo_recv.rtc_ref)
1709 time.sleep(sleep_recv_act_time)
1710 ec_send[0].activate_component(g_compo_send.rtc_ref)
1712 time.sleep(sleep_act_time)
1715 ec_send[0].deactivate_component(g_compo_send.rtc_ref)
1716 ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
1719 if os.path.isfile(g_diff_recv_file) ==
False:
1720 fout = open(g_test_result_file,
'a')
1721 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
1722 message = message + g_check_message
1723 fout.write(message +
'\n')
1726 time.sleep(sleep_for_time)
1730 time.sleep(sleep_act_time)
1734 fout = open(g_test_result_file,
'a')
1735 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
1739 message = message + g_test_ok
1741 fout.write(message +
'\n')
1744 message = message + g_test_ng
1746 message = message + g_test_ng_message
1747 fout.write(message +
'\n')
1749 fin2 = open(g_diff_recv_file,
'r') while(1): 1750 s2 = fin2.readline() 1757 time.sleep(sleep_for_time)
1760 g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
1761 g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
1762 g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
1767 case_no = case_no + 1
1768 fout = open(g_test_result_file,
'a')
1769 message = g_mess_header + g_test_case + str(case_no) +
" " 1770 message = message +
"Connecting(out->in, new,NEW), Activate -> send/recv -> Deactivate" 1771 message = message + g_mess_footer
1772 fout.write(message +
'\n')
1781 ret0 = g_out_ports[g_port1].connect(g_conprof1)
1784 ret1 = g_out_ports[g_port2].connect(g_conprof2)
1787 ret2 = g_out_ports[g_port3].connect(g_conprof3)
1789 for i
in range(loop_count):
1795 ec_recv[0].activate_component(g_compo_recv.rtc_ref)
1796 time.sleep(sleep_recv_act_time)
1797 ec_send[0].activate_component(g_compo_send.rtc_ref)
1799 time.sleep(sleep_act_time)
1802 ec_send[0].deactivate_component(g_compo_send.rtc_ref)
1803 ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
1806 if os.path.isfile(g_diff_recv_file) ==
False:
1807 fout = open(g_test_result_file,
'a')
1808 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
1809 message = message + g_check_message
1810 fout.write(message +
'\n')
1813 time.sleep(sleep_for_time)
1817 time.sleep(sleep_act_time)
1821 fout = open(g_test_result_file,
'a')
1822 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
1826 message = message + g_test_ok
1828 fout.write(message +
'\n')
1831 message = message + g_test_ng
1833 message = message + g_test_ng_message
1834 fout.write(message +
'\n')
1836 fin2 = open(g_diff_recv_file,
'r') while(1): 1837 s2 = fin2.readline() 1844 time.sleep(sleep_for_time)
1847 g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
1848 g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
1849 g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
1854 case_no = case_no + 1
1855 fout = open(g_test_result_file,
'a')
1856 message = g_mess_header + g_test_case + str(case_no) +
" " 1857 message = message +
"Connecting(out->in, new,SKIP), Activate -> send/recv -> Deactivate" 1858 message = message + g_mess_footer
1859 fout.write(message +
'\n')
1868 ret0 = g_out_ports[g_port1].connect(g_conprof1)
1871 ret1 = g_out_ports[g_port2].connect(g_conprof2)
1874 ret2 = g_out_ports[g_port3].connect(g_conprof3)
1876 for i
in range(loop_count):
1882 ec_recv[0].activate_component(g_compo_recv.rtc_ref)
1883 time.sleep(sleep_recv_act_time)
1884 ec_send[0].activate_component(g_compo_send.rtc_ref)
1886 time.sleep(sleep_act_time)
1889 ec_send[0].deactivate_component(g_compo_send.rtc_ref)
1890 ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
1893 if os.path.isfile(g_diff_recv_file) ==
False:
1894 fout = open(g_test_result_file,
'a')
1895 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
1896 message = message + g_check_message
1897 fout.write(message +
'\n')
1900 time.sleep(sleep_for_time)
1904 time.sleep(sleep_act_time)
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
1913 message = message + g_test_ok
1915 fout.write(message +
'\n')
1918 message = message + g_test_ng
1920 message = message + g_test_ng_message
1921 fout.write(message +
'\n')
1923 fin2 = open(g_diff_recv_file,
'r') while(1): 1924 s2 = fin2.readline() 1931 time.sleep(sleep_for_time)
1934 g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
1935 g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
1936 g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
1941 case_no = case_no + 1
1942 fout = open(g_test_result_file,
'a')
1943 message = g_mess_header + g_test_case + str(case_no) +
" " 1944 message = message +
"Connecting(in->out, new,ALL), Activate -> send/recv -> Deactivate" 1945 message = message + g_mess_footer
1946 fout.write(message +
'\n')
1955 ret0 = g_out_ports[g_port1].connect(g_conprof1)
1958 ret1 = g_out_ports[g_port2].connect(g_conprof2)
1961 ret2 = g_out_ports[g_port3].connect(g_conprof3)
1963 for i
in range(loop_count):
1969 ec_recv[0].activate_component(g_compo_recv.rtc_ref)
1970 time.sleep(sleep_recv_act_time)
1971 ec_send[0].activate_component(g_compo_send.rtc_ref)
1973 time.sleep(sleep_act_time)
1976 ec_send[0].deactivate_component(g_compo_send.rtc_ref)
1977 ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
1980 if os.path.isfile(g_diff_recv_file) ==
False:
1981 fout = open(g_test_result_file,
'a')
1982 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
1983 message = message + g_check_message
1984 fout.write(message +
'\n')
1987 time.sleep(sleep_for_time)
1991 time.sleep(sleep_act_time)
1995 fout = open(g_test_result_file,
'a')
1996 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
2000 message = message + g_test_ok
2002 fout.write(message +
'\n')
2005 message = message + g_test_ng
2007 message = message + g_test_ng_message
2008 fout.write(message +
'\n')
2010 fin2 = open(g_diff_recv_file,
'r') while(1): 2011 s2 = fin2.readline() 2018 time.sleep(sleep_for_time)
2021 g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
2022 g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
2023 g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
2028 case_no = case_no + 1
2029 fout = open(g_test_result_file,
'a')
2030 message = g_mess_header + g_test_case + str(case_no) +
" " 2031 message = message +
"Connecting(in->out, new,FIFO), Activate -> send/recv -> Deactivate" 2032 message = message + g_mess_footer
2033 fout.write(message +
'\n')
2042 ret0 = g_out_ports[g_port1].connect(g_conprof1)
2045 ret1 = g_out_ports[g_port2].connect(g_conprof2)
2048 ret2 = g_out_ports[g_port3].connect(g_conprof3)
2050 for i
in range(loop_count):
2056 ec_recv[0].activate_component(g_compo_recv.rtc_ref)
2057 time.sleep(sleep_recv_act_time)
2058 ec_send[0].activate_component(g_compo_send.rtc_ref)
2060 time.sleep(sleep_act_time)
2063 ec_send[0].deactivate_component(g_compo_send.rtc_ref)
2064 ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
2067 if os.path.isfile(g_diff_recv_file) ==
False:
2068 fout = open(g_test_result_file,
'a')
2069 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
2070 message = message + g_check_message
2071 fout.write(message +
'\n')
2074 time.sleep(sleep_for_time)
2078 time.sleep(sleep_act_time)
2082 fout = open(g_test_result_file,
'a')
2083 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
2087 message = message + g_test_ok
2089 fout.write(message +
'\n')
2092 message = message + g_test_ng
2094 message = message + g_test_ng_message
2095 fout.write(message +
'\n')
2097 fin2 = open(g_diff_recv_file,
'r') while(1): 2098 s2 = fin2.readline() 2105 time.sleep(sleep_for_time)
2108 g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
2109 g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
2110 g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
2115 case_no = case_no + 1
2116 fout = open(g_test_result_file,
'a')
2117 message = g_mess_header + g_test_case + str(case_no) +
" " 2118 message = message +
"Connecting(in->out, new,NEW), Activate -> send/recv -> Deactivate" 2119 message = message + g_mess_footer
2120 fout.write(message +
'\n')
2129 ret0 = g_out_ports[g_port1].connect(g_conprof1)
2132 ret1 = g_out_ports[g_port2].connect(g_conprof2)
2135 ret2 = g_out_ports[g_port3].connect(g_conprof3)
2137 for i
in range(loop_count):
2143 ec_recv[0].activate_component(g_compo_recv.rtc_ref)
2144 time.sleep(sleep_recv_act_time)
2145 ec_send[0].activate_component(g_compo_send.rtc_ref)
2147 time.sleep(sleep_act_time)
2150 ec_send[0].deactivate_component(g_compo_send.rtc_ref)
2151 ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
2154 if os.path.isfile(g_diff_recv_file) ==
False:
2155 fout = open(g_test_result_file,
'a')
2156 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
2157 message = message + g_check_message
2158 fout.write(message +
'\n')
2161 time.sleep(sleep_for_time)
2165 time.sleep(sleep_act_time)
2169 fout = open(g_test_result_file,
'a')
2170 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
2174 message = message + g_test_ok
2176 fout.write(message +
'\n')
2179 message = message + g_test_ng
2181 message = message + g_test_ng_message
2182 fout.write(message +
'\n')
2184 fin2 = open(g_diff_recv_file,
'r') while(1): 2185 s2 = fin2.readline() 2192 time.sleep(sleep_for_time)
2195 g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
2196 g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
2197 g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
2202 case_no = case_no + 1
2203 fout = open(g_test_result_file,
'a')
2204 message = g_mess_header + g_test_case + str(case_no) +
" " 2205 message = message +
"Connecting(in->out, new,SKIP), Activate -> send/recv -> Deactivate" 2206 message = message + g_mess_footer
2207 fout.write(message +
'\n')
2216 ret0 = g_out_ports[g_port1].connect(g_conprof1)
2219 ret1 = g_out_ports[g_port2].connect(g_conprof2)
2222 ret2 = g_out_ports[g_port3].connect(g_conprof3)
2224 for i
in range(loop_count):
2230 ec_recv[0].activate_component(g_compo_recv.rtc_ref)
2231 time.sleep(sleep_recv_act_time)
2232 ec_send[0].activate_component(g_compo_send.rtc_ref)
2234 time.sleep(sleep_act_time)
2237 ec_send[0].deactivate_component(g_compo_send.rtc_ref)
2238 ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
2241 if os.path.isfile(g_diff_recv_file) ==
False:
2242 fout = open(g_test_result_file,
'a')
2243 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
2244 message = message + g_check_message
2245 fout.write(message +
'\n')
2248 time.sleep(sleep_for_time)
2252 time.sleep(sleep_act_time)
2256 fout = open(g_test_result_file,
'a')
2257 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
2261 message = message + g_test_ok
2263 fout.write(message +
'\n')
2266 message = message + g_test_ng
2268 message = message + g_test_ng_message
2269 fout.write(message +
'\n')
2271 fin2 = open(g_diff_recv_file,
'r') while(1): 2272 s2 = fin2.readline() 2279 time.sleep(sleep_for_time)
2282 g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
2283 g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
2284 g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
2289 case_no = case_no + 1
2290 fout = open(g_test_result_file,
'a')
2291 message = g_mess_header + g_test_case + str(case_no) +
" " 2292 message = message +
"Connect(out->in, new,ALL) -> Activate -> send/recv -> Deactivate -> Disconnect" 2293 message = message + g_mess_footer
2294 fout.write(message +
'\n')
2298 for i
in range(loop_count):
2308 ret0 = g_out_ports[g_port1].connect(g_conprof1)
2311 ret1 = g_out_ports[g_port2].connect(g_conprof2)
2314 ret2 = g_out_ports[g_port3].connect(g_conprof3)
2317 ec_recv[0].activate_component(g_compo_recv.rtc_ref)
2318 time.sleep(sleep_recv_act_time)
2319 ec_send[0].activate_component(g_compo_send.rtc_ref)
2321 time.sleep(sleep_act_time)
2324 ec_send[0].deactivate_component(g_compo_send.rtc_ref)
2325 ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
2328 g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
2329 g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
2330 g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
2333 if os.path.isfile(g_diff_recv_file) ==
False:
2334 fout = open(g_test_result_file,
'a')
2335 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
2336 message = message + g_check_message
2337 fout.write(message +
'\n')
2340 time.sleep(sleep_for_time)
2344 time.sleep(sleep_act_time)
2348 fout = open(g_test_result_file,
'a')
2349 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
2353 message = message + g_test_ok
2355 fout.write(message +
'\n')
2358 message = message + g_test_ng
2360 message = message + g_test_ng_message
2361 fout.write(message +
'\n')
2363 fin2 = open(g_diff_recv_file,
'r') while(1): 2364 s2 = fin2.readline() 2371 time.sleep(sleep_for_time)
2376 case_no = case_no + 1
2377 fout = open(g_test_result_file,
'a')
2378 message = g_mess_header + g_test_case + str(case_no) +
" " 2379 message = message +
"Connect(out->in, new,FIFO) -> Activate -> send/recv -> Deactivate -> Disconnect" 2380 message = message + g_mess_footer
2381 fout.write(message +
'\n')
2385 for i
in range(loop_count):
2395 ret0 = g_out_ports[g_port1].connect(g_conprof1)
2398 ret1 = g_out_ports[g_port2].connect(g_conprof2)
2401 ret2 = g_out_ports[g_port3].connect(g_conprof3)
2404 ec_recv[0].activate_component(g_compo_recv.rtc_ref)
2405 time.sleep(sleep_recv_act_time)
2406 ec_send[0].activate_component(g_compo_send.rtc_ref)
2408 time.sleep(sleep_act_time)
2411 ec_send[0].deactivate_component(g_compo_send.rtc_ref)
2412 ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
2415 g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
2416 g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
2417 g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
2420 if os.path.isfile(g_diff_recv_file) ==
False:
2421 fout = open(g_test_result_file,
'a')
2422 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
2423 message = message + g_check_message
2424 fout.write(message +
'\n')
2427 time.sleep(sleep_for_time)
2431 time.sleep(sleep_act_time)
2435 fout = open(g_test_result_file,
'a')
2436 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
2440 message = message + g_test_ok
2442 fout.write(message +
'\n')
2445 message = message + g_test_ng
2447 message = message + g_test_ng_message
2448 fout.write(message +
'\n')
2450 fin2 = open(g_diff_recv_file,
'r') while(1): 2451 s2 = fin2.readline() 2458 time.sleep(sleep_for_time)
2463 case_no = case_no + 1
2464 fout = open(g_test_result_file,
'a')
2465 message = g_mess_header + g_test_case + str(case_no) +
" " 2466 message = message +
"Connect(out->in, new,NEW) -> Activate -> send/recv -> Deactivate -> Disconnect" 2467 message = message + g_mess_footer
2468 fout.write(message +
'\n')
2472 for i
in range(loop_count):
2482 ret0 = g_out_ports[g_port1].connect(g_conprof1)
2485 ret1 = g_out_ports[g_port2].connect(g_conprof2)
2488 ret2 = g_out_ports[g_port3].connect(g_conprof3)
2491 ec_recv[0].activate_component(g_compo_recv.rtc_ref)
2492 time.sleep(sleep_recv_act_time)
2493 ec_send[0].activate_component(g_compo_send.rtc_ref)
2495 time.sleep(sleep_act_time)
2498 ec_send[0].deactivate_component(g_compo_send.rtc_ref)
2499 ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
2502 g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
2503 g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
2504 g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
2507 if os.path.isfile(g_diff_recv_file) ==
False:
2508 fout = open(g_test_result_file,
'a')
2509 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
2510 message = message + g_check_message
2511 fout.write(message +
'\n')
2514 time.sleep(sleep_for_time)
2518 time.sleep(sleep_act_time)
2522 fout = open(g_test_result_file,
'a')
2523 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
2527 message = message + g_test_ok
2529 fout.write(message +
'\n')
2532 message = message + g_test_ng
2534 message = message + g_test_ng_message
2535 fout.write(message +
'\n')
2537 fin2 = open(g_diff_recv_file,
'r') while(1): 2538 s2 = fin2.readline() 2545 time.sleep(sleep_for_time)
2550 case_no = case_no + 1
2551 fout = open(g_test_result_file,
'a')
2552 message = g_mess_header + g_test_case + str(case_no) +
" " 2553 message = message +
"Connect(out->in, new,SKIP) -> Activate -> send/recv -> Deactivate -> Disconnect" 2554 message = message + g_mess_footer
2555 fout.write(message +
'\n')
2559 for i
in range(loop_count):
2569 ret0 = g_out_ports[g_port1].connect(g_conprof1)
2572 ret1 = g_out_ports[g_port2].connect(g_conprof2)
2575 ret2 = g_out_ports[g_port3].connect(g_conprof3)
2578 ec_recv[0].activate_component(g_compo_recv.rtc_ref)
2579 time.sleep(sleep_recv_act_time)
2580 ec_send[0].activate_component(g_compo_send.rtc_ref)
2582 time.sleep(sleep_act_time)
2585 ec_send[0].deactivate_component(g_compo_send.rtc_ref)
2586 ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
2589 g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
2590 g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
2591 g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
2594 if os.path.isfile(g_diff_recv_file) ==
False:
2595 fout = open(g_test_result_file,
'a')
2596 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
2597 message = message + g_check_message
2598 fout.write(message +
'\n')
2601 time.sleep(sleep_for_time)
2605 time.sleep(sleep_act_time)
2609 fout = open(g_test_result_file,
'a')
2610 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
2614 message = message + g_test_ok
2616 fout.write(message +
'\n')
2619 message = message + g_test_ng
2621 message = message + g_test_ng_message
2622 fout.write(message +
'\n')
2624 fin2 = open(g_diff_recv_file,
'r') while(1): 2625 s2 = fin2.readline() 2632 time.sleep(sleep_for_time)
2637 case_no = case_no + 1
2638 fout = open(g_test_result_file,
'a')
2639 message = g_mess_header + g_test_case + str(case_no) +
" " 2640 message = message +
"Connect(in->out, new,ALL) -> Activate -> send/recv -> Deactivate -> Disconnect" 2641 message = message + g_mess_footer
2642 fout.write(message +
'\n')
2646 for i
in range(loop_count):
2656 ret0 = g_out_ports[g_port1].connect(g_conprof1)
2659 ret1 = g_out_ports[g_port2].connect(g_conprof2)
2662 ret2 = g_out_ports[g_port3].connect(g_conprof3)
2665 ec_recv[0].activate_component(g_compo_recv.rtc_ref)
2666 time.sleep(sleep_recv_act_time)
2667 ec_send[0].activate_component(g_compo_send.rtc_ref)
2669 time.sleep(sleep_act_time)
2672 ec_send[0].deactivate_component(g_compo_send.rtc_ref)
2673 ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
2676 g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
2677 g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
2678 g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
2681 if os.path.isfile(g_diff_recv_file) ==
False:
2682 fout = open(g_test_result_file,
'a')
2683 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
2684 message = message + g_check_message
2685 fout.write(message +
'\n')
2688 time.sleep(sleep_for_time)
2692 time.sleep(sleep_act_time)
2696 fout = open(g_test_result_file,
'a')
2697 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
2701 message = message + g_test_ok
2703 fout.write(message +
'\n')
2706 message = message + g_test_ng
2708 message = message + g_test_ng_message
2709 fout.write(message +
'\n')
2711 fin2 = open(g_diff_recv_file,
'r') while(1): 2712 s2 = fin2.readline() 2719 time.sleep(sleep_for_time)
2724 case_no = case_no + 1
2725 fout = open(g_test_result_file,
'a')
2726 message = g_mess_header + g_test_case + str(case_no) +
" " 2727 message = message +
"Connect(in->out, new,FIFO) -> Activate -> send/recv -> Deactivate -> Disconnect" 2728 message = message + g_mess_footer
2729 fout.write(message +
'\n')
2733 for i
in range(loop_count):
2743 ret0 = g_out_ports[g_port1].connect(g_conprof1)
2746 ret1 = g_out_ports[g_port2].connect(g_conprof2)
2749 ret2 = g_out_ports[g_port3].connect(g_conprof3)
2752 ec_recv[0].activate_component(g_compo_recv.rtc_ref)
2753 time.sleep(sleep_recv_act_time)
2754 ec_send[0].activate_component(g_compo_send.rtc_ref)
2756 time.sleep(sleep_act_time)
2759 ec_send[0].deactivate_component(g_compo_send.rtc_ref)
2760 ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
2763 g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
2764 g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
2765 g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
2768 if os.path.isfile(g_diff_recv_file) ==
False:
2769 fout = open(g_test_result_file,
'a')
2770 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
2771 message = message + g_check_message
2772 fout.write(message +
'\n')
2775 time.sleep(sleep_for_time)
2779 time.sleep(sleep_act_time)
2783 fout = open(g_test_result_file,
'a')
2784 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
2788 message = message + g_test_ok
2790 fout.write(message +
'\n')
2793 message = message + g_test_ng
2795 message = message + g_test_ng_message
2796 fout.write(message +
'\n')
2798 fin2 = open(g_diff_recv_file,
'r') while(1): 2799 s2 = fin2.readline() 2806 time.sleep(sleep_for_time)
2811 case_no = case_no + 1
2812 fout = open(g_test_result_file,
'a')
2813 message = g_mess_header + g_test_case + str(case_no) +
" " 2814 message = message +
"Connect(in->out, new,NEW) -> Activate -> send/recv -> Deactivate -> Disconnect" 2815 message = message + g_mess_footer
2816 fout.write(message +
'\n')
2820 for i
in range(loop_count):
2830 ret0 = g_out_ports[g_port1].connect(g_conprof1)
2833 ret1 = g_out_ports[g_port2].connect(g_conprof2)
2836 ret2 = g_out_ports[g_port3].connect(g_conprof3)
2839 ec_recv[0].activate_component(g_compo_recv.rtc_ref)
2840 time.sleep(sleep_recv_act_time)
2841 ec_send[0].activate_component(g_compo_send.rtc_ref)
2843 time.sleep(sleep_act_time)
2846 ec_send[0].deactivate_component(g_compo_send.rtc_ref)
2847 ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
2850 g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
2851 g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
2852 g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
2855 if os.path.isfile(g_diff_recv_file) ==
False:
2856 fout = open(g_test_result_file,
'a')
2857 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
2858 message = message + g_check_message
2859 fout.write(message +
'\n')
2862 time.sleep(sleep_for_time)
2866 time.sleep(sleep_act_time)
2870 fout = open(g_test_result_file,
'a')
2871 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
2875 message = message + g_test_ok
2877 fout.write(message +
'\n')
2880 message = message + g_test_ng
2882 message = message + g_test_ng_message
2883 fout.write(message +
'\n')
2885 fin2 = open(g_diff_recv_file,
'r') while(1): 2886 s2 = fin2.readline() 2893 time.sleep(sleep_for_time)
2898 case_no = case_no + 1
2899 fout = open(g_test_result_file,
'a')
2900 message = g_mess_header + g_test_case + str(case_no) +
" " 2901 message = message +
"Connect(in->out, new,SKIP) -> Activate -> send/recv -> Deactivate -> Disconnect" 2902 message = message + g_mess_footer
2903 fout.write(message +
'\n')
2907 for i
in range(loop_count):
2917 ret0 = g_out_ports[g_port1].connect(g_conprof1)
2920 ret1 = g_out_ports[g_port2].connect(g_conprof2)
2923 ret2 = g_out_ports[g_port3].connect(g_conprof3)
2926 ec_recv[0].activate_component(g_compo_recv.rtc_ref)
2927 time.sleep(sleep_recv_act_time)
2928 ec_send[0].activate_component(g_compo_send.rtc_ref)
2930 time.sleep(sleep_act_time)
2933 ec_send[0].deactivate_component(g_compo_send.rtc_ref)
2934 ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
2937 g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
2938 g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
2939 g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
2942 if os.path.isfile(g_diff_recv_file) ==
False:
2943 fout = open(g_test_result_file,
'a')
2944 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
2945 message = message + g_check_message
2946 fout.write(message +
'\n')
2949 time.sleep(sleep_for_time)
2953 time.sleep(sleep_act_time)
2957 fout = open(g_test_result_file,
'a')
2958 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
2962 message = message + g_test_ok
2964 fout.write(message +
'\n')
2967 message = message + g_test_ng
2969 message = message + g_test_ng_message
2970 fout.write(message +
'\n')
2972 fin2 = open(g_diff_recv_file,
'r') while(1): 2973 s2 = fin2.readline() 2980 time.sleep(sleep_for_time)
2986 case_no = case_no + 1
2987 fout = open(g_test_result_file,
'a')
2988 message = g_mess_header + g_test_case + str(case_no) +
" " 2989 message = message +
"Connect(out->in, periodic,ALL) -> Disconnect" 2990 message = message + g_mess_footer
2991 fout.write(message +
'\n')
2995 for i
in range(loop_count):
3002 ret0 = g_out_ports[g_port1].connect(g_conprof1)
3005 ret1 = g_out_ports[g_port2].connect(g_conprof2)
3008 ret2 = g_out_ports[g_port3].connect(g_conprof3)
3010 time.sleep(sleep_connect_time)
3013 g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
3014 g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
3015 g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
3018 fout = open(g_test_result_file,
'a')
3019 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
3020 message = message + g_test_ok
3022 fout.write(message +
'\n')
3025 time.sleep(sleep_for_time)
3030 case_no = case_no + 1
3031 fout = open(g_test_result_file,
'a')
3032 message = g_mess_header + g_test_case + str(case_no) +
" " 3033 message = message +
"Connect(out->in, periodic,FIFO) -> Disconnect" 3034 message = message + g_mess_footer
3035 fout.write(message +
'\n')
3039 for i
in range(loop_count):
3046 ret0 = g_out_ports[g_port1].connect(g_conprof1)
3049 ret1 = g_out_ports[g_port2].connect(g_conprof2)
3052 ret2 = g_out_ports[g_port3].connect(g_conprof3)
3054 time.sleep(sleep_connect_time)
3057 g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
3058 g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
3059 g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
3062 fout = open(g_test_result_file,
'a')
3063 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
3064 message = message + g_test_ok
3066 fout.write(message +
'\n')
3069 time.sleep(sleep_for_time)
3074 case_no = case_no + 1
3075 fout = open(g_test_result_file,
'a')
3076 message = g_mess_header + g_test_case + str(case_no) +
" " 3077 message = message +
"Connect(out->in, periodic,NEW) -> Disconnect" 3078 message = message + g_mess_footer
3079 fout.write(message +
'\n')
3083 for i
in range(loop_count):
3090 ret0 = g_out_ports[g_port1].connect(g_conprof1)
3093 ret1 = g_out_ports[g_port2].connect(g_conprof2)
3096 ret2 = g_out_ports[g_port3].connect(g_conprof3)
3098 time.sleep(sleep_connect_time)
3101 g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
3102 g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
3103 g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
3106 fout = open(g_test_result_file,
'a')
3107 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
3108 message = message + g_test_ok
3110 fout.write(message +
'\n')
3113 time.sleep(sleep_for_time)
3118 case_no = case_no + 1
3119 fout = open(g_test_result_file,
'a')
3120 message = g_mess_header + g_test_case + str(case_no) +
" " 3121 message = message +
"Connect(out->in, periodic,SKIP) -> Disconnect" 3122 message = message + g_mess_footer
3123 fout.write(message +
'\n')
3127 for i
in range(loop_count):
3134 ret0 = g_out_ports[g_port1].connect(g_conprof1)
3137 ret1 = g_out_ports[g_port2].connect(g_conprof2)
3140 ret2 = g_out_ports[g_port3].connect(g_conprof3)
3142 time.sleep(sleep_connect_time)
3145 g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
3146 g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
3147 g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
3150 fout = open(g_test_result_file,
'a')
3151 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
3152 message = message + g_test_ok
3154 fout.write(message +
'\n')
3157 time.sleep(sleep_for_time)
3162 case_no = case_no + 1
3163 fout = open(g_test_result_file,
'a')
3164 message = g_mess_header + g_test_case + str(case_no) +
" " 3165 message = message +
"Connect(in->out, periodic,ALL) -> Disconnect" 3166 message = message + g_mess_footer
3167 fout.write(message +
'\n')
3171 for i
in range(loop_count):
3178 ret0 = g_out_ports[g_port1].connect(g_conprof1)
3181 ret1 = g_out_ports[g_port2].connect(g_conprof2)
3184 ret2 = g_out_ports[g_port3].connect(g_conprof3)
3186 time.sleep(sleep_connect_time)
3189 g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
3190 g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
3191 g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
3194 fout = open(g_test_result_file,
'a')
3195 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
3196 message = message + g_test_ok
3198 fout.write(message +
'\n')
3201 time.sleep(sleep_for_time)
3206 case_no = case_no + 1
3207 fout = open(g_test_result_file,
'a')
3208 message = g_mess_header + g_test_case + str(case_no) +
" " 3209 message = message +
"Connect(in->out, periodic,FIFO) -> Disconnect" 3210 message = message + g_mess_footer
3211 fout.write(message +
'\n')
3215 for i
in range(loop_count):
3222 ret0 = g_out_ports[g_port1].connect(g_conprof1)
3225 ret1 = g_out_ports[g_port2].connect(g_conprof2)
3228 ret2 = g_out_ports[g_port3].connect(g_conprof3)
3230 time.sleep(sleep_connect_time)
3233 g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
3234 g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
3235 g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
3238 fout = open(g_test_result_file,
'a')
3239 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
3240 message = message + g_test_ok
3242 fout.write(message +
'\n')
3245 time.sleep(sleep_for_time)
3250 case_no = case_no + 1
3251 fout = open(g_test_result_file,
'a')
3252 message = g_mess_header + g_test_case + str(case_no) +
" " 3253 message = message +
"Connect(in->out, periodic,NEW) -> Disconnect" 3254 message = message + g_mess_footer
3255 fout.write(message +
'\n')
3259 for i
in range(loop_count):
3266 ret0 = g_out_ports[g_port1].connect(g_conprof1)
3269 ret1 = g_out_ports[g_port2].connect(g_conprof2)
3272 ret2 = g_out_ports[g_port3].connect(g_conprof3)
3274 time.sleep(sleep_connect_time)
3277 g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
3278 g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
3279 g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
3282 fout = open(g_test_result_file,
'a')
3283 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
3284 message = message + g_test_ok
3286 fout.write(message +
'\n')
3289 time.sleep(sleep_for_time)
3294 case_no = case_no + 1
3295 fout = open(g_test_result_file,
'a')
3296 message = g_mess_header + g_test_case + str(case_no) +
" " 3297 message = message +
"Connect(in->out, periodic,SKIP) -> Disconnect" 3298 message = message + g_mess_footer
3299 fout.write(message +
'\n')
3303 for i
in range(loop_count):
3310 ret0 = g_out_ports[g_port1].connect(g_conprof1)
3313 ret1 = g_out_ports[g_port2].connect(g_conprof2)
3316 ret2 = g_out_ports[g_port3].connect(g_conprof3)
3318 time.sleep(sleep_connect_time)
3321 g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
3322 g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
3323 g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
3326 fout = open(g_test_result_file,
'a')
3327 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
3328 message = message + g_test_ok
3330 fout.write(message +
'\n')
3333 time.sleep(sleep_for_time)
3338 case_no = case_no + 1
3339 fout = open(g_test_result_file,
'a')
3340 message = g_mess_header + g_test_case + str(case_no) +
" " 3341 message = message +
"Connecting(out->in, periodic,ALL), Activate -> send/recv -> Deactivate" 3342 message = message + g_mess_footer
3343 fout.write(message +
'\n')
3352 ret0 = g_out_ports[g_port1].connect(g_conprof1)
3355 ret1 = g_out_ports[g_port2].connect(g_conprof2)
3358 ret2 = g_out_ports[g_port3].connect(g_conprof3)
3360 for i
in range(loop_count):
3366 ec_recv[0].activate_component(g_compo_recv.rtc_ref)
3367 time.sleep(sleep_recv_act_time)
3368 ec_send[0].activate_component(g_compo_send.rtc_ref)
3370 time.sleep(sleep_act_time)
3373 ec_send[0].deactivate_component(g_compo_send.rtc_ref)
3374 ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
3377 if os.path.isfile(g_diff_recv_file) ==
False:
3378 fout = open(g_test_result_file,
'a')
3379 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
3380 message = message + g_check_message
3381 fout.write(message +
'\n')
3384 time.sleep(sleep_for_time)
3388 time.sleep(sleep_act_time)
3392 fout = open(g_test_result_file,
'a')
3393 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
3397 message = message + g_test_ok
3399 fout.write(message +
'\n')
3402 message = message + g_test_ng
3404 message = message + g_test_ng_message
3405 fout.write(message +
'\n')
3407 fin2 = open(g_diff_recv_file,
'r') while(1): 3408 s2 = fin2.readline() 3415 time.sleep(sleep_for_time)
3418 g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
3419 g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
3420 g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
3425 case_no = case_no + 1
3426 fout = open(g_test_result_file,
'a')
3427 message = g_mess_header + g_test_case + str(case_no) +
" " 3428 message = message +
"Connecting(out->in, periodic,FIFO), Activate -> send/recv -> Deactivate" 3429 message = message + g_mess_footer
3430 fout.write(message +
'\n')
3439 ret0 = g_out_ports[g_port1].connect(g_conprof1)
3442 ret1 = g_out_ports[g_port2].connect(g_conprof2)
3445 ret2 = g_out_ports[g_port3].connect(g_conprof3)
3447 for i
in range(loop_count):
3453 ec_recv[0].activate_component(g_compo_recv.rtc_ref)
3454 time.sleep(sleep_recv_act_time)
3455 ec_send[0].activate_component(g_compo_send.rtc_ref)
3457 time.sleep(sleep_act_time)
3460 ec_send[0].deactivate_component(g_compo_send.rtc_ref)
3461 ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
3464 if os.path.isfile(g_diff_recv_file) ==
False:
3465 fout = open(g_test_result_file,
'a')
3466 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
3467 message = message + g_check_message
3468 fout.write(message +
'\n')
3471 time.sleep(sleep_for_time)
3475 time.sleep(sleep_act_time)
3479 fout = open(g_test_result_file,
'a')
3480 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
3484 message = message + g_test_ok
3486 fout.write(message +
'\n')
3489 message = message + g_test_ng
3491 message = message + g_test_ng_message
3492 fout.write(message +
'\n')
3494 fin2 = open(g_diff_recv_file,
'r') while(1): 3495 s2 = fin2.readline() 3502 time.sleep(sleep_for_time)
3505 g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
3506 g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
3507 g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
3512 case_no = case_no + 1
3513 fout = open(g_test_result_file,
'a')
3514 message = g_mess_header + g_test_case + str(case_no) +
" " 3515 message = message +
"Connecting(out->in, periodic,NEW), Activate -> send/recv -> Deactivate" 3516 message = message + g_mess_footer
3517 fout.write(message +
'\n')
3526 ret0 = g_out_ports[g_port1].connect(g_conprof1)
3529 ret1 = g_out_ports[g_port2].connect(g_conprof2)
3532 ret2 = g_out_ports[g_port3].connect(g_conprof3)
3534 for i
in range(loop_count):
3540 ec_recv[0].activate_component(g_compo_recv.rtc_ref)
3541 time.sleep(sleep_recv_act_time)
3542 ec_send[0].activate_component(g_compo_send.rtc_ref)
3544 time.sleep(sleep_act_time)
3547 ec_send[0].deactivate_component(g_compo_send.rtc_ref)
3548 ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
3551 if os.path.isfile(g_diff_recv_file) ==
False:
3552 fout = open(g_test_result_file,
'a')
3553 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
3554 message = message + g_check_message
3555 fout.write(message +
'\n')
3558 time.sleep(sleep_for_time)
3562 time.sleep(sleep_act_time)
3566 fout = open(g_test_result_file,
'a')
3567 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
3571 message = message + g_test_ok
3573 fout.write(message +
'\n')
3576 message = message + g_test_ng
3578 message = message + g_test_ng_message
3579 fout.write(message +
'\n')
3581 fin2 = open(g_diff_recv_file,
'r') while(1): 3582 s2 = fin2.readline() 3589 time.sleep(sleep_for_time)
3592 g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
3593 g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
3594 g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
3599 case_no = case_no + 1
3600 fout = open(g_test_result_file,
'a')
3601 message = g_mess_header + g_test_case + str(case_no) +
" " 3602 message = message +
"Connecting(out->in, periodic,SKIP), Activate -> send/recv -> Deactivate" 3603 message = message + g_mess_footer
3604 fout.write(message +
'\n')
3613 ret0 = g_out_ports[g_port1].connect(g_conprof1)
3616 ret1 = g_out_ports[g_port2].connect(g_conprof2)
3619 ret2 = g_out_ports[g_port3].connect(g_conprof3)
3621 for i
in range(loop_count):
3627 ec_recv[0].activate_component(g_compo_recv.rtc_ref)
3628 time.sleep(sleep_recv_act_time)
3629 ec_send[0].activate_component(g_compo_send.rtc_ref)
3631 time.sleep(sleep_act_time)
3634 ec_send[0].deactivate_component(g_compo_send.rtc_ref)
3635 ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
3638 if os.path.isfile(g_diff_recv_file) ==
False:
3639 fout = open(g_test_result_file,
'a')
3640 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
3641 message = message + g_check_message
3642 fout.write(message +
'\n')
3645 time.sleep(sleep_for_time)
3649 time.sleep(sleep_act_time)
3653 fout = open(g_test_result_file,
'a')
3654 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
3658 message = message + g_test_ok
3660 fout.write(message +
'\n')
3663 message = message + g_test_ng
3665 message = message + g_test_ng_message
3666 fout.write(message +
'\n')
3668 fin2 = open(g_diff_recv_file,
'r') while(1): 3669 s2 = fin2.readline() 3676 time.sleep(sleep_for_time)
3679 g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
3680 g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
3681 g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
3686 case_no = case_no + 1
3687 fout = open(g_test_result_file,
'a')
3688 message = g_mess_header + g_test_case + str(case_no) +
" " 3689 message = message +
"Connecting(in->out, periodic,ALL), Activate -> send/recv -> Deactivate" 3690 message = message + g_mess_footer
3691 fout.write(message +
'\n')
3700 ret0 = g_out_ports[g_port1].connect(g_conprof1)
3703 ret1 = g_out_ports[g_port2].connect(g_conprof2)
3706 ret2 = g_out_ports[g_port3].connect(g_conprof3)
3708 for i
in range(loop_count):
3714 ec_recv[0].activate_component(g_compo_recv.rtc_ref)
3715 time.sleep(sleep_recv_act_time)
3716 ec_send[0].activate_component(g_compo_send.rtc_ref)
3718 time.sleep(sleep_act_time)
3721 ec_send[0].deactivate_component(g_compo_send.rtc_ref)
3722 ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
3725 if os.path.isfile(g_diff_recv_file) ==
False:
3726 fout = open(g_test_result_file,
'a')
3727 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
3728 message = message + g_check_message
3729 fout.write(message +
'\n')
3732 time.sleep(sleep_for_time)
3736 time.sleep(sleep_act_time)
3740 fout = open(g_test_result_file,
'a')
3741 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
3745 message = message + g_test_ok
3747 fout.write(message +
'\n')
3750 message = message + g_test_ng
3752 message = message + g_test_ng_message
3753 fout.write(message +
'\n')
3755 fin2 = open(g_diff_recv_file,
'r') while(1): 3756 s2 = fin2.readline() 3763 time.sleep(sleep_for_time)
3766 g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
3767 g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
3768 g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
3773 case_no = case_no + 1
3774 fout = open(g_test_result_file,
'a')
3775 message = g_mess_header + g_test_case + str(case_no) +
" " 3776 message = message +
"Connecting(in->out, periodic,FIFO), Activate -> send/recv -> Deactivate" 3777 message = message + g_mess_footer
3778 fout.write(message +
'\n')
3787 ret0 = g_out_ports[g_port1].connect(g_conprof1)
3790 ret1 = g_out_ports[g_port2].connect(g_conprof2)
3793 ret2 = g_out_ports[g_port3].connect(g_conprof3)
3795 for i
in range(loop_count):
3801 ec_recv[0].activate_component(g_compo_recv.rtc_ref)
3802 time.sleep(sleep_recv_act_time)
3803 ec_send[0].activate_component(g_compo_send.rtc_ref)
3805 time.sleep(sleep_act_time)
3808 ec_send[0].deactivate_component(g_compo_send.rtc_ref)
3809 ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
3812 if os.path.isfile(g_diff_recv_file) ==
False:
3813 fout = open(g_test_result_file,
'a')
3814 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
3815 message = message + g_check_message
3816 fout.write(message +
'\n')
3819 time.sleep(sleep_for_time)
3823 time.sleep(sleep_act_time)
3827 fout = open(g_test_result_file,
'a')
3828 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
3832 message = message + g_test_ok
3834 fout.write(message +
'\n')
3837 message = message + g_test_ng
3839 message = message + g_test_ng_message
3840 fout.write(message +
'\n')
3842 fin2 = open(g_diff_recv_file,
'r') while(1): 3843 s2 = fin2.readline() 3850 time.sleep(sleep_for_time)
3853 g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
3854 g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
3855 g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
3860 case_no = case_no + 1
3861 fout = open(g_test_result_file,
'a')
3862 message = g_mess_header + g_test_case + str(case_no) +
" " 3863 message = message +
"Connecting(in->out, periodic,NEW), Activate -> send/recv -> Deactivate" 3864 message = message + g_mess_footer
3865 fout.write(message +
'\n')
3874 ret0 = g_out_ports[g_port1].connect(g_conprof1)
3877 ret1 = g_out_ports[g_port2].connect(g_conprof2)
3880 ret2 = g_out_ports[g_port3].connect(g_conprof3)
3882 for i
in range(loop_count):
3888 ec_recv[0].activate_component(g_compo_recv.rtc_ref)
3889 time.sleep(sleep_recv_act_time)
3890 ec_send[0].activate_component(g_compo_send.rtc_ref)
3892 time.sleep(sleep_act_time)
3895 ec_send[0].deactivate_component(g_compo_send.rtc_ref)
3896 ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
3899 if os.path.isfile(g_diff_recv_file) ==
False:
3900 fout = open(g_test_result_file,
'a')
3901 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
3902 message = message + g_check_message
3903 fout.write(message +
'\n')
3906 time.sleep(sleep_for_time)
3910 time.sleep(sleep_act_time)
3914 fout = open(g_test_result_file,
'a')
3915 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
3919 message = message + g_test_ok
3921 fout.write(message +
'\n')
3924 message = message + g_test_ng
3926 message = message + g_test_ng_message
3927 fout.write(message +
'\n')
3929 fin2 = open(g_diff_recv_file,
'r') while(1): 3930 s2 = fin2.readline() 3937 time.sleep(sleep_for_time)
3940 g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
3941 g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
3942 g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
3947 case_no = case_no + 1
3948 fout = open(g_test_result_file,
'a')
3949 message = g_mess_header + g_test_case + str(case_no) +
" " 3950 message = message +
"Connecting(in->out, periodic,SKIP), Activate -> send/recv -> Deactivate" 3951 message = message + g_mess_footer
3952 fout.write(message +
'\n')
3961 ret0 = g_out_ports[g_port1].connect(g_conprof1)
3964 ret1 = g_out_ports[g_port2].connect(g_conprof2)
3967 ret2 = g_out_ports[g_port3].connect(g_conprof3)
3969 for i
in range(loop_count):
3975 ec_recv[0].activate_component(g_compo_recv.rtc_ref)
3976 time.sleep(sleep_recv_act_time)
3977 ec_send[0].activate_component(g_compo_send.rtc_ref)
3979 time.sleep(sleep_act_time)
3982 ec_send[0].deactivate_component(g_compo_send.rtc_ref)
3983 ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
3986 if os.path.isfile(g_diff_recv_file) ==
False:
3987 fout = open(g_test_result_file,
'a')
3988 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
3989 message = message + g_check_message
3990 fout.write(message +
'\n')
3993 time.sleep(sleep_for_time)
3997 time.sleep(sleep_act_time)
4001 fout = open(g_test_result_file,
'a')
4002 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
4006 message = message + g_test_ok
4008 fout.write(message +
'\n')
4011 message = message + g_test_ng
4013 message = message + g_test_ng_message
4014 fout.write(message +
'\n')
4016 fin2 = open(g_diff_recv_file,
'r') while(1): 4017 s2 = fin2.readline() 4024 time.sleep(sleep_for_time)
4027 g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
4028 g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
4029 g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
4034 case_no = case_no + 1
4035 fout = open(g_test_result_file,
'a')
4036 message = g_mess_header + g_test_case + str(case_no) +
" " 4037 message = message +
"Connect(out->in, periodic,ALL) -> Activate -> send/recv -> Deactivate -> Disconnect" 4038 message = message + g_mess_footer
4039 fout.write(message +
'\n')
4043 for i
in range(loop_count):
4053 ret0 = g_out_ports[g_port1].connect(g_conprof1)
4056 ret1 = g_out_ports[g_port2].connect(g_conprof2)
4059 ret2 = g_out_ports[g_port3].connect(g_conprof3)
4062 ec_recv[0].activate_component(g_compo_recv.rtc_ref)
4063 time.sleep(sleep_recv_act_time)
4064 ec_send[0].activate_component(g_compo_send.rtc_ref)
4066 time.sleep(sleep_act_time)
4069 ec_send[0].deactivate_component(g_compo_send.rtc_ref)
4070 ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
4073 g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
4074 g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
4075 g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
4078 if os.path.isfile(g_diff_recv_file) ==
False:
4079 fout = open(g_test_result_file,
'a')
4080 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
4081 message = message + g_check_message
4082 fout.write(message +
'\n')
4085 time.sleep(sleep_for_time)
4089 time.sleep(sleep_act_time)
4093 fout = open(g_test_result_file,
'a')
4094 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
4098 message = message + g_test_ok
4100 fout.write(message +
'\n')
4103 message = message + g_test_ng
4105 message = message + g_test_ng_message
4106 fout.write(message +
'\n')
4108 fin2 = open(g_diff_recv_file,
'r') while(1): 4109 s2 = fin2.readline() 4116 time.sleep(sleep_for_time)
4121 case_no = case_no + 1
4122 fout = open(g_test_result_file,
'a')
4123 message = g_mess_header + g_test_case + str(case_no) +
" " 4124 message = message +
"Connect(out->in, periodic,FIFO) -> Activate -> send/recv -> Deactivate -> Disconnect" 4125 message = message + g_mess_footer
4126 fout.write(message +
'\n')
4130 for i
in range(loop_count):
4140 ret0 = g_out_ports[g_port1].connect(g_conprof1)
4143 ret1 = g_out_ports[g_port2].connect(g_conprof2)
4146 ret2 = g_out_ports[g_port3].connect(g_conprof3)
4149 ec_recv[0].activate_component(g_compo_recv.rtc_ref)
4150 time.sleep(sleep_recv_act_time)
4151 ec_send[0].activate_component(g_compo_send.rtc_ref)
4153 time.sleep(sleep_act_time)
4156 ec_send[0].deactivate_component(g_compo_send.rtc_ref)
4157 ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
4160 g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
4161 g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
4162 g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
4165 if os.path.isfile(g_diff_recv_file) ==
False:
4166 fout = open(g_test_result_file,
'a')
4167 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
4168 message = message + g_check_message
4169 fout.write(message +
'\n')
4172 time.sleep(sleep_for_time)
4176 time.sleep(sleep_act_time)
4180 fout = open(g_test_result_file,
'a')
4181 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
4185 message = message + g_test_ok
4187 fout.write(message +
'\n')
4190 message = message + g_test_ng
4192 message = message + g_test_ng_message
4193 fout.write(message +
'\n')
4195 fin2 = open(g_diff_recv_file,
'r') while(1): 4196 s2 = fin2.readline() 4203 time.sleep(sleep_for_time)
4208 case_no = case_no + 1
4209 fout = open(g_test_result_file,
'a')
4210 message = g_mess_header + g_test_case + str(case_no) +
" " 4211 message = message +
"Connect(out->in, periodic,NEW) -> Activate -> send/recv -> Deactivate -> Disconnect" 4212 message = message + g_mess_footer
4213 fout.write(message +
'\n')
4217 for i
in range(loop_count):
4227 ret0 = g_out_ports[g_port1].connect(g_conprof1)
4230 ret1 = g_out_ports[g_port2].connect(g_conprof2)
4233 ret2 = g_out_ports[g_port3].connect(g_conprof3)
4236 ec_recv[0].activate_component(g_compo_recv.rtc_ref)
4237 time.sleep(sleep_recv_act_time)
4238 ec_send[0].activate_component(g_compo_send.rtc_ref)
4240 time.sleep(sleep_act_time)
4243 ec_send[0].deactivate_component(g_compo_send.rtc_ref)
4244 ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
4247 g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
4248 g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
4249 g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
4252 if os.path.isfile(g_diff_recv_file) ==
False:
4253 fout = open(g_test_result_file,
'a')
4254 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
4255 message = message + g_check_message
4256 fout.write(message +
'\n')
4259 time.sleep(sleep_for_time)
4263 time.sleep(sleep_act_time)
4267 fout = open(g_test_result_file,
'a')
4268 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
4272 message = message + g_test_ok
4274 fout.write(message +
'\n')
4277 message = message + g_test_ng
4279 message = message + g_test_ng_message
4280 fout.write(message +
'\n')
4282 fin2 = open(g_diff_recv_file,
'r') while(1): 4283 s2 = fin2.readline() 4290 time.sleep(sleep_for_time)
4295 case_no = case_no + 1
4296 fout = open(g_test_result_file,
'a')
4297 message = g_mess_header + g_test_case + str(case_no) +
" " 4298 message = message +
"Connect(out->in, periodic,SKIP) -> Activate -> send/recv -> Deactivate -> Disconnect" 4299 message = message + g_mess_footer
4300 fout.write(message +
'\n')
4304 for i
in range(loop_count):
4314 ret0 = g_out_ports[g_port1].connect(g_conprof1)
4317 ret1 = g_out_ports[g_port2].connect(g_conprof2)
4320 ret2 = g_out_ports[g_port3].connect(g_conprof3)
4323 ec_recv[0].activate_component(g_compo_recv.rtc_ref)
4324 time.sleep(sleep_recv_act_time)
4325 ec_send[0].activate_component(g_compo_send.rtc_ref)
4327 time.sleep(sleep_act_time)
4330 ec_send[0].deactivate_component(g_compo_send.rtc_ref)
4331 ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
4334 g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
4335 g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
4336 g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
4339 if os.path.isfile(g_diff_recv_file) ==
False:
4340 fout = open(g_test_result_file,
'a')
4341 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
4342 message = message + g_check_message
4343 fout.write(message +
'\n')
4346 time.sleep(sleep_for_time)
4350 time.sleep(sleep_act_time)
4354 fout = open(g_test_result_file,
'a')
4355 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
4359 message = message + g_test_ok
4361 fout.write(message +
'\n')
4364 message = message + g_test_ng
4366 message = message + g_test_ng_message
4367 fout.write(message +
'\n')
4369 fin2 = open(g_diff_recv_file,
'r') while(1): 4370 s2 = fin2.readline() 4377 time.sleep(sleep_for_time)
4382 case_no = case_no + 1
4383 fout = open(g_test_result_file,
'a')
4384 message = g_mess_header + g_test_case + str(case_no) +
" " 4385 message = message +
"Connect(in->out, periodic,ALL) -> Activate -> send/recv -> Deactivate -> Disconnect" 4386 message = message + g_mess_footer
4387 fout.write(message +
'\n')
4391 for i
in range(loop_count):
4401 ret0 = g_out_ports[g_port1].connect(g_conprof1)
4404 ret1 = g_out_ports[g_port2].connect(g_conprof2)
4407 ret2 = g_out_ports[g_port3].connect(g_conprof3)
4410 ec_recv[0].activate_component(g_compo_recv.rtc_ref)
4411 time.sleep(sleep_recv_act_time)
4412 ec_send[0].activate_component(g_compo_send.rtc_ref)
4414 time.sleep(sleep_act_time)
4417 ec_send[0].deactivate_component(g_compo_send.rtc_ref)
4418 ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
4421 g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
4422 g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
4423 g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
4426 if os.path.isfile(g_diff_recv_file) ==
False:
4427 fout = open(g_test_result_file,
'a')
4428 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
4429 message = message + g_check_message
4430 fout.write(message +
'\n')
4433 time.sleep(sleep_for_time)
4437 time.sleep(sleep_act_time)
4441 fout = open(g_test_result_file,
'a')
4442 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
4446 message = message + g_test_ok
4448 fout.write(message +
'\n')
4451 message = message + g_test_ng
4453 message = message + g_test_ng_message
4454 fout.write(message +
'\n')
4456 fin2 = open(g_diff_recv_file,
'r') while(1): 4457 s2 = fin2.readline() 4464 time.sleep(sleep_for_time)
4469 case_no = case_no + 1
4470 fout = open(g_test_result_file,
'a')
4471 message = g_mess_header + g_test_case + str(case_no) +
" " 4472 message = message +
"Connect(in->out, periodic,FIFO) -> Activate -> send/recv -> Deactivate -> Disconnect" 4473 message = message + g_mess_footer
4474 fout.write(message +
'\n')
4478 for i
in range(loop_count):
4488 ret0 = g_out_ports[g_port1].connect(g_conprof1)
4491 ret1 = g_out_ports[g_port2].connect(g_conprof2)
4494 ret2 = g_out_ports[g_port3].connect(g_conprof3)
4497 ec_recv[0].activate_component(g_compo_recv.rtc_ref)
4498 time.sleep(sleep_recv_act_time)
4499 ec_send[0].activate_component(g_compo_send.rtc_ref)
4501 time.sleep(sleep_act_time)
4504 ec_send[0].deactivate_component(g_compo_send.rtc_ref)
4505 ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
4508 g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
4509 g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
4510 g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
4513 if os.path.isfile(g_diff_recv_file) ==
False:
4514 fout = open(g_test_result_file,
'a')
4515 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
4516 message = message + g_check_message
4517 fout.write(message +
'\n')
4520 time.sleep(sleep_for_time)
4524 time.sleep(sleep_act_time)
4528 fout = open(g_test_result_file,
'a')
4529 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
4533 message = message + g_test_ok
4535 fout.write(message +
'\n')
4538 message = message + g_test_ng
4540 message = message + g_test_ng_message
4541 fout.write(message +
'\n')
4543 fin2 = open(g_diff_recv_file,
'r') while(1): 4544 s2 = fin2.readline() 4551 time.sleep(sleep_for_time)
4556 case_no = case_no + 1
4557 fout = open(g_test_result_file,
'a')
4558 message = g_mess_header + g_test_case + str(case_no) +
" " 4559 message = message +
"Connect(in->out, periodic,NEW) -> Activate -> send/recv -> Deactivate -> Disconnect" 4560 message = message + g_mess_footer
4561 fout.write(message +
'\n')
4565 for i
in range(loop_count):
4575 ret0 = g_out_ports[g_port1].connect(g_conprof1)
4578 ret1 = g_out_ports[g_port2].connect(g_conprof2)
4581 ret2 = g_out_ports[g_port3].connect(g_conprof3)
4584 ec_recv[0].activate_component(g_compo_recv.rtc_ref)
4585 time.sleep(sleep_recv_act_time)
4586 ec_send[0].activate_component(g_compo_send.rtc_ref)
4588 time.sleep(sleep_act_time)
4591 ec_send[0].deactivate_component(g_compo_send.rtc_ref)
4592 ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
4595 g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
4596 g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
4597 g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
4600 if os.path.isfile(g_diff_recv_file) ==
False:
4601 fout = open(g_test_result_file,
'a')
4602 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
4603 message = message + g_check_message
4604 fout.write(message +
'\n')
4607 time.sleep(sleep_for_time)
4611 time.sleep(sleep_act_time)
4615 fout = open(g_test_result_file,
'a')
4616 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
4620 message = message + g_test_ok
4622 fout.write(message +
'\n')
4625 message = message + g_test_ng
4627 message = message + g_test_ng_message
4628 fout.write(message +
'\n')
4630 fin2 = open(g_diff_recv_file,
'r') while(1): 4631 s2 = fin2.readline() 4638 time.sleep(sleep_for_time)
4643 case_no = case_no + 1
4644 fout = open(g_test_result_file,
'a')
4645 message = g_mess_header + g_test_case + str(case_no) +
" " 4646 message = message +
"Connect(in->out, periodic,SKIP) -> Activate -> send/recv -> Deactivate -> Disconnect" 4647 message = message + g_mess_footer
4648 fout.write(message +
'\n')
4652 for i
in range(loop_count):
4662 ret0 = g_out_ports[g_port1].connect(g_conprof1)
4665 ret1 = g_out_ports[g_port2].connect(g_conprof2)
4668 ret2 = g_out_ports[g_port3].connect(g_conprof3)
4671 ec_recv[0].activate_component(g_compo_recv.rtc_ref)
4672 time.sleep(sleep_recv_act_time)
4673 ec_send[0].activate_component(g_compo_send.rtc_ref)
4675 time.sleep(sleep_act_time)
4678 ec_send[0].deactivate_component(g_compo_send.rtc_ref)
4679 ec_recv[0].deactivate_component(g_compo_recv.rtc_ref)
4682 g_in_ports[g_port3].disconnect(g_conprof3.connector_id)
4683 g_in_ports[g_port2].disconnect(g_conprof2.connector_id)
4684 g_in_ports[g_port1].disconnect(g_conprof1.connector_id)
4687 if os.path.isfile(g_diff_recv_file) ==
False:
4688 fout = open(g_test_result_file,
'a')
4689 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
4690 message = message + g_check_message
4691 fout.write(message +
'\n')
4694 time.sleep(sleep_for_time)
4698 time.sleep(sleep_act_time)
4702 fout = open(g_test_result_file,
'a')
4703 message = g_mess_header + g_test_case + str(case_no) +
" " + g_test_cnt + str(i+1) + g_mess_footer
4707 message = message + g_test_ok
4709 fout.write(message +
'\n')
4712 message = message + g_test_ng
4714 message = message + g_test_ng_message
4715 fout.write(message +
'\n')
4717 fin2 = open(g_diff_recv_file,
'r') while(1): 4718 s2 = fin2.readline() 4725 time.sleep(sleep_for_time)
4727 print "Test Complete." 4728
def delete_recv_file()
内部関数:受信ファイル削除
def diff_file()
内部関数:送受信ファイルのデータ比較
def make_connecter_profile(subscription_type, push_policy, connect_direction)
内部関数:コネクタープロファイル設定(データポート)