test-only: add test coverage of skdiff over input with identical bits or pixels
Review URL: https://codereview.appspot.com/6260055
git-svn-id: http://skia.googlecode.com/svn/trunk@4084 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/tools/tests/run.sh b/tools/tests/run.sh
index a3e610d..f6dbe27 100755
--- a/tools/tests/run.sh
+++ b/tools/tests/run.sh
@@ -39,6 +39,22 @@
}
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"
+
+# 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"
+
+# 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"
+
echo "All tests passed."