aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rwxr-xr-xgm/tests/rebaseline.sh9
-rwxr-xr-xgm/tests/run.sh11
2 files changed, 12 insertions, 8 deletions
diff --git a/gm/tests/rebaseline.sh b/gm/tests/rebaseline.sh
index 71af20f440..608e66791a 100755
--- a/gm/tests/rebaseline.sh
+++ b/gm/tests/rebaseline.sh
@@ -4,9 +4,6 @@
# gm self-tests.
# Use with caution: are you sure the new results are actually correct?
#
-# YOU MUST RE-RUN THIS UNTIL THE SELF-TESTS SUCCEED!
-# (It takes one run for each failing call to gm_test in run.sh)
-#
# TODO: currently, this must be run on Linux to generate baselines that match
# the ones on the housekeeper bot (which runs on Linux... see
# http://70.32.156.51:10117/builders/Skia_PerCommit_House_Keeping/builds/1417/steps/RunGmSelfTests/logs/stdio )
@@ -64,11 +61,11 @@ SELFTEST_RESULT=$?
echo
if [ "$SELFTEST_RESULT" != "0" ]; then
replace_expected_with_actual
- echo "Self-tests still failing, you should probably run this again..."
-else
svn_add_new_files
svn_delete_old_files
- echo "Self-tests succeeded this time, you should be done!"
+ echo "Rebaseline completed. If you run run.sh now, it should succeed."
+else
+ echo "Self-tests succeeded, nothing to rebaseline."
fi
exit $SELFTEST_RESULT
diff --git a/gm/tests/run.sh b/gm/tests/run.sh
index 8e35640e92..4482d391ea 100755
--- a/gm/tests/run.sh
+++ b/gm/tests/run.sh
@@ -25,6 +25,8 @@ OUTPUT_ACTUAL_SUBDIR=output-actual
OUTPUT_EXPECTED_SUBDIR=output-expected
CONFIGS="--config 8888 565"
+ENCOUNTERED_ANY_ERRORS=0
+
# Compare contents of all files within directories $1 and $2,
# EXCEPT for any dotfiles.
# If there are any differences, a description is written to stdout and
@@ -38,7 +40,7 @@ function compare_directories {
diff -r --exclude=.* $1 $2
if [ $? != 0 ]; then
echo "failed in: compare_directories $1 $2"
- exit 1
+ ENCOUNTERED_ANY_ERRORS=1
fi
}
@@ -171,4 +173,9 @@ gm_test "--verbose --hierarchy --match selftest1 selftest2 $CONFIGS" "$GM_OUTPUT
# Ignore some error types (including ExpectationsMismatch)
gm_test "--ignoreErrorTypes ExpectationsMismatch NoGpuContext --verbose --hierarchy --match selftest1 $CONFIGS -r $GM_INPUTS/json/different-pixels.json" "$GM_OUTPUTS/ignore-expectations-mismatch"
-echo "All tests passed."
+if [ $ENCOUNTERED_ANY_ERRORS == 0 ]; then
+ echo "All tests passed."
+ exit 0
+else
+ exit 1
+fi