]> git.cworth.org Git - apitrace-tests/commitdiff
cli: Use new --call-nos=no call to "apitrace dump-images" for consistent results
authorCarl Worth <cworth@cworth.org>
Mon, 13 Aug 2012 00:00:38 +0000 (17:00 -0700)
committerJosé Fonseca <jose.r.fonseca@gmail.com>
Sat, 1 Dec 2012 10:15:48 +0000 (10:15 +0000)
Recent "apitrace trim" is now dropping uninteresting calls by
default. This means that the call numbers of rendering operations are
changing. Consequently, image comparisons were failing not due to
image-content differences, but simply because the filenames (with
embedded call numbers in them) no longer matched.

We can avoid this problem by using the --call-nos=no option which was
added to "apitrace dump-images" in very recent versions.

cli/cli-diff-images-mismatch.script
cli/cli-diff-images.script
cli/cli-trim-single-swapbuffers.script
cli/tri-ref-mismatch/tri0000000000.png [new file with mode: 0644]
cli/tri-ref-mismatch/tri0000000027.png [deleted file]
cli/tri-ref/tri0000000000.png [new file with mode: 0644]
cli/tri-ref/tri0000000027.png [deleted file]

index a325479e7ff1ec30576cbf965bdec05ad3643b28..995b7e515235d7dabcd4217a6742cc5bc1f6166c 100644 (file)
@@ -2,7 +2,7 @@
 # a trace into an empty directory.
 
 rm_and_mkdir ./tri-out
-apitrace dump-images -o ./tri-out/tri tri.trace
+apitrace dump-images --call-nos=no -o ./tri-out/tri tri.trace
 
 # Compare the dumped image with a doctored image to provoke a failure.
 # The EXPECT_FAILURE attribute causes the test driver to look for a
@@ -15,4 +15,4 @@ EXPECT_FAILURE: apitrace diff-images -v ./tri-ref-mismatch ./tri-out
 # also require that "apitrace diff-images" gave us the output we
 # expect.
 
-expect "Comparing ./tri-ref-mismatch/tri0000000027.png and ./tri-out/tri0000000027.png ... MISMATCH\n"
+expect "Comparing ./tri-ref-mismatch/tri0000000000.png and ./tri-out/tri0000000000.png ... MISMATCH\n"
index e575f1a6149a6a806336e08f02330c4c842472ca..90d27cc198f9126e6c5aee00ce681fc0a48ad973 100644 (file)
@@ -4,7 +4,7 @@ rm_and_mkdir ./tri-out
 
 # Generate images for every frame (only 1) of a trace
 
-apitrace dump-images -o ./tri-out/tri tri.trace
+apitrace dump-images --call-nos=no -o ./tri-out/tri tri.trace
 
 # Compare the result of "apitrace dump-images" with our reference
 
@@ -15,4 +15,4 @@ apitrace diff-images -v ./tri-ref ./tri-out
 # the other then it would just silently return 0 and this test would
 # incorrectly pass.
 
-expect "Comparing ./tri-ref/tri0000000027.png and ./tri-out/tri0000000027.png ... MATCH\n"
+expect "Comparing ./tri-ref/tri0000000000.png and ./tri-out/tri0000000000.png ... MATCH\n"
index 19e10a8f67e5c851b3ed18d2646b3567732706dc..a04ad0e77ac4de5476bb6daec192a8f40d8845ba 100644 (file)
@@ -5,11 +5,11 @@ apitrace trim --calls=27 tri.trace
 # Then dump the image and compare to our reference
 
 rm_and_mkdir ./tri-out
-apitrace dump-images -o ./tri-out/tri tri-trim.trace
+apitrace dump-images --call-nos=no -o ./tri-out/tri tri-trim.trace
 apitrace diff-images -v ./tri-ref ./tri-out
 
 # In addition to getting the return value indicating no error, let's
 # also require that "apitrace diff-images" gave us the output we
 # expect.
 
-expect "Comparing ./tri-ref/tri0000000027.png and ./tri-out/tri0000000027.png ... MATCH\n"
+expect "Comparing ./tri-ref/tri0000000000.png and ./tri-out/tri0000000000.png ... MATCH\n"
diff --git a/cli/tri-ref-mismatch/tri0000000000.png b/cli/tri-ref-mismatch/tri0000000000.png
new file mode 100644 (file)
index 0000000..e682610
Binary files /dev/null and b/cli/tri-ref-mismatch/tri0000000000.png differ
diff --git a/cli/tri-ref-mismatch/tri0000000027.png b/cli/tri-ref-mismatch/tri0000000027.png
deleted file mode 100644 (file)
index e682610..0000000
Binary files a/cli/tri-ref-mismatch/tri0000000027.png and /dev/null differ
diff --git a/cli/tri-ref/tri0000000000.png b/cli/tri-ref/tri0000000000.png
new file mode 100644 (file)
index 0000000..b7840bd
Binary files /dev/null and b/cli/tri-ref/tri0000000000.png differ
diff --git a/cli/tri-ref/tri0000000027.png b/cli/tri-ref/tri0000000027.png
deleted file mode 100644 (file)
index b7840bd..0000000
Binary files a/cli/tri-ref/tri0000000027.png and /dev/null differ