Use runtime instead of datetime for test output.

(cherry picked from commit 31a5b874a1)
pull/44611/head
Matt Clay 7 years ago
parent a045535ecf
commit a3bc0ac6cf

@ -9,6 +9,7 @@ grep '^#!' -rIn . \
-e '^\./test/integration/targets/[^/]*/library/[^/]*:#!/usr/bin/python$' \
-e '^\./test/integration/targets/module_precedence/.*lib.*:#!/usr/bin/python$' \
-e '^\./hacking/cherrypick.py:#!/usr/bin/env python3$' \
-e '^\./test/utils/shippable/timing.py:#!/usr/bin/env python3$' \
-e ':#!/bin/sh$' \
-e ':#!/bin/bash( -[eux]|$)' \
-e ':#!/usr/bin/make -f$' \

@ -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
"$@" 2>&1 | gawk '{ print strftime("%Y-%m-%d %H:%M:%S"), $0; fflush(); }'
"$@" 2>&1 | "$(dirname "$0")/timing.py"

Loading…
Cancel
Save