Allow skimage expectations file to not exist.
authorscroggo@google.com <scroggo@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Wed, 19 Jun 2013 19:12:53 +0000 (19:12 +0000)
committerscroggo@google.com <scroggo@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Wed, 19 Jun 2013 19:12:53 +0000 (19:12 +0000)
If the file is not there, assume that all images are mismatches.
This allows running the test before the initial rebaseline.

R=epoger@google.com

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

git-svn-id: http://skia.googlecode.com/svn/trunk@9690 2bbb7eff-a529-9590-31e7-b0007b416f81

tools/skimage_main.cpp

index 107d3bfdb89cc5dd9faa26eb4e5b219dbd38c241..a6a2736e8d6852743f252c5332c52bb89ced8077 100644 (file)
@@ -484,7 +484,7 @@ int tool_main(int argc, char** argv) {
 
     SkAutoGraphics ag;
 
-    if (!FLAGS_readExpectationsPath.isEmpty()) {
+    if (!FLAGS_readExpectationsPath.isEmpty() && sk_exists(FLAGS_readExpectationsPath[0])) {
         gJsonExpectations.reset(SkNEW_ARGS(skiagm::JsonExpectationsSource,
                                            (FLAGS_readExpectationsPath[0])));
     }