diff options
author | epoger@google.com <epoger@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-04-26 17:45:06 +0000 |
---|---|---|
committer | epoger@google.com <epoger@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-04-26 17:45:06 +0000 |
commit | 0cc99cf793d2de0523461a2cef1af2a62f4a1695 (patch) | |
tree | 805b1f5ed7b34984d62df36e79003f25daae161b /gm | |
parent | 64e01e5531bab2a332be5cf7f520a3d0afcd92cc (diff) |
GM self-tests: always run all tests (don't stop at first failure)
and make rebaseline.sh rebaseline all tests in one go.
(RunBuilders:Skia_PerCommit_House_Keeping)
Review URL: https://codereview.chromium.org/13979017
git-svn-id: http://skia.googlecode.com/svn/trunk@8881 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'gm')
-rwxr-xr-x | gm/tests/rebaseline.sh | 9 | ||||
-rwxr-xr-x | gm/tests/run.sh | 11 |
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 |