aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/tests/run.sh
diff options
context:
space:
mode:
authorGravatar epoger@google.com <epoger@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-07-12 18:16:02 +0000
committerGravatar epoger@google.com <epoger@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-07-12 18:16:02 +0000
commit46a45963fa13082cbe0c800c92bccf2ac36c89b7 (patch)
tree0676bfd07e649eb955756616c7f3f210b5d2f451 /tools/tests/run.sh
parenta6c9e0e02be390d36b80f4872c628edb3594208e (diff)
skdiff: add --failonmismatches and --listfilename options, plus cleanup
These changes are needed in order to switch the buildbots from using "gm -r" to "skdiff" to compare gm results, and should be generally good for humans too. Review URL: https://codereview.appspot.com/6392054 git-svn-id: http://skia.googlecode.com/svn/trunk@4579 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'tools/tests/run.sh')
-rwxr-xr-xtools/tests/run.sh13
1 files changed, 7 insertions, 6 deletions
diff --git a/tools/tests/run.sh b/tools/tests/run.sh
index f6dbe27ca8..25baf1987a 100755
--- a/tools/tests/run.sh
+++ b/tools/tests/run.sh
@@ -42,19 +42,20 @@ SKDIFF_TESTDIR=tools/tests/skdiff
# Run skdiff over a variety of file pair types: identical bits, identical
# pixels, missing from baseDir, etc.
-# TODO: In the near future, skdiff will return a nonzero exit code in this case.
skdiff_test "$SKDIFF_TESTDIR/baseDir $SKDIFF_TESTDIR/comparisonDir" "$SKDIFF_TESTDIR/test1"
-# Same as above but without generating HTML output files.
-# TODO: In the near future, skdiff will return a nonzero exit code in this case.
-skdiff_test "--nodiffs $SKDIFF_TESTDIR/baseDir $SKDIFF_TESTDIR/comparisonDir" "$SKDIFF_TESTDIR/test2"
+# Same as above, except:
+# - return the number of mismatching file pairs
+# - list filenames with each result type to stdout
+# - don't generate HTML output files
+skdiff_test "--failonmismatches --listfilenames --nodiffs $SKDIFF_TESTDIR/baseDir $SKDIFF_TESTDIR/comparisonDir" "$SKDIFF_TESTDIR/test2"
# Run skdiff over just the files that have identical bits, to validate any
# behavior/return value differences in this case.
-skdiff_test "--nodiffs --match identical-bits $SKDIFF_TESTDIR/baseDir $SKDIFF_TESTDIR/comparisonDir" "$SKDIFF_TESTDIR/identical-bits"
+skdiff_test "--failonmismatches --nodiffs --match identical-bits $SKDIFF_TESTDIR/baseDir $SKDIFF_TESTDIR/comparisonDir" "$SKDIFF_TESTDIR/identical-bits"
# Run skdiff over just the files that have identical bits or identical pixels,
# to validate any behavior/return value differences in this case.
-skdiff_test "--nodiffs --match identical-bits --match identical-pixels $SKDIFF_TESTDIR/baseDir $SKDIFF_TESTDIR/comparisonDir" "$SKDIFF_TESTDIR/identical-bits-or-pixels"
+skdiff_test "--failonmismatches --nodiffs --match identical-bits --match identical-pixels $SKDIFF_TESTDIR/baseDir $SKDIFF_TESTDIR/comparisonDir" "$SKDIFF_TESTDIR/identical-bits-or-pixels"
echo "All tests passed."