aboutsummaryrefslogtreecommitdiff
path: root/tools/run_tests/jenkins.sh
diff options
context:
space:
mode:
authorJosh Haberman <jhaberman@gmail.com>2016-03-03 17:04:36 -0800
committerJosh Haberman <jhaberman@gmail.com>2016-03-03 17:05:36 -0800
commit2bda98f79ca9f43091d2033cf02c9732a0515a7a (patch)
tree03efdae9d7224df721ed253937d6e1d9953c25c8 /tools/run_tests/jenkins.sh
parent1ee0fda556b252944e7dd140ad0cd7b8949eb496 (diff)
downloadprotobuf-2bda98f79ca9f43091d2033cf02c9732a0515a7a.tar.gz
protobuf-2bda98f79ca9f43091d2033cf02c9732a0515a7a.tar.bz2
protobuf-2bda98f79ca9f43091d2033cf02c9732a0515a7a.zip
Properly report C++ build time.
Diffstat (limited to 'tools/run_tests/jenkins.sh')
-rwxr-xr-xtools/run_tests/jenkins.sh7
1 files changed, 6 insertions, 1 deletions
diff --git a/tools/run_tests/jenkins.sh b/tools/run_tests/jenkins.sh
index 32050d25..0bd9ffe5 100755
--- a/tools/run_tests/jenkins.sh
+++ b/tools/run_tests/jenkins.sh
@@ -34,7 +34,12 @@ mkdir -p $LOG_OUTPUT_DIR/1/cpp
# $DIR/logs/1/java_jdk7/stderr
CPP_STDOUT=$LOG_OUTPUT_DIR/1/cpp/stdout
CPP_STDERR=$LOG_OUTPUT_DIR/1/cpp/stderr
-$TEST_SCRIPT cpp > >(tee $CPP_STDOUT) 2> >(tee $CPP_STDERR >&2)
+
+# It's important that we get /usr/bin/time (which supports -f and -o) and not
+# the bash builtin "time" which doesn't.
+TIME_CMD="/usr/bin/time -f %e -o $LOG_OUTPUT_DIR/1/cpp/build_time"
+
+$TIME_CMD $TEST_SCRIPT cpp > >(tee $CPP_STDOUT) 2> >(tee $CPP_STDERR >&2)
# Other tests are run in parallel. The overall run fails if any one of them
# fails.