]> git.cworth.org Git - apitrace-tests/blobdiff - cli/cli-diff-images.script
Add test to ensure that unused textures are dropped from a trace.
[apitrace-tests] / cli / cli-diff-images.script
index cb4630f3b6e489ee255b1be1675570b2075ba40c..90d27cc198f9126e6c5aee00ce681fc0a48ad973 100644 (file)
@@ -1,4 +1,18 @@
+# Make a directory for the output images
+
 rm_and_mkdir ./tri-out
-apitrace dump-images -o ./tri-out/tri tri.trace
+
+# Generate images for every frame (only 1) of a trace
+
+apitrace dump-images --call-nos=no -o ./tri-out/tri tri.trace
+
+# Compare the result of "apitrace dump-images" with our reference
+
 apitrace diff-images -v ./tri-ref ./tri-out
-expect "Comparing ./tri-ref/tri0000000027.png and ./tri-out/tri0000000027.png ... MATCH\n"
+
+# Ensure that the "apitrace diff-images" actually did something.  This
+# is important since if it couldn't find images in one directory or
+# the other then it would just silently return 0 and this test would
+# incorrectly pass.
+
+expect "Comparing ./tri-ref/tri0000000000.png and ./tri-out/tri0000000000.png ... MATCH\n"