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

Side by Side Diff: test/run.sh

Issue 11359215: Ensure parent id added only when we need an identifier for the child (Closed) Base URL: git@github.com:dart-lang/dart-web-components.git@master
Patch Set: Created 8 years, 1 month 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
« no previous file with comments | « pubspec.yaml ('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 'DumpRenderTree' in your path. Filter tests by passing a 7 # both 'dart' and 'DumpRenderTree' 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
11 11
12 # bail on error 12 # bail on error
13 set -e 13 set -e
14 14
15 # print commands executed by this script 15 # print commands executed by this script
16 # set -x 16 # set -x
17 17
18 DIR=$( cd $( dirname "${BASH_SOURCE[0]}" ) && pwd ) 18 DIR=$( cd $( dirname "${BASH_SOURCE[0]}" ) && pwd )
19 DART_FLAGS="--checked" 19 DART_FLAGS="--checked"
20 TEST_PATTERN=$1 20 TEST_PATTERN=$1
21 21
22 function show_diff { 22 function show_diff {
23 echo -en "Expected" 23 diff -u $1 $2 | \
24 echo -n " " 24 sed -e "s/^\(+.*\)/\x1b[32m\1\x1b[0m/" |\
25 echo -e "Output" 25 sed -e "s/^\(-.*\)/\x1b[31m\1\x1b[0m/"
26 diff -t -y $1 $2 | \
27 sed -e "s/\(^.\{63\}\)\(\s[<]\(\s\|$\)\)\(.*\)/\1\2\4/" | \
28 sed -e "s/\(^.\{63\}\)\(\s[|]\(\s\|$\)\)\(.*\)/\1\2\4/" | \
29 sed -e "s/\(^.\{63\}\)\(\s[>]\(\s\|$\)\)\(.*\)/\1\2\4/"
30 return 1 26 return 1
31 } 27 }
32 28
33 function update { 29 function update {
34 read -p "Would you like to update the expectations? [y/N]: " answer 30 read -p "Would you like to update the expectations? [y/N]: " answer
35 if [[ $answer == 'y' || $answer == 'Y' ]]; then 31 if [[ $answer == 'y' || $answer == 'Y' ]]; then
36 cp $2 $1 32 cp $2 $1
37 return 0 33 return 0
38 fi 34 fi
39 return 1 35 return 1
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 # Run Dart analyzer to check that we're generating warning clean code. 96 # Run Dart analyzer to check that we're generating warning clean code.
101 OUT_PATTERN="$DIR/data/output/*$TEST_PATTERN*_bootstrap.dart" 97 OUT_PATTERN="$DIR/data/output/*$TEST_PATTERN*_bootstrap.dart"
102 if [[ `ls $OUT_PATTERN 2>/dev/null` != "" ]]; then 98 if [[ `ls $OUT_PATTERN 2>/dev/null` != "" ]]; then
103 echo -e "\n Analyzing generated code for warnings or type errors." 99 echo -e "\n Analyzing generated code for warnings or type errors."
104 # TODO(jmesserly): batch mode does not return the right exit code. 100 # TODO(jmesserly): batch mode does not return the right exit code.
105 ls $OUT_PATTERN | dart_analyzer --fatal-warnings --fatal-type-errors \ 101 ls $OUT_PATTERN | dart_analyzer --fatal-warnings --fatal-type-errors \
106 --work $DIR/data/output/analyzer/ -batch 102 --work $DIR/data/output/analyzer/ -batch
107 fi 103 fi
108 104
109 echo All tests pass. 105 echo All tests pass.
OLDNEW
« no previous file with comments | « pubspec.yaml ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698