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 |
| 9 # |
8 # 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) |
9 # it only runs on Linux and Mac. | 11 # it only runs on Linux and Mac. |
10 # See https://code.google.com/p/skia/issues/detail?id=677 | 12 # See https://code.google.com/p/skia/issues/detail?id=677 |
11 # ('make tools/tests/run.sh work cross-platform') | 13 # ('make tools/tests/run.sh work cross-platform') |
12 # Ideally, these tests should pass on all development platforms... | 14 # Ideally, these tests should pass on all development platforms... |
13 # otherwise, how can developers be expected to test them before committing a | 15 # otherwise, how can developers be expected to test them before committing a |
14 # change? | 16 # change? |
15 | 17 |
16 # cd into .../trunk so all the paths will work | 18 # cd into .../trunk so all the paths will work |
17 cd $(dirname $0)/../.. | 19 cd $(dirname $0)/../.. |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 | 150 |
149 # Compare generated image against an empty "expected image" dir. | 151 # Compare generated image against an empty "expected image" dir. |
150 gm_test "--hierarchy --match selftest1 $CONFIGS -r $GM_INPUTS/images/empty-dir"
"$GM_OUTPUTS/compared-against-empty-dir" | 152 gm_test "--hierarchy --match selftest1 $CONFIGS -r $GM_INPUTS/images/empty-dir"
"$GM_OUTPUTS/compared-against-empty-dir" |
151 | 153 |
152 # If run without "-r", the JSON's "actual-results" section should contain | 154 # If run without "-r", the JSON's "actual-results" section should contain |
153 # actual checksums marked as "failure-ignored", but the "expected-results" | 155 # actual checksums marked as "failure-ignored", but the "expected-results" |
154 # section should be empty. | 156 # section should be empty. |
155 gm_test "--hierarchy --match selftest1 $CONFIGS" "$GM_OUTPUTS/no-readpath" | 157 gm_test "--hierarchy --match selftest1 $CONFIGS" "$GM_OUTPUTS/no-readpath" |
156 | 158 |
157 echo "All tests passed." | 159 echo "All tests passed." |
OLD | NEW |