Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(150)

Side by Side Diff: pkg/polymer/test/run.sh

Issue 23431010: Change in deploy.dart to make it easier to run in run.sh without running pub. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « pkg/polymer/lib/polymer.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/bin/bash 1 #!/bin/bash
2 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 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 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: call directly in the commandline as test/run.sh ensuring that you have 6 # Usage: call directly in the commandline as test/run.sh ensuring that you have
7 # both 'dart' and 'content_shell' in your path. Filter tests by passing a 7 # both 'dart' and 'content_shell' in your path. Filter tests by passing a
8 # pattern as an argument to this script. 8 # pattern as an argument to this script.
9 9
10 # TODO(sigmund): replace with a real test runner 10 # TODO(sigmund): replace with a real test runner
(...skipping 17 matching lines...) Expand all
28 echo $1 28 echo $1
29 return 29 return
30 fi 30 fi
31 shift 31 shift
32 done 32 done
33 } 33 }
34 34
35 TEST_PATTERN=$(first_non_option $@) 35 TEST_PATTERN=$(first_non_option $@)
36 36
37 SDK_DIR=$(cd ../../out/ReleaseIA32/dart-sdk/; pwd) 37 SDK_DIR=$(cd ../../out/ReleaseIA32/dart-sdk/; pwd)
38 dart=$SDK_DIR/bin/dart 38 package_root=$SDK_DIR/../packages
39 dartanalyzer=$SDK_DIR/bin/dartanalyzer 39 dart="$SDK_DIR/bin/dart --package-root=$package_root"
40 dartanalyzer="$SDK_DIR/bin/dartanalyzer --package-root=$package_root"
40 41
41 function fail { 42 function fail {
42 return 1 43 return 1
43 } 44 }
44 45
45 function show_diff { 46 function show_diff {
46 diff -u -N $1 $2 | \ 47 diff -u -N $1 $2 | \
47 sed -e "s/^\(+.*\)/\1/" |\ 48 sed -e "s/^\(+.*\)/\1/" |\
48 sed -e "s/^\(-.*\)/\1/" 49 sed -e "s/^\(-.*\)/\1/"
49 return 1 50 return 1
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 fi 119 fi
119 120
120 echo -e "\nRunning unit tests... " 121 echo -e "\nRunning unit tests... "
121 $dart $DART_FLAGS test/run_all.dart $@ || compare_all 122 $dart $DART_FLAGS test/run_all.dart $@ || compare_all
122 123
123 # Run Dart analyzer to check that we're generating warning clean code. 124 # Run Dart analyzer to check that we're generating warning clean code.
124 # It's a bit slow, so only do this for TodoMVC. 125 # It's a bit slow, so only do this for TodoMVC.
125 OUT_PATTERN="$DIR/../../../third_party/samples/todomvc/test/out/test/*$TEST_PATT ERN*_bootstrap.dart" 126 OUT_PATTERN="$DIR/../../../third_party/samples/todomvc/test/out/test/*$TEST_PATT ERN*_bootstrap.dart"
126 if [[ `ls $OUT_PATTERN 2>/dev/null` != "" ]]; then 127 if [[ `ls $OUT_PATTERN 2>/dev/null` != "" ]]; then
127 echo -e "\nAnalyzing generated code for warnings or type errors." 128 echo -e "\nAnalyzing generated code for warnings or type errors."
128 ls $OUT_PATTERN 2>/dev/null | $dartanalyzer --package-root=packages \ 129 ls $OUT_PATTERN 2>/dev/null | $dartanalyzer \
129 --fatal-warnings --fatal-type-errors -batch 130 --fatal-warnings --fatal-type-errors -batch
130 fi 131 fi
131 132
132 echo -e "All tests pass" 133 echo -e "All tests pass"
OLDNEW
« no previous file with comments | « pkg/polymer/lib/polymer.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698