tests: sum the first-execution time with the compilation time
authorJean Privat <jean@pryen.org>
Fri, 26 Sep 2014 00:22:41 +0000 (20:22 -0400)
committerJean Privat <jean@pryen.org>
Fri, 26 Sep 2014 00:27:33 +0000 (20:27 -0400)
Signed-off-by: Jean Privat <jean@pryen.org>

tests/tests.sh

index bb648a0..32afdf0 100755 (executable)
@@ -492,7 +492,10 @@ END
                                echo "NIT_NO_STACK=1 ./$ff.bin" $args
                        fi      
                        NIT_NO_STACK=1 LD_LIBRARY_PATH=$JNI_LIB_PATH \
-                               $TIMEOUT "./$ff.bin" $args < "$inputs" > "$ff.res" 2>"$ff.err"
+                               /usr/bin/time --quiet -f%U -a -o "$ff.time.out" $TIMEOUT "./$ff.bin" $args < "$inputs" > "$ff.res" 2>"$ff.err"
+                       mv $ff.time.out $ff.times.out
+                       awk '{ SUM += $1} END { print SUM }' $ff.times.out > $ff.time.out
+
                        if [ "x$verbose" = "xtrue" ]; then
                                cat "$ff.res"
                                cat >&2 "$ff.err"