mirror of
https://github.com/crioux/turbo-linecount.git
synced 2024-10-27 17:24:01 +00:00
compare_testfiles.sh: pass Python code via -c
pass Python code via -c instead of feeding to STDIN; on my system (Ubuntu) the later just measures the time to feed the code, not the execution (resulting in 0.00s runtime being reported)
This commit is contained in:
parent
0af164582f
commit
b9a65a1269
@ -25,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
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user