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

Side by Side Diff: gm/tests/run.sh

Issue 17552012: GM: add --missingExpectationsPath option, similar to --mismatchPath (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « gm/tests/outputs/pipe-playback-failure/output-expected/writePath/bogusfile ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/bin/bash 1 #!/bin/bash
2 2
3 # Self-tests for gm, based on tools/tests/run.sh 3 # Self-tests for gm, based on tools/tests/run.sh
4 # 4 #
5 # These tests are run by the Skia_PerCommit_House_Keeping bot at every commit, 5 # These tests are run by the Skia_PerCommit_House_Keeping bot at every commit,
6 # so make sure that they still pass when you make changes to gm! 6 # so make sure that they still pass when you make changes to gm!
7 # 7 #
8 # To generate new baselines when gm behavior changes, run gm/tests/rebaseline.sh 8 # To generate new baselines when gm behavior changes, run gm/tests/rebaseline.sh
9 # 9 #
10 # TODO: because this is written as a shell script (instead of, say, Python) 10 # TODO: because this is written as a shell script (instead of, say, Python)
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 grep ^GM: $ACTUAL_OUTPUT_DIR/stderr >$ACTUAL_OUTPUT_DIR/stderr-tmp 101 grep ^GM: $ACTUAL_OUTPUT_DIR/stderr >$ACTUAL_OUTPUT_DIR/stderr-tmp
102 mv $ACTUAL_OUTPUT_DIR/stderr-tmp $ACTUAL_OUTPUT_DIR/stderr 102 mv $ACTUAL_OUTPUT_DIR/stderr-tmp $ACTUAL_OUTPUT_DIR/stderr
103 103
104 # Replace image file contents with just the filename, for two reasons: 104 # Replace image file contents with just the filename, for two reasons:
105 # 1. Image file encoding may vary by platform 105 # 1. Image file encoding may vary by platform
106 # 2. https://code.google.com/p/chromium/issues/detail?id=169600 106 # 2. https://code.google.com/p/chromium/issues/detail?id=169600
107 # ('gcl/upload.py fail to upload binary files to rietveld') 107 # ('gcl/upload.py fail to upload binary files to rietveld')
108 for IMAGEFILE in $(find $ACTUAL_OUTPUT_DIR -name *.png); do 108 for IMAGEFILE in $(find $ACTUAL_OUTPUT_DIR -name *.png); do
109 echo "[contents of $IMAGEFILE]" >$IMAGEFILE 109 echo "[contents of $IMAGEFILE]" >$IMAGEFILE
110 done 110 done
111 if [ -d $ACTUAL_OUTPUT_DIR/mismatchPath ]; then 111
112 for MISMATCHDIR in $(find $ACTUAL_OUTPUT_DIR/mismatchPath -mindepth 1 -type d); do 112 # Add a file to any empty subdirectories.
epoger 2013/06/21 17:39:42 Patchset 1 fixes the way we prevent empty subdirec
113 echo "Created additional file to make sure directory isn't empty, because self-test cannot handle empty directories." >$MISMATCHDIR/bogusfile 113 for DIR in $(find $ACTUAL_OUTPUT_DIR -mindepth 1 -type d); do
114 done 114 echo "Created additional file to make sure directory isn't empty, because se lf-test cannot handle empty directories." >$DIR/bogusfile
115 fi 115 done
116 116
117 compare_directories $EXPECTED_OUTPUT_DIR $ACTUAL_OUTPUT_DIR 117 compare_directories $EXPECTED_OUTPUT_DIR $ACTUAL_OUTPUT_DIR
118 } 118 }
119 119
120 # Create input dir (at path $1) with expectations (both image and json) 120 # Create input dir (at path $1) with expectations (both image and json)
121 # that gm will match or mismatch as appropriate. 121 # that gm will match or mismatch as appropriate.
122 # 122 #
123 # We used to check these files into SVN, but then we needed to rebaseline them 123 # We used to check these files into SVN, but then we needed to rebaseline them
124 # when our drawing changed at all... so, as proposed in 124 # when our drawing changed at all... so, as proposed in
125 # http://code.google.com/p/skia/issues/detail?id=1068 , we generate them 125 # http://code.google.com/p/skia/issues/detail?id=1068 , we generate them
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 for CASE in $FAILING_CASES; do 229 for CASE in $FAILING_CASES; do
230 assert_fails "python gm/display_json_results.py $GM_OUTPUTS/$CASE/$OUTPUT_EXPE CTED_SUBDIR/json-summary.txt" 230 assert_fails "python gm/display_json_results.py $GM_OUTPUTS/$CASE/$OUTPUT_EXPE CTED_SUBDIR/json-summary.txt"
231 done 231 done
232 232
233 if [ $ENCOUNTERED_ANY_ERRORS == 0 ]; then 233 if [ $ENCOUNTERED_ANY_ERRORS == 0 ]; then
234 echo "All tests passed." 234 echo "All tests passed."
235 exit 0 235 exit 0
236 else 236 else
237 exit 1 237 exit 1
238 fi 238 fi
OLDNEW
« no previous file with comments | « gm/tests/outputs/pipe-playback-failure/output-expected/writePath/bogusfile ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698