~ chicken-core (chicken-5) 81006aa15c42da87f18c78d098355dc82a611e50
commit 81006aa15c42da87f18c78d098355dc82a611e50 Author: felix <bunny351@gmail.com> AuthorDate: Thu May 27 10:30:29 2010 +0200 Commit: felix <bunny351@gmail.com> CommitDate: Thu May 27 10:30:29 2010 +0200 BSD-specific changes to runbench.sh diff --git a/tests/runbench.sh b/tests/runbench.sh index 8ef122b9..3c670ab2 100644 --- a/tests/runbench.sh +++ b/tests/runbench.sh @@ -17,9 +17,14 @@ if test -n "$MSYSTEM"; then cp ../libchicken.dll . fi +case `uname -s` in + *BSD*|*bsd*) timeopts="-c";; + *) timeopts="-f '%E elapsed, %U user, %S system'" +esac + run() { - /usr/bin/time -f '%E elapsed, %U user, %S system' ./a.out + /usr/bin/time $timeopts ./a.out } echo @@ -32,7 +37,7 @@ $compile null.scm -O5 run echo -n "compilation ... " -/usr/bin/time -f '%E elapsed, %U user, %S system' $compile compiler.scm -O5 +/usr/bin/time $timeopts $compile compiler.scm -O5 echo -n "compiler ... " runTrap