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 246 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
257 # Exercise display_json_results.py | 257 # Exercise display_json_results.py |
258 PASSING_CASES="compared-against-identical-bytes-json compared-against-identical-
pixels-json" | 258 PASSING_CASES="compared-against-identical-bytes-json compared-against-identical-
pixels-json" |
259 FAILING_CASES="compared-against-different-pixels-json" | 259 FAILING_CASES="compared-against-different-pixels-json" |
260 for CASE in $PASSING_CASES; do | 260 for CASE in $PASSING_CASES; do |
261 assert_passes "python gm/display_json_results.py $GM_OUTPUTS/$CASE/$OUTPUT_EXP
ECTED_SUBDIR/json-summary.txt" | 261 assert_passes "python gm/display_json_results.py $GM_OUTPUTS/$CASE/$OUTPUT_EXP
ECTED_SUBDIR/json-summary.txt" |
262 done | 262 done |
263 for CASE in $FAILING_CASES; do | 263 for CASE in $FAILING_CASES; do |
264 assert_fails "python gm/display_json_results.py $GM_OUTPUTS/$CASE/$OUTPUT_EXPE
CTED_SUBDIR/json-summary.txt" | 264 assert_fails "python gm/display_json_results.py $GM_OUTPUTS/$CASE/$OUTPUT_EXPE
CTED_SUBDIR/json-summary.txt" |
265 done | 265 done |
266 | 266 |
267 # Exercise all rebaseline_server unittests. | 267 # Exercise all Python unittests. |
268 assert_passes "python gm/rebaseline_server/test_all.py" | 268 assert_passes "python gm/test_all.py" |
269 | 269 |
270 echo | 270 echo |
271 if [ $ENCOUNTERED_ANY_ERRORS == 0 ]; then | 271 if [ $ENCOUNTERED_ANY_ERRORS == 0 ]; then |
272 echo "All tests passed." | 272 echo "All tests passed." |
273 exit 0 | 273 exit 0 |
274 else | 274 else |
275 echo "Some tests failed." | 275 echo "Some tests failed." |
276 exit 1 | 276 exit 1 |
277 fi | 277 fi |
OLD | NEW |