OLD | NEW |
1 #!/bin/bash | 1 #!/bin/bash |
2 set -e # bail on error | 2 set -e # bail on error |
3 | 3 |
4 function fail { | 4 function fail { |
5 echo -e "[31mSome tests failed[0m" | 5 echo -e "[31mSome tests failed[0m" |
6 return 1 | 6 return 1 |
7 } | 7 } |
8 | 8 |
9 # Some tests require being run from the package root | 9 # Some tests require being run from the package root |
10 # switch to the root directory of dev_compiler | 10 # switch to the root directory of dev_compiler |
11 cd $( dirname "${BASH_SOURCE[0]}" )/.. | 11 cd $( dirname "${BASH_SOURCE[0]}" )/.. |
12 | 12 |
13 # Check minimum SDK version | 13 # Check minimum SDK version |
14 ./tool/sdk_version_check.dart 1.9.0-dev.4.0 || fail | 14 ./tool/sdk_version_check.dart 1.9.0-dev.4.0 || fail |
15 | 15 |
16 # Make sure we don't run tests in code coverage mode. | 16 # Make sure we don't run tests in code coverage mode. |
17 # this will cause us to generate files that are not part of the baseline | 17 # this will cause us to generate files that are not part of the baseline |
18 # TODO(jmesserly): we should move diff into Dart code, so we don't need to | 18 # TODO(jmesserly): we should move diff into Dart code, so we don't need to |
19 # worry about this. Also if we're in code coverage mode, we should avoid running | 19 # worry about this. Also if we're in code coverage mode, we should avoid running |
20 # all_tests twice. Finally self_host_test is not currently being tracked by | 20 # all_tests twice. Finally self_host_test is not currently being tracked by |
21 # code coverage. | 21 # code coverage. |
22 unset COVERALLS_TOKEN | 22 unset COVERALLS_TOKEN |
23 pub run test:test test/all_tests.dart || fail | 23 pub run test:test test/all_tests.dart || fail |
24 | 24 |
25 # run self host and analyzer after other tests, because they're ~seconds to run. | |
26 pub run test:test test/checker/self_host_test.dart || fail | |
27 | |
28 { | 25 { |
29 fc=`find test -name "*.dart" |\ | 26 fc=`find test -name "*.dart" |\ |
30 xargs grep "/\*\S* should be \S*\*/" | wc -l` | 27 xargs grep "/\*\S* should be \S*\*/" | wc -l` |
31 echo "There are" $fc "tests marked as known failures." | 28 echo "There are" $fc "tests marked as known failures." |
32 } | 29 } |
33 | 30 |
34 echo -e "[32mAll tests pass[0m" | 31 echo -e "[32mAll tests pass[0m" |
OLD | NEW |