# 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 )
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
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
diff -r --exclude=.* $1 $2
if [ $? != 0 ]; then
echo "failed in: compare_directories $1 $2"
- exit 1
+ ENCOUNTERED_ANY_ERRORS=1
fi
}
# 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