Use runtime instead of datetime for test output.

pull/44594/head
Matt Clay 6 years ago
parent 34b36d5178
commit 31a5b874a1

@ -27,6 +27,7 @@ def main():
skip = set([ skip = set([
'test/integration/targets/win_module_utils/library/legacy_only_new_way_win_line_ending.ps1', 'test/integration/targets/win_module_utils/library/legacy_only_new_way_win_line_ending.ps1',
'test/integration/targets/win_module_utils/library/legacy_only_old_way_win_line_ending.ps1', 'test/integration/targets/win_module_utils/library/legacy_only_old_way_win_line_ending.ps1',
'test/utils/shippable/timing.py',
]) ])
for path in sys.argv[1:] or sys.stdin.read().splitlines(): for path in sys.argv[1:] or sys.stdin.read().splitlines():

@ -0,0 +1,10 @@
#!/usr/bin/env python3
import sys
import time
start = time.time()
for line in sys.stdin:
seconds = time.time() - start
sys.stdout.write('%02d:%02d %s' % (seconds // 60, seconds % 60, line))

@ -1,5 +1,5 @@
#!/bin/bash -eux #!/bin/bash -eu
set -o pipefail set -o pipefail
"$@" 2>&1 | gawk '{ print strftime("%Y-%m-%d %H:%M:%S"), $0; fflush(); }' "$@" 2>&1 | "$(dirname "$0")/timing.py"

Loading…
Cancel
Save