Commit | Line | Data |
---|---|---|
66ef3c63 MD |
1 | #!/bin/bash |
2 | # | |
3 | # Copyright (C) - 2013 Christian Babeux <christian.babeux@efficios.com> | |
4 | # | |
5 | # This program is free software; you can redistribute it and/or modify it | |
6 | # under the terms of the GNU General Public License, version 2 only, as | |
7 | # published by the Free Software Foundation. | |
8 | # | |
9 | # This program is distributed in the hope that it will be useful, but WITHOUT | |
10 | # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
11 | # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | |
12 | # more details. | |
13 | # | |
14 | # You should have received a copy of the GNU General Public License along with | |
15 | # this program; if not, write to the Free Software Foundation, Inc., 51 | |
16 | # Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | |
17 | ||
18 | CURDIR=$(dirname $0) | |
19 | UTILS_DIR=$CURDIR/../../../../../utils/ | |
20 | ||
9926ec7f PP |
21 | export PYTHONPATH="$(realpath "$UTILS_DIR/python")" |
22 | ||
66ef3c63 MD |
23 | source $UTILS_DIR/tap/tap.sh |
24 | ||
25 | NUM_TESTS=0 | |
26 | ||
27 | for param in $(cat $1/param-list.txt); do | |
28 | NUM_TESTS=$((${NUM_TESTS} + 3)) | |
29 | done | |
30 | ||
31 | plan_tests $NUM_TESTS | |
32 | ||
33 | if [ "x${CTF_READER_BIN}" == "x" ]; then | |
34 | echo "Bail out! No CTF_READER_BIN specified" | |
35 | exit 1 | |
36 | fi | |
37 | ||
38 | for param in $(cat $1/param-list.txt); do | |
9926ec7f PP |
39 | cd $1 && ./test.py --size ${param} prepare |
40 | ||
66ef3c63 MD |
41 | result=$? |
42 | is $result 0 $1 | |
43 | cd .. | |
44 | ||
45 | $CTF_READER_BIN $CTF_READER_OPTS $1/trace-${param} >/dev/null 2>&1 | |
46 | result=$? | |
47 | is $result 0 $1 # expect pass | |
48 | ||
9926ec7f | 49 | cd $1 && ./test.py --size ${param} clean |
66ef3c63 MD |
50 | result=$? |
51 | is $result 0 $1 | |
52 | cd .. | |
53 | done |