Commit Graph

10 Commits

Author SHA1 Message Date
commit-bot@chromium.org
1f75ab9c66 add some .gitignores related to gm and tools
NOTREECHECKS=True
NOTRY=True
R=scroggo@google.com
TBR=scroggo

Author: epoger@google.com

Review URL: https://codereview.chromium.org/234603004

git-svn-id: http://skia.googlecode.com/svn/trunk@14150 2bbb7eff-a529-9590-31e7-b0007b416f81
2014-04-11 14:49:50 +00:00
scroggo@google.com
5187c4313c More work to integrate skimage with rebaseline tools.
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
2013-10-22 00:42:46 +00:00
scroggo@google.com
36c5bdb097 Truly ignore failures in skimage.
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
2013-10-15 20:29:37 +00:00
epoger@google.com
bfe9167c66 Add README file so git will create empty dir
BUG=skia:1613
(SkipBuildbotRuns)

R=rmistry@google.com

Review URL: https://codereview.chromium.org/24112002

git-svn-id: http://skia.googlecode.com/svn/trunk@11203 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-09-11 17:31:49 +00:00
scroggo@google.com
2b9424b342 Treat empty directory properly in skimage.
Instead of treating an empty directory as a file that failed to
decode, treat it as an empty directory.

Add self tests to check for this.

Builds upon from https://codereview.chromium.org/16866010,
which was reverted.

R=epoger@google.com

Review URL: https://codereview.chromium.org/17101029

git-svn-id: http://skia.googlecode.com/svn/trunk@9730 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-06-21 19:12:47 +00:00
epoger@google.com
c7e1873c85 skimage: revert r9642
git-svn-id: http://skia.googlecode.com/svn/trunk@9647 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-06-18 02:53:16 +00:00
epoger@google.com
e0433f1ad3 skimage: if --readPath points at an empty dir, create an empty expectations file
TBR=scroggo

Review URL: https://codereview.chromium.org/17294006

git-svn-id: http://skia.googlecode.com/svn/trunk@9642 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-06-17 19:34:58 +00:00
epoger@google.com
74feb1593a skimage self-tests: confirm correctness of bitmap hash values
R=scroggo@google.com

Review URL: https://codereview.chromium.org/16866010

git-svn-id: http://skia.googlecode.com/svn/trunk@9591 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-06-13 19:12:05 +00:00
scroggo@google.com
cf5eb6ab25 Preparations for running skimage tool on bots.
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=1241
R=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
2013-06-07 12:43:15 +00:00
scroggo@google.com
4fed643cb9 Create a self test for skimage.
Runs skimage twice: once to create an expectations file, and a
second time comparing against the file. Uses the files in
resources as test files.

R=epoger@google.com

Review URL: https://codereview.chromium.org/14969007

git-svn-id: http://skia.googlecode.com/svn/trunk@9123 2bbb7eff-a529-9590-31e7-b0007b416f81
2013-05-14 17:50:02 +00:00