a  T)cwd no_podmanZrsyncz --archivez --files-from=/)rz--linksz --recursivez --excludez/.gitz/deps/N)rrrrrrttcn3_hacks_dirr r r rshlexquoter )Z copy_listrrrcopy_ttcn3_hacks_dir s8  rcCsLtdtjj}tdtjjtjjdg|dtjjd|ddS)Nrz"Generating links and Makefile for z./gen_links.shrz USE_CCACHE=1 ./regen_makefile.sh)rrr testsuiter r r r) testsuite_dirrrrprepare_testsuite_dirNsrcCs.ttttjjr tnta t dS)N) atexitregisterstoprrrrrr rrrrrrinitUs  r!cCsXtdtdtjj}tjjddg|dt d}tjjdd|g|ddS)NzBuilding testsuiterrcompilerz-j) r r rrrrr rmultiprocessing cpu_count)rZjobsrrrbuildds   r&cCsTd|d}tj|sdSt|}|dkWdS1sF0YdS)Nz/proc/z/cmdlineF)rrr openread)pidZcmdlinefrrr is_runningms    r,cCsf|d}tjtjjd}tdtjtd}t |dt |dd}tj j ||ddS)NrzMerging log filesz log_merge.sh programz --rm >/dev/nullr) rrrrtestdirr r rrrr r)cfg section_datarZ log_merger rrrmerge_log_filesys   r2cCs@tjtjjd}tdtjtjd}tjj ||ddS)NrzFormatting log fileszscripts/log_format.shr) rrrrr/r r data_dirr r)r0rr rrrformat_log_filess r4cCstj|dd}tj|ddS)Nz**z junit-*.logT) recursive)rrrglob)topdirpatternrrrget_junit_logssr9cCsd}tjjstdr6tjdd}dt |d}t tj j D]F}d|dt |d }t d tj|tj j tj|qBdS) Ncatzsource-highlightZTESTENV_SOURCE_HIGHLIGHT_COLORSZesc256zsource-highlight -f z -s xml -izecho && r-z && echozShowing )rrrshutilZwhichrenvirongetrrr9r/testdir_topdirr r rrelpathr r)Ztoolcolorsrr rrrcat_junit_logssrAcCsNtjtjjd|}t|D](}dd||g}tjj|ddj r dSq dS)Nzloop-Zgrepz-qF)checkT) rrrrr/r>r9r r returncode) loop_count match_strr7rr rrrcheck_junit_logs_haves   rFc Cs|d}tjtjjd}tjtd}tjttjj|d}dtjtjjdi}tj |\}}|rz||d<||d<tj |tjj }|||dg}tjj } | rd| vr|| g7}n||dd| g7}td tj rtj j|||d an td |tj|||d atd ttjsdtjj rPtj sPtd tdtqrtjqt|t|dS)Nrzstart-testsuite.shr.ZTTCN3_PCAP_PATHZ OSMO_SUT_HOSTZ OSMO_SUT_PORTZconfig.zRunning testsuite)renvz+ r#zpodman container crashed!zTestsuite is done)rrrrr/rrr testenv_cfgZget_vty_host_portr generate_envrtestr r r,Zexec_cmd_backgroundtestsuite_procdebug subprocessPopentimesleepr*NoTraceExceptionr daemonsZcheck_if_crashedr2r4) r0r1rZstart_testsuiteZsuiterHhostZportr Ztest_argrrrrs@       rcCsbtjtjjd}zs: .     7