Fix a bug in the test-complexity script and add more test cases.
[tatoo.git] / tests / test_complexity.sh
1 #!/bin/sh
2
3 S="//M/ancestor::A"
4 Q="$S"
5
6 for i in `seq 1 30`
7 do
8     src/tatoo.native -s -d tests/alphabet.xml -o /dev/null -c "$Q" 2> /tmp/log
9     ST=`grep 'Number of states' /tmp/log  | cut -f 2 -d :`
10     TM=`grep 'evaluating query in' /tmp/log  | cut -f 3 -d : | cut -f 1 -d m`
11     RU=`grep 'traversals' /tmp/log  | cut -f 2 -d :`
12     echo "$i", "$ST", "$TM", "$RU"
13     Q="$Q""$S"
14 done
15 rm -f /tmp/log