tools/skimage_main.cpp:
Add the ability to write the results to checksum based filenames,
much like GM uses. This will allow using the skpdiff server to
rebaseline images.
Write the keys in the JSON file as <original image>_<pref config>.png,
so it matches gm_json.IMAGE_FILENAME_PATTERN. Also replace '_' with
'-' in the original file name, to avoid confusing the pattern matcher.
The '_' to '-' replacement also happens on the output filename.
Read the keys in a similar manner.
In make_outname, no longer remove a suffix. This fixes a bug where
subset decoding writes multiple subsets to the same file.
tools/rebaseline.py:
Since the filenames written to json files now match
gm_json.IMAGE_FILENAME_PATTERN, enable the option to match based
on configs/tests when rebaselining skimage.
test json files:
Update to match the new format of output.
gm/gm_expectations:
Add a constructor that takes a BitmapAndDigest as input.
tools/tests/skimage_self_test.py:
Test that reading the expectations file just created by skimage with
the same file actually compares to the original file (rather than just
succeeding because expectations were missing).
Change the expectations files to match the new format.
Will require a buildbot change to use the new flag: https://codereview.chromium.org/27389002/
BUG=1466
R=epoger@google.com
Review URL: https://codereview.chromium.org/26297004
git-svn-id: http://skia.googlecode.com/svn/trunk@11902 2bbb7eff-a529-9590-31e7-b0007b416f81
If the expectation is set to ignore failures, do not return a
negative 1 (indicating a failure) when a successful decode
does not match the expectation.
If the file could not be decoded at all, report this to the
user depending on the input expectations file:
No expectations:
Report failure. The user wanted to know if the file could be
decoded.
Expectations expected a valid result:
Report failure. The decode should have matched the result.
Empty expectations:
Print a message that the expectation was missing, but still
return success from skimage, since this is a newly added file
(i.e. it has no expectation yet).
Ignore failure:
Return success from skimage, since it is a known failure.
Update the self tests to ensure these behaviors.
R=epoger@google.com
Review URL: https://codereview.chromium.org/22293006
git-svn-id: http://skia.googlecode.com/svn/trunk@11790 2bbb7eff-a529-9590-31e7-b0007b416f81
BUG=skia:1512
The buildbot master continues to set gm_image_subdir, but the slaves no longer
use that component when building GM paths (they just use builder_name instead).
But gm_image_subdir is still used for SKP storage paths under
gs://chromium-skia-gm/playback/gm-actual , for now...
Immediately before committing this CL, I will copy the actual-results.json files
from their old locations to their new locations (within the skia-autogen repo)
so that both old and new versions of rebaseline.py will be able to retrieve
actual results, like so:
svn cp base-android-galaxy-nexus/Test-Android-GalaxyNexus-SGX540-Arm7-Debug/base-android-galaxy-nexus Test-Android-GalaxyNexus-SGX540-Arm7-Debug
svn cp base-android-galaxy-nexus/Test-Android-GalaxyNexus-SGX540-Arm7-Release/base-android-galaxy-nexus Test-Android-GalaxyNexus-SGX540-Arm7-Release
svn cp base-android-nexus-10/Test-Android-Nexus10-MaliT604-Arm7-Debug/base-android-nexus-10 Test-Android-Nexus10-MaliT604-Arm7-Debug
...
svn cp base-shuttle-win7-intel-float/Test-Win7-ShuttleA-HD2000-x86-Debug/base-shuttle-win7-intel-float Test-Win7-ShuttleA-HD2000-x86-Debug
svn cp base-shuttle-win7-intel-float/Test-Win7-ShuttleA-HD2000-x86-Release/base-shuttle-win7-intel-float Test-Win7-ShuttleA-HD2000-x86-Release
Once we see this CL land successfully, I will delete the actual-results.json
files from their OLD location within skia-autogen, like so:
svn rm base-android-galaxy-nexus
svn rm base-android-nexus-10
...
svn rm base-shuttle-win7-intel-directwrite
svn rm base-shuttle-win7-intel-float
R=borenet@google.com, rmistry@google.com
Review URL: https://codereview.chromium.org/23120002
git-svn-id: http://skia.googlecode.com/svn/trunk@10821 2bbb7eff-a529-9590-31e7-b0007b416f81
skimage_main:
Specify the full name of the expectations file to write on the command line,
rather than the folder to write 'results.json'. This is consistent with
writeJsonSummaryPath in GM, as well as the format for reading the file.
Further, it allows more flexibility to name the file.
Do not force opaque when writing bitmaps. skimage does its comparison on
the raw bitmaps. The images are written for visual comparison, and mostly
transparent bitmaps (like resources/plane.png) aren't meaningful when
forced opaque.
Provide an option to to write only mismatches to a directory. Handled
similar to the writePath.
Report a failure if there is no expectations file. This allows writing
to the mismatchPath so we can create an initial baseline.
Pass SkBitmap by const&.
skimage_self_test:
Include the name of the json file in the parameter passed to
createExpectationsPath. The name has been changed to be more specific.
.gitignore:
Ignore the new name of the file created by skimage_self_test.
run.sh:
Run skimage_self_tests.py
BUG=http://code.google.com/p/skia/issues/detail?id=1241R=epoger@google.com
Review URL: https://codereview.chromium.org/15813016
git-svn-id: http://skia.googlecode.com/svn/trunk@9474 2bbb7eff-a529-9590-31e7-b0007b416f81