From 1f35cafab3d0a8f2dd534b3e11f912327e32d646 Mon Sep 17 00:00:00 2001 From: Jean Privat Date: Thu, 28 Aug 2014 16:58:08 -0400 Subject: [PATCH] tests: add time and timestamp in tests.sh Signed-off-by: Jean Privat --- tests/tests.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/tests.sh b/tests/tests.sh index f1daadd..0943020 100755 --- a/tests/tests.sh +++ b/tests/tests.sh @@ -96,7 +96,7 @@ function process_result() OLD="" LIST="" FIRST="" - echo >>$xml "" + echo >>$xml "" #for sav in "sav/$engine/fixme/$pattern.res" "sav/$engine/$pattern.res" "sav/fixme/$pattern.res" "sav/$pattern.res" "sav/$pattern.sav"; do for savdir in $savdirs; do sav=$savdir/fixme/$pattern.res @@ -235,12 +235,12 @@ need_skip() test "$noskip" = true && return 1 if echo "$1" | grep -f "$engine.skip" >/dev/null 2>&1; then echo "=> $2: [skip]" - echo >>$xml "" + echo >>$xml "" return 0 fi if test -n "$isinterpret" && echo "$1" | grep -f "exec.skip" >/dev/null 2>&1; then echo "=> $2: [skip exec]" - echo >>$xml "" + echo >>$xml "" return 0 fi return 1 @@ -451,7 +451,7 @@ END echo $NITC --no-color $OPT -o "$ffout" "$i" "$includes" $nocc fi NIT_NO_STACK=1 JNI_LIB_PATH=$JNI_LIB_PATH JAVA_HOME=$JAVA_HOME \ - $TIMEOUT $NITC --no-color $OPT -o "$ffout" "$i" $includes $nocc 2> "$ff.cmp.err" > "$ff.compile.log" + /usr/bin/time -f%U -o "$ff.time.out" $TIMEOUT $NITC --no-color $OPT -o "$ffout" "$i" $includes $nocc 2> "$ff.cmp.err" > "$ff.compile.log" ERR=$? if [ "x$verbose" = "xtrue" ]; then cat "$ff.compile.log" @@ -463,7 +463,7 @@ END chmod +x "$ff.bin" if grep "Fatal Error: more than one primitive class" "$ff.compile.log" > /dev/null; then echo " [skip] do no not imports kernel" - echo >>$xml "" + echo >>$xml "" continue fi fi @@ -533,7 +533,7 @@ END echo -n "==> $name " echo "./$ff.bin $args" > "./$fff.bin" chmod +x "./$fff.bin" - WRITE="$fff.write" sh -c "NIT_NO_STACK=1 $TIMEOUT ./$fff.bin < $ffinputs > $fff.res 2>$fff.err" + WRITE="$fff.write" /usr/bin/time -f%U -o "$fff.time.out" sh -c "NIT_NO_STACK=1 $TIMEOUT ./$fff.bin < $ffinputs > $fff.res 2>$fff.err" if [ "x$verbose" = "xtrue" ]; then cat "$fff.res" cat >&2 "$fff.err" -- 1.7.9.5