Check out the latest version of Routino: svn co http://routino.org/svn/trunk routino
Contents of /branches/destination-access/src/test/run-all-tests.sh
Parent Directory
|
Revision Log
Revision 1969 -
(show annotations)
(download)
(as text)
Wed Mar 13 13:31:03 2019 UTC (6 years ago) by amb
File MIME type: text/x-sh
File size: 1966 byte(s)
Wed Mar 13 13:31:03 2019 UTC (6 years ago) by amb
File MIME type: text/x-sh
File size: 1966 byte(s)
Merge from trunk.
1 | #!/bin/sh |
2 | |
3 | # Run with a debugger or not? |
4 | |
5 | debugger=valgrind |
6 | debugger= |
7 | |
8 | TEST_DEBUGGER=$debugger |
9 | export TEST_DEBUGGER |
10 | |
11 | # Overall status |
12 | |
13 | status=true |
14 | |
15 | # Functions for running tests |
16 | |
17 | run_a_test () |
18 | { |
19 | script=$1 |
20 | shift |
21 | |
22 | if ./run-one-test.sh $script $@ ; then |
23 | echo "... passed" |
24 | else |
25 | echo "... FAILED" |
26 | status=false |
27 | fi |
28 | } |
29 | |
30 | compare_results () |
31 | { |
32 | if diff -q -r $1 $2; then |
33 | echo "... matched" |
34 | else |
35 | echo "... match FAILED" |
36 | status=false |
37 | fi |
38 | } |
39 | |
40 | |
41 | # Initial informational message |
42 | |
43 | echo "" |
44 | ./is-fast-math message |
45 | |
46 | |
47 | # Get the list of tests |
48 | |
49 | scripts=`echo *.osm | sed -e s/.osm/.sh/g` |
50 | |
51 | # Loop round the different test types |
52 | |
53 | for type in 1 2 3; do |
54 | |
55 | case $type in |
56 | 1) |
57 | suffix="" |
58 | arg="" |
59 | description="" |
60 | ;; |
61 | 2) |
62 | suffix="+lib" |
63 | arg="lib" |
64 | description="libroutino" |
65 | ;; |
66 | 3) |
67 | suffix="-pruned" |
68 | arg="prune" |
69 | description="pruned" |
70 | ;; |
71 | esac |
72 | |
73 | # Run the script (non-slim mode) |
74 | |
75 | for script in $scripts; do |
76 | echo "" |
77 | echo "Testing: $script (non-slim, $description) ... " |
78 | run_a_test $script fat $arg |
79 | done |
80 | |
81 | # Run the script (slim mode) |
82 | |
83 | for script in $scripts; do |
84 | echo "" |
85 | echo "Testing: $script (slim, $description) ... " |
86 | run_a_test $script slim $arg |
87 | done |
88 | |
89 | # Check results |
90 | |
91 | if $status; then |
92 | echo "Success: all tests passed" |
93 | else |
94 | echo "Warning: Some tests FAILED" |
95 | exit 1 |
96 | fi |
97 | |
98 | # Compare normal/slim results |
99 | |
100 | echo "" |
101 | |
102 | echo "Comparing: slim and non-slim results ($description) ... " |
103 | |
104 | compare_results fat$suffix slim$suffix |
105 | |
106 | # Check comparison |
107 | |
108 | if $status; then |
109 | echo "Success: slim and non-slim results match" |
110 | else |
111 | echo "Warning: slim and non-slim results are different" |
112 | exit 1 |
113 | fi |
114 | |
115 | done |
116 | |
117 | |
118 | # Finish |
119 | |
120 | exit 0 |
Properties
Name | Value |
---|---|
svn:executable | * |