OLD | NEW |
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 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
202 gm_test "--verbose --hierarchy --match selftest1 $CONFIGS -r $GM_INPUTS/json/dif
ferent-pixels.json" "$GM_OUTPUTS/compared-against-different-pixels-json" | 202 gm_test "--verbose --hierarchy --match selftest1 $CONFIGS -r $GM_INPUTS/json/dif
ferent-pixels.json" "$GM_OUTPUTS/compared-against-different-pixels-json" |
203 | 203 |
204 # Exercise --ignoreTests flag. | 204 # Exercise --ignoreTests flag. |
205 gm_test "--verbose --hierarchy --match selftest1 --ignoreTests 8888/selfte $CONF
IGS -r $GM_INPUTS/json/different-pixels.json" "$GM_OUTPUTS/ignoring-one-test" | 205 gm_test "--verbose --hierarchy --match selftest1 --ignoreTests 8888/selfte $CONF
IGS -r $GM_INPUTS/json/different-pixels.json" "$GM_OUTPUTS/ignoring-one-test" |
206 | 206 |
207 # Compare different pixels, but with a SUBSET of the expectations marked as | 207 # Compare different pixels, but with a SUBSET of the expectations marked as |
208 # ignore-failure. | 208 # ignore-failure. |
209 gm_test "--verbose --hierarchy --match selftest1 $CONFIGS -r $GM_INPUTS/json/dif
ferent-pixels-ignore-some-failures.json" "$GM_OUTPUTS/ignoring-some-failures" | 209 gm_test "--verbose --hierarchy --match selftest1 $CONFIGS -r $GM_INPUTS/json/dif
ferent-pixels-ignore-some-failures.json" "$GM_OUTPUTS/ignoring-some-failures" |
210 | 210 |
211 # Compare generated image against an empty "expected image" dir. | 211 # Compare generated image against an empty "expected image" dir. |
212 gm_test "--verbose --hierarchy --match selftest1 $CONFIGS -r $GM_INPUTS/images/e
mpty-dir" "$GM_OUTPUTS/compared-against-empty-dir" | 212 # Even the tests that have been marked as ignore-failure should show up as |
| 213 # no-comparison. |
| 214 gm_test "--verbose --hierarchy --match selftest1 --ignoreTests 8888 $CONFIGS -r
$GM_INPUTS/images/empty-dir" "$GM_OUTPUTS/compared-against-empty-dir" |
213 | 215 |
214 # Compare generated image against a nonexistent "expected image" dir. | 216 # Compare generated image against a nonexistent "expected image" dir. |
215 gm_test "--verbose --hierarchy --match selftest1 $CONFIGS -r ../path/to/nowhere"
"$GM_OUTPUTS/compared-against-nonexistent-dir" | 217 gm_test "--verbose --hierarchy --match selftest1 $CONFIGS -r ../path/to/nowhere"
"$GM_OUTPUTS/compared-against-nonexistent-dir" |
216 | 218 |
217 # Compare generated image against an empty "expected image" dir, but NOT in verb
ose mode. | 219 # Compare generated image against an empty "expected image" dir, but NOT in verb
ose mode. |
218 gm_test "--hierarchy --match selftest1 $CONFIGS -r $GM_INPUTS/images/empty-dir"
"$GM_OUTPUTS/nonverbose" | 220 gm_test "--hierarchy --match selftest1 $CONFIGS -r $GM_INPUTS/images/empty-dir"
"$GM_OUTPUTS/nonverbose" |
219 | 221 |
220 # Add pdf to the list of configs. | 222 # Add pdf to the list of configs. |
221 gm_test "--verbose --hierarchy --match selftest1 $CONFIGS pdf -r $GM_INPUTS/json
/identical-bytes.json" "$GM_OUTPUTS/add-config-pdf" | 223 gm_test "--verbose --hierarchy --match selftest1 $CONFIGS pdf -r $GM_INPUTS/json
/identical-bytes.json" "$GM_OUTPUTS/add-config-pdf" |
222 | 224 |
(...skipping 26 matching lines...) Expand all Loading... |
249 for CASE in $FAILING_CASES; do | 251 for CASE in $FAILING_CASES; do |
250 assert_fails "python gm/display_json_results.py $GM_OUTPUTS/$CASE/$OUTPUT_EXPE
CTED_SUBDIR/json-summary.txt" | 252 assert_fails "python gm/display_json_results.py $GM_OUTPUTS/$CASE/$OUTPUT_EXPE
CTED_SUBDIR/json-summary.txt" |
251 done | 253 done |
252 | 254 |
253 if [ $ENCOUNTERED_ANY_ERRORS == 0 ]; then | 255 if [ $ENCOUNTERED_ANY_ERRORS == 0 ]; then |
254 echo "All tests passed." | 256 echo "All tests passed." |
255 exit 0 | 257 exit 0 |
256 else | 258 else |
257 exit 1 | 259 exit 1 |
258 fi | 260 fi |
OLD | NEW |