aboutsummaryrefslogtreecommitdiffhomepage
path: root/gm/tests
diff options
context:
space:
mode:
Diffstat (limited to 'gm/tests')
-rw-r--r--gm/tests/outputs/compared-against-different-pixels-images/output-expected/stdout5
-rw-r--r--gm/tests/outputs/compared-against-different-pixels-json/output-expected/stdout5
-rw-r--r--gm/tests/outputs/compared-against-empty-dir/output-expected/stdout5
-rw-r--r--gm/tests/outputs/compared-against-identical-bytes-images/output-expected/stdout5
-rw-r--r--gm/tests/outputs/compared-against-identical-bytes-json/output-expected/stdout5
-rw-r--r--gm/tests/outputs/compared-against-identical-pixels-images/output-expected/stdout5
-rw-r--r--gm/tests/outputs/compared-against-identical-pixels-json/output-expected/stdout5
-rw-r--r--gm/tests/outputs/no-readpath/output-expected/stdout5
-rw-r--r--gm/tests/outputs/pipe-playback-failure/output-expected/command_line1
-rw-r--r--gm/tests/outputs/pipe-playback-failure/output-expected/json-summary.txt33
-rw-r--r--gm/tests/outputs/pipe-playback-failure/output-expected/return_value1
-rw-r--r--gm/tests/outputs/pipe-playback-failure/output-expected/stderr1
-rw-r--r--gm/tests/outputs/pipe-playback-failure/output-expected/stdout13
-rwxr-xr-xgm/tests/run.sh3
14 files changed, 76 insertions, 16 deletions
diff --git a/gm/tests/outputs/compared-against-different-pixels-images/output-expected/stdout b/gm/tests/outputs/compared-against-different-pixels-images/output-expected/stdout
index 3067409e2e..8b8e61ddc3 100644
--- a/gm/tests/outputs/compared-against-different-pixels-images/output-expected/stdout
+++ b/gm/tests/outputs/compared-against-different-pixels-images/output-expected/stdout
@@ -4,9 +4,10 @@ GM: Ran 1 GMs
GM: ... over 2 configs ["8888", "565"]
GM: ... and 7 modes ["pipe", "pipe cross-process", "pipe cross-process, shared address", "replay", "rtree", "serialize", "tilegrid"]
GM: ... so there should be a total of 9 tests.
-GM: Ran 9 tests: NoGpuContext=0 ImageMismatch=2 MissingExpectations=0 WritingReferenceImage=0
+GM: Ran 9 tests: NoGpuContext=0 RenderModeMismatch=0 ExpectationsMismatch=2 MissingExpectations=0 WritingReferenceImage=0
GM: [*] 0 NoGpuContext:
-GM: [*] 2 ImageMismatch: 8888/selftest1 565/selftest1
+GM: [*] 0 RenderModeMismatch:
+GM: [*] 2 ExpectationsMismatch: 8888/selftest1 565/selftest1
GM: [ ] 0 MissingExpectations:
GM: [*] 0 WritingReferenceImage:
GM: (results marked with [*] will cause nonzero return value)
diff --git a/gm/tests/outputs/compared-against-different-pixels-json/output-expected/stdout b/gm/tests/outputs/compared-against-different-pixels-json/output-expected/stdout
index 84b2737216..2fd0269ea3 100644
--- a/gm/tests/outputs/compared-against-different-pixels-json/output-expected/stdout
+++ b/gm/tests/outputs/compared-against-different-pixels-json/output-expected/stdout
@@ -4,9 +4,10 @@ GM: Ran 1 GMs
GM: ... over 2 configs ["8888", "565"]
GM: ... and 7 modes ["pipe", "pipe cross-process", "pipe cross-process, shared address", "replay", "rtree", "serialize", "tilegrid"]
GM: ... so there should be a total of 9 tests.
-GM: Ran 9 tests: NoGpuContext=0 ImageMismatch=2 MissingExpectations=0 WritingReferenceImage=0
+GM: Ran 9 tests: NoGpuContext=0 RenderModeMismatch=0 ExpectationsMismatch=2 MissingExpectations=0 WritingReferenceImage=0
GM: [*] 0 NoGpuContext:
-GM: [*] 2 ImageMismatch: 8888/selftest1 565/selftest1
+GM: [*] 0 RenderModeMismatch:
+GM: [*] 2 ExpectationsMismatch: 8888/selftest1 565/selftest1
GM: [ ] 0 MissingExpectations:
GM: [*] 0 WritingReferenceImage:
GM: (results marked with [*] will cause nonzero return value)
diff --git a/gm/tests/outputs/compared-against-empty-dir/output-expected/stdout b/gm/tests/outputs/compared-against-empty-dir/output-expected/stdout
index a57916e504..829c05e6df 100644
--- a/gm/tests/outputs/compared-against-empty-dir/output-expected/stdout
+++ b/gm/tests/outputs/compared-against-empty-dir/output-expected/stdout
@@ -4,9 +4,10 @@ GM: Ran 1 GMs
GM: ... over 2 configs ["8888", "565"]
GM: ... and 7 modes ["pipe", "pipe cross-process", "pipe cross-process, shared address", "replay", "rtree", "serialize", "tilegrid"]
GM: ... so there should be a total of 9 tests.
-GM: Ran 9 tests: NoGpuContext=0 ImageMismatch=0 MissingExpectations=2 WritingReferenceImage=0
+GM: Ran 9 tests: NoGpuContext=0 RenderModeMismatch=0 ExpectationsMismatch=0 MissingExpectations=2 WritingReferenceImage=0
GM: [*] 0 NoGpuContext:
-GM: [*] 0 ImageMismatch:
+GM: [*] 0 RenderModeMismatch:
+GM: [*] 0 ExpectationsMismatch:
GM: [ ] 2 MissingExpectations: 8888/selftest1 565/selftest1
GM: [*] 0 WritingReferenceImage:
GM: (results marked with [*] will cause nonzero return value)
diff --git a/gm/tests/outputs/compared-against-identical-bytes-images/output-expected/stdout b/gm/tests/outputs/compared-against-identical-bytes-images/output-expected/stdout
index c67e5bcc8b..5788d69cca 100644
--- a/gm/tests/outputs/compared-against-identical-bytes-images/output-expected/stdout
+++ b/gm/tests/outputs/compared-against-identical-bytes-images/output-expected/stdout
@@ -4,9 +4,10 @@ GM: Ran 1 GMs
GM: ... over 2 configs ["8888", "565"]
GM: ... and 7 modes ["pipe", "pipe cross-process", "pipe cross-process, shared address", "replay", "rtree", "serialize", "tilegrid"]
GM: ... so there should be a total of 9 tests.
-GM: Ran 9 tests: NoGpuContext=0 ImageMismatch=0 MissingExpectations=0 WritingReferenceImage=0
+GM: Ran 9 tests: NoGpuContext=0 RenderModeMismatch=0 ExpectationsMismatch=0 MissingExpectations=0 WritingReferenceImage=0
GM: [*] 0 NoGpuContext:
-GM: [*] 0 ImageMismatch:
+GM: [*] 0 RenderModeMismatch:
+GM: [*] 0 ExpectationsMismatch:
GM: [ ] 0 MissingExpectations:
GM: [*] 0 WritingReferenceImage:
GM: (results marked with [*] will cause nonzero return value)
diff --git a/gm/tests/outputs/compared-against-identical-bytes-json/output-expected/stdout b/gm/tests/outputs/compared-against-identical-bytes-json/output-expected/stdout
index 25f51b5668..303a23fc35 100644
--- a/gm/tests/outputs/compared-against-identical-bytes-json/output-expected/stdout
+++ b/gm/tests/outputs/compared-against-identical-bytes-json/output-expected/stdout
@@ -4,9 +4,10 @@ GM: Ran 1 GMs
GM: ... over 2 configs ["8888", "565"]
GM: ... and 7 modes ["pipe", "pipe cross-process", "pipe cross-process, shared address", "replay", "rtree", "serialize", "tilegrid"]
GM: ... so there should be a total of 9 tests.
-GM: Ran 9 tests: NoGpuContext=0 ImageMismatch=0 MissingExpectations=0 WritingReferenceImage=0
+GM: Ran 9 tests: NoGpuContext=0 RenderModeMismatch=0 ExpectationsMismatch=0 MissingExpectations=0 WritingReferenceImage=0
GM: [*] 0 NoGpuContext:
-GM: [*] 0 ImageMismatch:
+GM: [*] 0 RenderModeMismatch:
+GM: [*] 0 ExpectationsMismatch:
GM: [ ] 0 MissingExpectations:
GM: [*] 0 WritingReferenceImage:
GM: (results marked with [*] will cause nonzero return value)
diff --git a/gm/tests/outputs/compared-against-identical-pixels-images/output-expected/stdout b/gm/tests/outputs/compared-against-identical-pixels-images/output-expected/stdout
index d23ed86520..4c4edba270 100644
--- a/gm/tests/outputs/compared-against-identical-pixels-images/output-expected/stdout
+++ b/gm/tests/outputs/compared-against-identical-pixels-images/output-expected/stdout
@@ -4,9 +4,10 @@ GM: Ran 1 GMs
GM: ... over 2 configs ["8888", "565"]
GM: ... and 7 modes ["pipe", "pipe cross-process", "pipe cross-process, shared address", "replay", "rtree", "serialize", "tilegrid"]
GM: ... so there should be a total of 9 tests.
-GM: Ran 9 tests: NoGpuContext=0 ImageMismatch=0 MissingExpectations=0 WritingReferenceImage=0
+GM: Ran 9 tests: NoGpuContext=0 RenderModeMismatch=0 ExpectationsMismatch=0 MissingExpectations=0 WritingReferenceImage=0
GM: [*] 0 NoGpuContext:
-GM: [*] 0 ImageMismatch:
+GM: [*] 0 RenderModeMismatch:
+GM: [*] 0 ExpectationsMismatch:
GM: [ ] 0 MissingExpectations:
GM: [*] 0 WritingReferenceImage:
GM: (results marked with [*] will cause nonzero return value)
diff --git a/gm/tests/outputs/compared-against-identical-pixels-json/output-expected/stdout b/gm/tests/outputs/compared-against-identical-pixels-json/output-expected/stdout
index 147c38340d..9a9d91b25f 100644
--- a/gm/tests/outputs/compared-against-identical-pixels-json/output-expected/stdout
+++ b/gm/tests/outputs/compared-against-identical-pixels-json/output-expected/stdout
@@ -4,9 +4,10 @@ GM: Ran 1 GMs
GM: ... over 2 configs ["8888", "565"]
GM: ... and 7 modes ["pipe", "pipe cross-process", "pipe cross-process, shared address", "replay", "rtree", "serialize", "tilegrid"]
GM: ... so there should be a total of 9 tests.
-GM: Ran 9 tests: NoGpuContext=0 ImageMismatch=0 MissingExpectations=0 WritingReferenceImage=0
+GM: Ran 9 tests: NoGpuContext=0 RenderModeMismatch=0 ExpectationsMismatch=0 MissingExpectations=0 WritingReferenceImage=0
GM: [*] 0 NoGpuContext:
-GM: [*] 0 ImageMismatch:
+GM: [*] 0 RenderModeMismatch:
+GM: [*] 0 ExpectationsMismatch:
GM: [ ] 0 MissingExpectations:
GM: [*] 0 WritingReferenceImage:
GM: (results marked with [*] will cause nonzero return value)
diff --git a/gm/tests/outputs/no-readpath/output-expected/stdout b/gm/tests/outputs/no-readpath/output-expected/stdout
index e3b101e531..1bdc86daf7 100644
--- a/gm/tests/outputs/no-readpath/output-expected/stdout
+++ b/gm/tests/outputs/no-readpath/output-expected/stdout
@@ -3,9 +3,10 @@ GM: Ran 1 GMs
GM: ... over 2 configs ["8888", "565"]
GM: ... and 7 modes ["pipe", "pipe cross-process", "pipe cross-process, shared address", "replay", "rtree", "serialize", "tilegrid"]
GM: ... so there should be a total of 9 tests.
-GM: Ran 9 tests: NoGpuContext=0 ImageMismatch=0 MissingExpectations=2 WritingReferenceImage=0
+GM: Ran 9 tests: NoGpuContext=0 RenderModeMismatch=0 ExpectationsMismatch=0 MissingExpectations=2 WritingReferenceImage=0
GM: [*] 0 NoGpuContext:
-GM: [*] 0 ImageMismatch:
+GM: [*] 0 RenderModeMismatch:
+GM: [*] 0 ExpectationsMismatch:
GM: [ ] 2 MissingExpectations: 8888/selftest1 565/selftest1
GM: [*] 0 WritingReferenceImage:
GM: (results marked with [*] will cause nonzero return value)
diff --git a/gm/tests/outputs/pipe-playback-failure/output-expected/command_line b/gm/tests/outputs/pipe-playback-failure/output-expected/command_line
new file mode 100644
index 0000000000..950339da65
--- /dev/null
+++ b/gm/tests/outputs/pipe-playback-failure/output-expected/command_line
@@ -0,0 +1 @@
+out/Debug/gm --simulatePipePlaybackFailure --hierarchy --match selftest1 --config 8888 565 -r gm/tests/inputs/json/identical-pixels.json --writeJsonSummaryPath gm/tests/outputs/pipe-playback-failure/output-actual/json-summary.txt
diff --git a/gm/tests/outputs/pipe-playback-failure/output-expected/json-summary.txt b/gm/tests/outputs/pipe-playback-failure/output-expected/json-summary.txt
new file mode 100644
index 0000000000..249fe09335
--- /dev/null
+++ b/gm/tests/outputs/pipe-playback-failure/output-expected/json-summary.txt
@@ -0,0 +1,33 @@
+{
+ "actual-results" : {
+ "failed" : {
+ "comparison/selftest1-pipe" : {
+ "checksum" : 4259036727585789440
+ }
+ },
+ "failure-ignored" : null,
+ "no-comparison" : null,
+ "succeeded" : {
+ "565/selftest1" : {
+ "checksum" : 9512553915271796906
+ },
+ "8888/selftest1" : {
+ "checksum" : 14022967492765711532
+ }
+ }
+ },
+ "expected-results" : {
+ "565/selftest1" : {
+ "checksums" : [ 9512553915271796906 ],
+ "ignore-failure" : false
+ },
+ "8888/selftest1" : {
+ "checksums" : [ 14022967492765711532 ],
+ "ignore-failure" : false
+ },
+ "comparison/selftest1-pipe" : {
+ "checksums" : [ 14022967492765711532 ],
+ "ignore-failure" : false
+ }
+ }
+}
diff --git a/gm/tests/outputs/pipe-playback-failure/output-expected/return_value b/gm/tests/outputs/pipe-playback-failure/output-expected/return_value
new file mode 100644
index 0000000000..ace9d03621
--- /dev/null
+++ b/gm/tests/outputs/pipe-playback-failure/output-expected/return_value
@@ -0,0 +1 @@
+255
diff --git a/gm/tests/outputs/pipe-playback-failure/output-expected/stderr b/gm/tests/outputs/pipe-playback-failure/output-expected/stderr
new file mode 100644
index 0000000000..e65d374e8a
--- /dev/null
+++ b/gm/tests/outputs/pipe-playback-failure/output-expected/stderr
@@ -0,0 +1 @@
+GM: ---- comparison/selftest1-pipe: 60000 (of 60000) differing pixels, max per-channel mismatch R=135 G=246 B=135 A=0
diff --git a/gm/tests/outputs/pipe-playback-failure/output-expected/stdout b/gm/tests/outputs/pipe-playback-failure/output-expected/stdout
new file mode 100644
index 0000000000..52fc54f2a1
--- /dev/null
+++ b/gm/tests/outputs/pipe-playback-failure/output-expected/stdout
@@ -0,0 +1,13 @@
+GM: reading expectations from JSON summary file gm/tests/inputs/json/identical-pixels.json
+GM: drawing... selftest1 [300 200]
+GM: Ran 1 GMs
+GM: ... over 2 configs ["8888", "565"]
+GM: ... and 5 modes ["pipe", "replay", "rtree", "serialize", "tilegrid"]
+GM: ... so there should be a total of 7 tests.
+GM: Ran 7 tests: NoGpuContext=0 RenderModeMismatch=1 ExpectationsMismatch=0 MissingExpectations=0 WritingReferenceImage=0
+GM: [*] 0 NoGpuContext:
+GM: [*] 1 RenderModeMismatch: comparison/selftest1-pipe
+GM: [*] 0 ExpectationsMismatch:
+GM: [ ] 0 MissingExpectations:
+GM: [*] 0 WritingReferenceImage:
+GM: (results marked with [*] will cause nonzero return value)
diff --git a/gm/tests/run.sh b/gm/tests/run.sh
index 7ec08be567..093f7d777e 100755
--- a/gm/tests/run.sh
+++ b/gm/tests/run.sh
@@ -156,4 +156,7 @@ gm_test "--hierarchy --match selftest1 $CONFIGS -r $GM_INPUTS/images/empty-dir"
# section should be empty.
gm_test "--hierarchy --match selftest1 $CONFIGS" "$GM_OUTPUTS/no-readpath"
+# Test what happens if a subset of the renderModes fail (e.g. pipe)
+gm_test "--simulatePipePlaybackFailure --hierarchy --match selftest1 $CONFIGS -r $GM_INPUTS/json/identical-pixels.json" "$GM_OUTPUTS/pipe-playback-failure"
+
echo "All tests passed."