OLD | NEW |
---|---|
1 #!/bin/bash | 1 #!/bin/bash |
2 # Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 2 # Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
3 # for details. All rights reserved. Use of this source code is governed by a | 3 # for details. All rights reserved. Use of this source code is governed by a |
4 # BSD-style license that can be found in the LICENSE file. | 4 # BSD-style license that can be found in the LICENSE file. |
5 | 5 |
6 # Usage: run from a Dart SVN checkout after building. | 6 # Usage: run from a Dart SVN checkout after building. |
7 | 7 |
8 # bail on error | 8 # bail on error |
9 set -e | 9 set -e |
10 | 10 |
11 # Note: test.dart needs to be run from the root of the Dart checkout | 11 # Note: test.dart needs to be run from the root of the Dart checkout |
12 DIR=$( cd $( dirname "${BASH_SOURCE[0]}" ) && pwd ) | 12 DIR=$( cd $( dirname "${BASH_SOURCE[0]}" ) && pwd ) |
blois
2014/02/12 02:29:31
should be readonly.
| |
13 pushd $DIR/../../.. > /dev/null | 13 pushd $DIR/../../.. > /dev/null |
blois
2014/02/12 02:29:31
should be quoted
| |
14 | 14 |
15 echo "*** Running unit tests for Polymer.dart and its dependencies." | 15 echo "*** Running unit tests for Polymer.dart and its dependencies." |
16 | 16 |
17 SUITES="pkg/polymer samples/third_party/todomvc" | 17 # Note: you can't combine two different pkg/ selectors in the same command. |
18 # Also, test.py gets less happy the more tests that are run. | |
19 # So we run all of the filters separately. | |
20 for SUITES in pkg/observe html/custom pkg/template_binding pkg/polymer samples/t hird_party/todomvc | |
blois
2014/02/12 02:29:31
line length
blois
2014/02/12 02:29:31
for loop variables (SUITES) should be lower_cased.
| |
21 do | |
22 ANALYZER_CONFIG="-m release -r none -c dartanalyzer $*" | |
blois
2014/02/12 02:29:31
should use readonly:
readonly ANALYZER_CONFIG="-m
| |
23 CONFIG="-m release -r vm,drt,ff,chrome,d8,jsshell -c none,dart2js --checked $* " | |
18 | 24 |
19 ANALYZER_CONFIG="-m release -r none -c dartanalyzer $*" | 25 CMD="./tools/test.py $ANALYZER_CONFIG $SUITES" |
blois
2014/02/12 02:29:31
should expand variables using:
${ANALYZER}
blois
2014/02/12 02:29:31
CMD is being assigned to multiple times, should no
| |
20 CONFIG="-m release -r vm,drt,ff,chrome,d8,jsshell -c none,dart2js --checked $*" | 26 echo "*** $CMD" |
27 $CMD | |
21 | 28 |
22 CMD="./tools/test.py $ANALYZER_CONFIG $SUITES" | 29 CMD="xvfb-run ./tools/test.py $CONFIG $SUITES" |
23 echo "*** $CMD" | 30 echo "*** $CMD" |
24 $CMD | 31 $CMD |
25 | 32 done |
26 CMD="xvfb-run ./tools/test.py $CONFIG $SUITES" | |
27 echo "*** $CMD" | |
28 $CMD | |
29 | 33 |
30 echo -e "[32mAll tests pass[0m" | 34 echo -e "[32mAll tests pass[0m" |
OLD | NEW |