OLD | NEW |
---|---|
1 #!/bin/bash | 1 #!/bin/bash |
2 # | 2 # |
3 # Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 3 # Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file |
4 # for details. All rights reserved. Use of this source code is governed by a | 4 # for details. All rights reserved. Use of this source code is governed by a |
5 # BSD-style license that can be found in the LICENSE file. | 5 # BSD-style license that can be found in the LICENSE file. |
6 # | 6 # |
7 | 7 |
8 # A quick check over a subset the tests in the runtime, compiler | 8 # A quick check over a subset the tests in the runtime, compiler |
9 # and client directories. | 9 # and client directories. |
10 | 10 |
(...skipping 27 matching lines...) Expand all Loading... | |
38 exit 1 | 38 exit 1 |
39 fi | 39 fi |
40 } | 40 } |
41 | 41 |
42 # Execute a set of tests | 42 # Execute a set of tests |
43 # $1 directory to test in | 43 # $1 directory to test in |
44 # $2 arch | 44 # $2 arch |
45 # $3 mode | 45 # $3 mode |
46 # Returns the output from the subcommand | 46 # Returns the output from the subcommand |
47 function doTest { | 47 function doTest { |
48 ./tools/test.py --arch $2 --mode $3 | 48 ./tools/test.py --$2 $3 --mode $4 |
49 RESULT=$? | 49 RESULT=$? |
50 if [ ${RESULT} != 0 ] ; then | 50 if [ ${RESULT} != 0 ] ; then |
51 TESTS_FAILED=1 | 51 TESTS_FAILED=1 |
52 fi | 52 fi |
53 return ${RESULT} | 53 return ${RESULT} |
54 } | 54 } |
55 | 55 |
56 # Main | 56 # Main |
57 | 57 |
58 while [ ! -z "$1" ] ; do | 58 while [ ! -z "$1" ] ; do |
(...skipping 29 matching lines...) Expand all Loading... | |
88 | 88 |
89 echo | 89 echo |
90 echo "--- Building debug ---" | 90 echo "--- Building debug ---" |
91 doBuild ia32 debug | 91 doBuild ia32 debug |
92 | 92 |
93 | 93 |
94 | 94 |
95 echo | 95 echo |
96 echo "=== Runtime tests === " | 96 echo "=== Runtime tests === " |
97 echo " Debug (Ctrl-C to skip this set of tests)" | 97 echo " Debug (Ctrl-C to skip this set of tests)" |
98 doTest runtime ia32 debug | 98 doTest runtime arch ia32 debug |
zundel
2011/11/01 18:13:47
this doesn't seem right. the component in this ca
codefu
2011/11/01 18:15:14
I like that better than specifying the component o
| |
99 RUNTIME_RESULT=$? | 99 RUNTIME_RESULT=$? |
100 if [ ${RUNTIME_RESULT} == 0 ] ; then | 100 if [ ${RUNTIME_RESULT} == 0 ] ; then |
101 echo " Release (Ctrl-C to skip this set of tests)" | 101 echo " Release (Ctrl-C to skip this set of tests)" |
102 doTest runtime ia32 release | 102 doTest runtime arch ia32 release |
103 RUNTIME_RESULT=$? | 103 RUNTIME_RESULT=$? |
104 fi | 104 fi |
105 | 105 |
106 | 106 |
107 echo | 107 echo |
108 echo "=== Compiler tests ===" | 108 echo "=== Compiler tests ===" |
109 echo " Debug mode (Ctrl-C to skip this set of tests)" | 109 echo " Debug mode (Ctrl-C to skip this set of tests)" |
110 doTest compiler dartc debug | 110 doTest compiler component dartc debug |
111 COMPILER_RESULT=$? | 111 COMPILER_RESULT=$? |
112 | 112 |
113 if [ ${DO_OPTIMIZE} == 1 ] ; then | 113 if [ ${DO_OPTIMIZE} == 1 ] ; then |
114 echo " Release mode (--optimize)" | 114 echo " Release mode (--optimize)" |
115 doTest compiler dartc release | 115 doTest compiler component dartc release |
116 RESULT=$? | 116 RESULT=$? |
117 if [ ${RESULT} != 0 ] ; then | 117 if [ ${RESULT} != 0 ] ; then |
118 COMPILER_RESULT=${RESULT} | 118 COMPILER_RESULT=${RESULT} |
119 fi | 119 fi |
120 fi | 120 fi |
121 | 121 |
122 echo | 122 echo |
123 echo "=== Client tests ===" | 123 echo "=== Client tests ===" |
124 echo " Chromium (Ctrl-C to skip this set of tests)" | 124 echo " Chromium (Ctrl-C to skip this set of tests)" |
125 doTest client chromium debug | 125 doTest client component chromium debug |
126 CLIENT_RESULT=$? | 126 CLIENT_RESULT=$? |
127 | 127 |
128 if [ ${DO_OPTIMIZE} == 1 ] ; then | 128 if [ ${DO_OPTIMIZE} == 1 ] ; then |
129 echo " Chromium Release mode (--optimize)" | 129 echo " Chromium Release mode (--optimize)" |
130 doTest compiler chromium release | 130 doTest compiler component chromium release |
131 RESULT=$? | 131 RESULT=$? |
132 if [ ${RESULT} != 0 ] ; then | 132 if [ ${RESULT} != 0 ] ; then |
133 CLIENT_RESULT=${RESULT} | 133 CLIENT_RESULT=${RESULT} |
134 fi | 134 fi |
135 fi | 135 fi |
136 | 136 |
137 if [ ${DO_DARTIUM} == 1 ] ; then | 137 if [ ${DO_DARTIUM} == 1 ] ; then |
138 echo " Dartium (Ctrl-C to skip this set of tests)" | 138 echo " Dartium (Ctrl-C to skip this set of tests)" |
139 doTest client dartium release | 139 doTest client component dartium release |
140 RESULT=$? | 140 RESULT=$? |
141 if [ ${RESULT} != 0 ] ; then | 141 if [ ${RESULT} != 0 ] ; then |
142 CLIENT_RESULT=${RESULT} | 142 CLIENT_RESULT=${RESULT} |
143 fi | 143 fi |
144 fi | 144 fi |
145 | 145 |
146 # Print summary of results | 146 # Print summary of results |
147 if [ ${RUNTIME_RESULT} != 0 ] ; then | 147 if [ ${RUNTIME_RESULT} != 0 ] ; then |
148 echo "*** Runtime tests failed" | 148 echo "*** Runtime tests failed" |
149 fi | 149 fi |
150 | 150 |
151 if [ ${COMPILER_RESULT} != 0 ] ; then | 151 if [ ${COMPILER_RESULT} != 0 ] ; then |
152 echo "*** Compiler tests failed" | 152 echo "*** Compiler tests failed" |
153 fi | 153 fi |
154 | 154 |
155 if [ ${CLIENT_RESULT} != 0 ] ; then | 155 if [ ${CLIENT_RESULT} != 0 ] ; then |
156 echo "*** Client tests failed" | 156 echo "*** Client tests failed" |
157 fi | 157 fi |
158 | 158 |
159 if [ ${TESTS_FAILED} == 0 ] ; then | 159 if [ ${TESTS_FAILED} == 0 ] ; then |
160 echo "All presubmit tests passed!" | 160 echo "All presubmit tests passed!" |
161 fi | 161 fi |
OLD | NEW |