diff options
author | 2012-05-18 18:25:26 +0000 | |
---|---|---|
committer | 2012-05-18 18:25:26 +0000 | |
commit | 90cb9b325ce81f18a787a29ca33588b0c2468393 (patch) | |
tree | ba3fc5638b38fdc462bff8ccd5dd3690c14dab94 /tools/tests | |
parent | 6f3437fce02ac7501cfce482b17c18861c292a1b (diff) |
skdiff test-only change: add test of --nodiffs mode, make tests validate return value
Review URL: https://codereview.appspot.com/6206085
git-svn-id: http://skia.googlecode.com/svn/trunk@3999 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'tools/tests')
-rwxr-xr-x | tools/tests/run.sh | 7 | ||||
-rw-r--r-- | tools/tests/skdiff/test1/output-expected/command_line | 1 | ||||
-rw-r--r-- | tools/tests/skdiff/test1/output-expected/return_value | 1 | ||||
-rw-r--r-- | tools/tests/skdiff/test2/output-expected/command_line | 1 | ||||
-rw-r--r-- | tools/tests/skdiff/test2/output-expected/return_value | 1 | ||||
-rw-r--r-- | tools/tests/skdiff/test2/output-expected/stdout | 14 |
6 files changed, 24 insertions, 1 deletions
diff --git a/tools/tests/run.sh b/tools/tests/run.sh index c3c5bbc999..a3e610df1e 100755 --- a/tools/tests/run.sh +++ b/tools/tests/run.sh @@ -30,10 +30,15 @@ function skdiff_test { rm -rf $ACTUAL_OUTPUT_DIR mkdir -p $ACTUAL_OUTPUT_DIR - $SKDIFF_BINARY $SKDIFF_ARGS $ACTUAL_OUTPUT_DIR &>$ACTUAL_OUTPUT_DIR/stdout + COMMAND="$SKDIFF_BINARY $SKDIFF_ARGS $ACTUAL_OUTPUT_DIR" + echo "$COMMAND" >$ACTUAL_OUTPUT_DIR/command_line + $COMMAND &>$ACTUAL_OUTPUT_DIR/stdout + echo $? >$ACTUAL_OUTPUT_DIR/return_value + compare_directories $EXPECTED_OUTPUT_DIR $ACTUAL_OUTPUT_DIR } SKDIFF_TESTDIR=tools/tests/skdiff skdiff_test "$SKDIFF_TESTDIR/baseDir $SKDIFF_TESTDIR/comparisonDir" "$SKDIFF_TESTDIR/test1" +skdiff_test "--nodiffs $SKDIFF_TESTDIR/baseDir $SKDIFF_TESTDIR/comparisonDir" "$SKDIFF_TESTDIR/test2" echo "All tests passed." diff --git a/tools/tests/skdiff/test1/output-expected/command_line b/tools/tests/skdiff/test1/output-expected/command_line new file mode 100644 index 0000000000..7ed9128295 --- /dev/null +++ b/tools/tests/skdiff/test1/output-expected/command_line @@ -0,0 +1 @@ +out/Debug/skdiff tools/tests/skdiff/baseDir tools/tests/skdiff/comparisonDir tools/tests/skdiff/test1/output-actual diff --git a/tools/tests/skdiff/test1/output-expected/return_value b/tools/tests/skdiff/test1/output-expected/return_value new file mode 100644 index 0000000000..573541ac97 --- /dev/null +++ b/tools/tests/skdiff/test1/output-expected/return_value @@ -0,0 +1 @@ +0 diff --git a/tools/tests/skdiff/test2/output-expected/command_line b/tools/tests/skdiff/test2/output-expected/command_line new file mode 100644 index 0000000000..b0bdd6291e --- /dev/null +++ b/tools/tests/skdiff/test2/output-expected/command_line @@ -0,0 +1 @@ +out/Debug/skdiff --nodiffs tools/tests/skdiff/baseDir tools/tests/skdiff/comparisonDir tools/tests/skdiff/test2/output-actual diff --git a/tools/tests/skdiff/test2/output-expected/return_value b/tools/tests/skdiff/test2/output-expected/return_value new file mode 100644 index 0000000000..573541ac97 --- /dev/null +++ b/tools/tests/skdiff/test2/output-expected/return_value @@ -0,0 +1 @@ +0 diff --git a/tools/tests/skdiff/test2/output-expected/stdout b/tools/tests/skdiff/test2/output-expected/stdout new file mode 100644 index 0000000000..5567977d7e --- /dev/null +++ b/tools/tests/skdiff/test2/output-expected/stdout @@ -0,0 +1,14 @@ +ERROR: no codec found for <tools/tests/skdiff/baseDir/different-bits-unknown-format.xyz> +ERROR: no codec found for <tools/tests/skdiff/baseDir/identical-bits-unknown-format.xyz> +baseDir is [tools/tests/skdiff/baseDir/] +comparisonDir is [tools/tests/skdiff/comparisonDir/] +not writing any diffs to outputDir [tools/tests/skdiff/test2/output-actual/] +Missing in baseDir: + missing-from-baseDir.png + missing-from-baseDir.xyz +Missing in comparisonDir: + missing-from-comparisonDir.png + missing-from-comparisonDir.xyz +4 of 12 images matched. +Maximum pixel intensity mismatch 239 +Largest area mismatch was 100.00% of pixels |