File: run-router-tests.sh

package info (click to toggle)
routino 3.4.3-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 9,196 kB
  • sloc: ansic: 22,554; javascript: 7,897; xml: 5,980; perl: 2,597; cs: 921; makefile: 826; sh: 503; cpp: 382; python: 376
file content (68 lines) | stat: -rwxr-xr-x 867 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
#!/bin/sh

# Main tests directory

testdir=../../src/test

# Overall status

status=true

# Functions for running tests

run_a_test ()
{
    script=$1
    shift

    if ./run-one-test.sh $script $@ ; then
        echo "... passed"
    else
        echo "... FAILED"
        status=false
    fi
}

compare_results ()
{
    if diff -q -r $1 $2; then
        echo "... matched"
    else
        echo "... match FAILED"
        status=false
    fi
}


# Initial informational message

echo ""
$testdir/is-fast-math message


# Get the list of tests

scripts=`echo $testdir/*.osm | sed -e s/.osm/.sh/g`

# Run the scripts

for script in $scripts; do
    echo ""
    echo "Testing: $script ... "
    run_a_test $script
done


# Check results

if $status; then
    echo "Success: all tests passed"
else
    echo "Warning: Some tests FAILED"
    exit 1
fi


# Finish

exit 0