Index: test/test.sh |
diff --git a/test/test.sh b/test/test.sh |
index 53cca8507e3d940e292c2f0327ba06357d44954a..da7e5f2aa021b2cc168de2fd924c9b44397f2d8f 100755 |
--- a/test/test.sh |
+++ b/test/test.sh |
@@ -6,10 +6,15 @@ function fail { |
return 1 |
} |
+# Arguments passed to the diff tool. We exclude runtime JS files that are just |
+# copied over from the sources and are not duplicated in the expected folder. |
+DIFF_ARGS="-u -r -N --exclude=dart_runtime.js \ |
+ --exclude=harmony_feature_check.js expect actual" |
+ |
function show_diff { |
echo "Fail: actual output did not match expected" |
echo |
- diff -u -r -N $1 $2 |\ |
+ diff $DIFF_ARGS |\ |
sed -e "s/^\(+.*\)/[32m\1[0m/" |\ |
sed -e "s/^\(-.*\)/[31m\1[0m/" |
echo |
@@ -18,7 +23,7 @@ function show_diff { |
fail |
} |
-# the directory of this script |
+# the directory of this script |
TEST_DIR=$( cd $( dirname "${BASH_SOURCE[0]}" ) && pwd ) |
# Some tests require being run from the package root |
@@ -36,12 +41,12 @@ dart -c test/all_tests.dart || fail |
# validate codegen_test output |
pushd test/codegen/ &> /dev/null |
-diff -u -r -N expect actual > /dev/null || show_diff expect actual |
+diff $DIFF_ARGS > /dev/null || show_diff |
popd &> /dev/null |
# validate dart_codegen_test output |
pushd test/dart_codegen/ &> /dev/null |
-diff -u -r -N expect actual > /dev/null || show_diff expect actual |
+diff $DIFF_ARGS > /dev/null || show_diff |
popd &> /dev/null |
# run self host and analyzer after other tests, because they're ~seconds to run. |