This commit is contained in:
Peter Meerwald-Stadler
2021-04-27 16:20:52 +02:00
committed by GitHub

View File

@@ -1,5 +1,7 @@
#!/bin/sh #!/bin/sh
export TIME='real\t %e'
if [ "$1" = "" ]; then if [ "$1" = "" ]; then
echo "specify path to tlc binary" echo "specify path to tlc binary"
exit 1 exit 1
@@ -9,7 +11,6 @@ fi
tlctest() tlctest()
{ {
OUT=`(time $TLC $1) 2>&1 | grep real | cut -f 2 | cut -c 3-` OUT=`(time $TLC $1) 2>&1 | grep real | cut -f 2 | cut -c 3-`
echo "tlc: $1 $OUT" echo "tlc: $1 $OUT"
return 0 return 0
@@ -24,7 +25,7 @@ wctest()
pythontest() pythontest()
{ {
OUT=`(time echo "print str(sum(1 for line in open('$1'))) + ' $1'" | python) 2>&1 | grep real | cut -f 2 | cut -c 3-` OUT=`(time python -c "print str(sum(1 for line in open('$1'))) + ' $1'") 2>&1 | grep real | cut -f 2 | cut -c 3-`
echo "python: $1 $OUT" echo "python: $1 $OUT"
return 0 return 0
} }