X-Git-Url: https://git.cworth.org/git?p=apitrace-tests;a=blobdiff_plain;f=cli%2Fcli-diff-images-mismatch.script;h=a325479e7ff1ec30576cbf965bdec05ad3643b28;hp=9c97fa3f6f58eb1d72408cd80f94bd2411928628;hb=b6bfb80debba692868d8ea2831511db42ac5b397;hpb=21e5859e0292d7adc067f98a87be1bb0fe5d11d4 diff --git a/cli/cli-diff-images-mismatch.script b/cli/cli-diff-images-mismatch.script index 9c97fa3..a325479 100644 --- a/cli/cli-diff-images-mismatch.script +++ b/cli/cli-diff-images-mismatch.script @@ -1,4 +1,18 @@ +# The first two steps are just as in cli-diff-images. Dump images from +# a trace into an empty directory. + rm_and_mkdir ./tri-out apitrace dump-images -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 +# non-zero return value from apitrace and fail the test if it is not +# seen. + EXPECT_FAILURE: apitrace diff-images -v ./tri-ref-mismatch ./tri-out + +# In addition to getting the return value indicating an error, let's +# 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"