~ chicken-core (chicken-5) cfdeb4ab4bb857d18e28d587a0663d02cba14b70
commit cfdeb4ab4bb857d18e28d587a0663d02cba14b70 Author: Peter Bex <peter@more-magic.net> AuthorDate: Mon Dec 12 21:34:13 2016 +0100 Commit: Peter Bex <peter@more-magic.net> CommitDate: Mon Dec 12 21:39:40 2016 +0100 Only try to time tests when `time` command is available Signed-off-by: Peter Bex <peter@more-magic.net> diff --git a/tests/runtests.sh b/tests/runtests.sh index fa7043ab..ab65cf4b 100755 --- a/tests/runtests.sh +++ b/tests/runtests.sh @@ -63,6 +63,7 @@ SETUP_PREFIX="${SETUP_PREFIX} -e (register-program \"csi\" (make-pathname ${TEST TYPESDB=../types.db cp $TYPESDB test-repository/types.db +time=`command >/dev/null -v time && echo time || :` compile="../csc -types ${TYPESDB} -ignore-repository ${COMPILE_OPTIONS} -o a.out" compile2="../csc -compiler $CHICKEN -v -I${TEST_DIR}/.. -L${TEST_DIR}/.. -include-path ${TEST_DIR}/.." compile_s="../csc -s -types ${TYPESDB} -ignore-repository ${COMPILE_OPTIONS} -v -I${TEST_DIR}/.. -L${TEST_DIR}/.. -include-path ${TEST_DIR}/.." @@ -127,9 +128,9 @@ echo "======================================== specialization benchmark ..." $compile fft.scm -O2 -local -d0 -disable-interrupts -b -o fft1 $compile fft.scm -O2 -local -specialize -debug x -d0 -disable-interrupts -b -o fft2 -specialize echo "normal:" -time ./fft1 1000 7 +$time ./fft1 1000 7 echo "specialized:" -time ./fft2 1000 7 +$time ./fft2 1000 7 echo "======================================== callback tests ..." $compile callback-tests.scm @@ -407,7 +408,7 @@ $compile locative-stress-test.scm ./a.out echo "======================================== syntax-rules stress test ..." -time $interpret -bnq syntax-rule-stress-test.scm +$time $interpret -bnq syntax-rule-stress-test.scm echo "======================================== embedding (1) ..." $compile embedded1.cTrap