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

Side by Side Diff: test/test.sh

Issue 973433003: Initial cut for a development server (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 5 years, 9 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
« no previous file with comments | « test/end_to_end_test.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 set -e # bail on error 2 set -e # bail on error
3 3
4 function fail { 4 function fail {
5 echo -e "Some tests failed" 5 echo -e "Some tests failed"
6 return 1 6 return 1
7 } 7 }
8 8
9 # Arguments passed to the diff tool. We exclude *.map files so they aren't 9 # Arguments passed to the diff tool. We exclude:
10 # compared, as the diff is not human readable. 10 # - *.map files so they aren't compared, as the diff is not human readable.
11 DIFF_ARGS="-u -r -N --exclude=\*.map expect actual" 11 # - runtime JS files that are just copied over from the sources and are not
12 # duplicated in the expected folder.
13 DIFF_ARGS="-u -r -N --exclude=\*.map --exclude=dart_runtime.js \
14 --exclude=harmony_feature_check.js expect actual"
12 15
13 function show_diff { 16 function show_diff {
14 echo "Fail: actual output did not match expected" 17 echo "Fail: actual output did not match expected"
15 echo 18 echo
16 diff $DIFF_ARGS |\ 19 diff $DIFF_ARGS |\
17 sed -e "s/^\(+.*\)/\1/" |\ 20 sed -e "s/^\(+.*\)/\1/" |\
18 sed -e "s/^\(-.*\)/\1/" 21 sed -e "s/^\(-.*\)/\1/"
19 echo 22 echo
20 echo "You can update these expectations with:" 23 echo "You can update these expectations with:"
21 echo "$ pushd `pwd` && cp -a actual/* expect && popd" 24 echo "$ pushd `pwd` && cp -a actual/* expect && popd"
22 fail 25 fail
23 } 26 }
24 27
25 # the directory of this script 28 # the directory of this script
26 TEST_DIR=$( cd $( dirname "${BASH_SOURCE[0]}" ) && pwd ) 29 TEST_DIR=$( cd $( dirname "${BASH_SOURCE[0]}" ) && pwd )
27 30
28 # Some tests require being run from the package root 31 # Some tests require being run from the package root
29 cd $TEST_DIR/.. 32 cd $TEST_DIR/..
30 33
31 # Check minimum SDK version 34 # Check minimum SDK version
32 ./tool/sdk_version_check.dart 1.9.0-dev.4.0 || fail 35 ./tool/sdk_version_check.dart 1.9.0-dev.4.0 || fail
33 36
34 # Remove packages symlinks, and old codegen output 37 # Remove packages symlinks, and old codegen output
35 find test/codegen -name packages -exec rm {} \; 38 find test/codegen -name packages -exec rm {} \;
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 # * local files that have never been added to git, 75 # * local files that have never been added to git,
73 # * subdirectories of test/ and tool/, unless explicitly added. Those dirs 76 # * subdirectories of test/ and tool/, unless explicitly added. Those dirs
74 # contain a lot of generated or external source we should not reformat. 77 # contain a lot of generated or external source we should not reformat.
75 (files=`git ls-files 'bin/*.dart' 'lib/*.dart' test/*.dart test/checker/*.dart \ 78 (files=`git ls-files 'bin/*.dart' 'lib/*.dart' test/*.dart test/checker/*.dart \
76 tool/*.dart | grep -v lib/src/js/`; git status -s $files | grep -q . \ 79 tool/*.dart | grep -v lib/src/js/`; git status -s $files | grep -q . \
77 && echo "Did not run the formatter, please commit edited files first." \ 80 && echo "Did not run the formatter, please commit edited files first." \
78 || (echo "Running dart formatter" ; pub run dart_style:format -w $files)) 81 || (echo "Running dart formatter" ; pub run dart_style:format -w $files))
79 popd &> /dev/null 82 popd &> /dev/null
80 83
81 echo -e "All tests pass" 84 echo -e "All tests pass"
OLDNEW
« no previous file with comments | « test/end_to_end_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698