| OLD | NEW |
| (Empty) |
| 1 #!/bin/bash | |
| 2 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | |
| 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. | |
| 5 | |
| 6 # Usage: call directly in the commandline as test/run.sh ensuring that you have | |
| 7 # 'dart' in your path. Filter tests by passing a pattern as an argument to this | |
| 8 # script. | |
| 9 | |
| 10 # TODO(sigmund): replace with a real test runner | |
| 11 | |
| 12 # bail on error | |
| 13 set -e | |
| 14 | |
| 15 # print commands executed by this script | |
| 16 # set -x | |
| 17 | |
| 18 DIR=$( cd $( dirname "${BASH_SOURCE[0]}" ) && pwd ) | |
| 19 DART_FLAGS="--checked" | |
| 20 TEST_PATTERN=$1 | |
| 21 | |
| 22 if [[ ($TEST_PATTERN == "") ]]; then | |
| 23 # Note: dart_analyzer needs to be run from the root directory for proper path | |
| 24 # canonicalization. | |
| 25 pushd $DIR/.. &>/dev/null | |
| 26 echo Analyzing compiler for warnings or type errors | |
| 27 dartanalyzer --fatal-warnings --fatal-type-errors bin/css.dart | |
| 28 popd &>/dev/null | |
| 29 fi | |
| 30 | |
| 31 pushd $DIR &>/dev/null | |
| 32 if [[ ($TEST_PATTERN == "canary") || ($TEST_PATTERN = "") ]]; then | |
| 33 dart $DART_FLAGS run_all.dart | |
| 34 else | |
| 35 dart $DART_FLAGS run_all.dart $TEST_PATTERN | |
| 36 fi | |
| 37 popd &>/dev/null | |
| 38 | |
| 39 echo All tests completed. | |
| OLD | NEW |