B 4 ?@sNddlZddlZddlZddlZddZddZddZdd d Zd d Z dS)NcCst|d}t|d\}}t|d\}}t|d\}}g}|rN|d||r`|d||r|rx|d|n|d||d|sd|S|dd }d |S) Ng@@i<z%s hourz%s minz%s secz%.1f secz%s ms )mathZceildivmodappendjoin)ZsecondsZmsZminutesZhourspartsr ;/opt/alt/python37/lib64/python3.7/test/libregrtest/utils.pyformat_durations" r cCsB|sdSx4t|D](\}}tj|\}}|dkr|||<qWdS)Nz.py) enumerateospathsplitext)namesidxnamebasenameZextr r r removepy s rcCs$|dkrd||fSd||fSdS)Nz%d %sz%d %ssr )nZwordr r r count)s rFcCs:d|}ttjdddt|D|||d|ddS)zPrint the elements of iterable x to stdout. Optional arg width (default 70) is the maximum line length. Optional arg indent (default 4) is the number of blanks with which to begin each line. rcss|]}t|VqdS)N)str).0Zeltr r r :szprintlist..)Zinitial_indentZsubsequent_indent)fileN)printtextwrapZfillrsorted)xwidthindentrZblanksr r r printlist0sr%cCstd|tjdddS)Nz Warning -- T)rflush)rsysstderr)msgr r r print_warning?sr*)rrN) rZos.pathrr'r r rrr%r*r r r r s