U .c>@sZddlZddlZddlZddlZddlmZddZddZddZ dd d Z d dZ dS)N)supportcCst|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/python38/lib64/python3.8/test/libregrtest/utils.pyformat_durations" r cCs>|sdSt|D](\}}tj|\}}|dkr|||<qdS)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|VqdSN)str).0Zeltr r r ;szprintlist..)Zinitial_indentZsubsequent_indent)fileN)printtextwrapZfillr sorted)xwidthindentr Zblanksr r r printlist1sr'cCst|dSr)r print_warning)msgr r r r(@sr()rrN) rZos.pathrsysr"Ztestrr rrr'r(r r r r s