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

Unified Diff: tool/build_sdk.sh

Issue 1153313005: tweak build_sdk to display color unified diffs, and move diff to after the build succeeds (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 5 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tool/build_sdk.sh
diff --git a/tool/build_sdk.sh b/tool/build_sdk.sh
index c72ffee4c81e2247f4375740ba9826680d1877de..80d387acd202187ba8d24c5ca75271ee50bd38a9 100755
--- a/tool/build_sdk.sh
+++ b/tool/build_sdk.sh
@@ -17,15 +17,20 @@ dart -c bin/devc.dart --no-source-maps --sdk-check --force-compile -l warning \
--dart-sdk test/generated_sdk -o lib/runtime/ dart:core \
> test/generated_sdk/sdk_errors.txt || true
-if ! diff tool/sdk_expected_errors.txt test/generated_sdk/sdk_errors.txt ; then
- echo
- echo 'SDK errors have changed. To update expectations, run:'
- echo '$ cp test/generated_sdk/sdk_errors.txt tool/sdk_expected_errors.txt'
- exit 1
-fi
-
if [[ ! -f lib/runtime/dart/core.js ]] ; then
echo 'core.js not found, assuming build failed.'
echo './tool/build_sdk.sh can be run to reproduce this.'
exit 1
fi
+
+DIFF_ARGS="-u tool/sdk_expected_errors.txt test/generated_sdk/sdk_errors.txt"
+
+if ! (diff $DIFF_ARGS > /dev/null) ; then
+ diff $DIFF_ARGS |\
+ sed -e "s/^\(+.*\)/\1/" |\
+ sed -e "s/^\(-.*\)/\1/"
+ echo
+ echo 'SDK errors have changed. To update expectations, run:'
+ echo '$ cp test/generated_sdk/sdk_errors.txt tool/sdk_expected_errors.txt'
+ exit 1
+fi
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698