GM: add --missingExpectationsPath option, similar to --mismatchPath
This will allow us to make the buildbots record all images EXCEPT those which
match expectations to Google Storage.
R=borenet@google.com
Review URL: https://codereview.chromium.org/17552012
git-svn-id: http://skia.googlecode.com/svn/trunk@9725 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/gm/gmmain.cpp b/gm/gmmain.cpp
index 42b7bda..ad7d55f 100644
--- a/gm/gmmain.cpp
+++ b/gm/gmmain.cpp
@@ -193,7 +193,8 @@
public:
GMMain() : fUseFileHierarchy(false), fWriteChecksumBasedFilenames(false),
fIgnorableErrorTypes(kDefaultIgnorableErrorTypes),
- fMismatchPath(NULL), fTestsRun(0), fRenderModesEncountered(1) {}
+ fMismatchPath(NULL), fMissingExpectationsPath(NULL), fTestsRun(0),
+ fRenderModesEncountered(1) {}
/**
* Assemble shortNamePlusConfig from (surprise!) shortName and configName.
@@ -767,6 +768,7 @@
*
* If fMismatchPath has been set, and there are pixel diffs, then the
* actual bitmap will be written out to a file within fMismatchPath.
+ * And similarly for fMissingExpectationsPath...
*
* @param expectations what expectations to compare actualBitmap against
* @param actualBitmapAndDigest the SkBitmap we actually generated, and its GmResultDigest
@@ -795,6 +797,16 @@
if (expectations.empty()) {
errors.add(kMissingExpectations_ErrorType);
+
+ // Write out the "actuals" for any tests without expectations, if we have
+ // been directed to do so.
+ if (fMissingExpectationsPath) {
+ SkString path = make_bitmap_filename(fMissingExpectationsPath, shortName,
+ configName, renderModeDescriptor,
+ actualBitmapAndDigest.fDigest);
+ write_bitmap(path, actualBitmapAndDigest.fBitmap);
+ }
+
} else if (!expectations.match(actualBitmapAndDigest.fDigest)) {
addToJsonSummary = true;
// The error mode we record depends on whether this was running
@@ -1178,6 +1190,7 @@
ErrorCombination fIgnorableErrorTypes;
const char* fMismatchPath;
+ const char* fMissingExpectationsPath;
// collection of tests that have failed with each ErrorType
SkTArray<SkString> fFailedTests[kLast_ErrorType+1];
@@ -1317,6 +1330,8 @@
"^ and $ requires an exact match\n"
"If a test does not match any list entry,\n"
"it is skipped unless some list entry starts with ~");
+DEFINE_string(missingExpectationsPath, "", "Write images for tests without expectations "
+ "into this directory.");
DEFINE_string(mismatchPath, "", "Write images for tests that failed due to "
"pixel mismatches into this directory.");
DEFINE_string(modulo, "", "[--modulo <remainder> <divisor>]: only run tests for which "
@@ -1799,6 +1814,9 @@
if (FLAGS_mismatchPath.count() == 1) {
gmmain.fMismatchPath = FLAGS_mismatchPath[0];
}
+ if (FLAGS_missingExpectationsPath.count() == 1) {
+ gmmain.fMissingExpectationsPath = FLAGS_missingExpectationsPath[0];
+ }
for (int i = 0; i < FLAGS_config.count(); i++) {
const char* config = FLAGS_config[i];
@@ -1987,6 +2005,10 @@
if (NULL != gmmain.fMismatchPath) {
gm_fprintf(stdout, "writing mismatches to %s\n", gmmain.fMismatchPath);
}
+ if (NULL != gmmain.fMissingExpectationsPath) {
+ gm_fprintf(stdout, "writing images without expectations to %s\n",
+ gmmain.fMissingExpectationsPath);
+ }
if (FLAGS_writePicturePath.count() == 1) {
gm_fprintf(stdout, "writing pictures to %s\n", FLAGS_writePicturePath[0]);
}
@@ -2017,6 +2039,12 @@
return -1;
}
}
+ if (NULL != gmmain.fMissingExpectationsPath) {
+ if (!prepare_subdirectories(gmmain.fMissingExpectationsPath, gmmain.fUseFileHierarchy,
+ configs)) {
+ return -1;
+ }
+ }
if (FLAGS_pdfJpegQuality < -1 || FLAGS_pdfJpegQuality > 100) {
gm_fprintf(stderr, "%s\n", "pdfJpegQuality must be in [-1 .. 100] range.");
diff --git a/gm/tests/outputs/checksum-based-filenames/output-expected/command_line b/gm/tests/outputs/checksum-based-filenames/output-expected/command_line
index 3e4ddb9..fbc8af7 100644
--- a/gm/tests/outputs/checksum-based-filenames/output-expected/command_line
+++ b/gm/tests/outputs/checksum-based-filenames/output-expected/command_line
@@ -1 +1 @@
-out/Debug/gm --verbose --writeChecksumBasedFilenames --match selftest1 --config 8888 565 -r gm/tests/inputs/json/different-pixels-no-hierarchy.json --writeJsonSummaryPath gm/tests/outputs/checksum-based-filenames/output-actual/json-summary.txt --writePath gm/tests/outputs/checksum-based-filenames/output-actual/writePath --mismatchPath gm/tests/outputs/checksum-based-filenames/output-actual/mismatchPath
+out/Debug/gm --verbose --writeChecksumBasedFilenames --match selftest1 --config 8888 565 -r gm/tests/inputs/json/different-pixels-no-hierarchy.json --writeJsonSummaryPath gm/tests/outputs/checksum-based-filenames/output-actual/json-summary.txt --writePath gm/tests/outputs/checksum-based-filenames/output-actual/writePath --mismatchPath gm/tests/outputs/checksum-based-filenames/output-actual/mismatchPath --missingExpectationsPath gm/tests/outputs/checksum-based-filenames/output-actual/missingExpectationsPath
diff --git a/gm/tests/outputs/checksum-based-filenames/output-expected/mismatchPath/bogusfile b/gm/tests/outputs/checksum-based-filenames/output-expected/mismatchPath/bogusfile
new file mode 100644
index 0000000..d86cd5b
--- /dev/null
+++ b/gm/tests/outputs/checksum-based-filenames/output-expected/mismatchPath/bogusfile
@@ -0,0 +1 @@
+Created additional file to make sure directory isn't empty, because self-test cannot handle empty directories.
diff --git a/gm/tests/outputs/checksum-based-filenames/output-expected/missingExpectationsPath/bogusfile b/gm/tests/outputs/checksum-based-filenames/output-expected/missingExpectationsPath/bogusfile
new file mode 100644
index 0000000..d86cd5b
--- /dev/null
+++ b/gm/tests/outputs/checksum-based-filenames/output-expected/missingExpectationsPath/bogusfile
@@ -0,0 +1 @@
+Created additional file to make sure directory isn't empty, because self-test cannot handle empty directories.
diff --git a/gm/tests/outputs/checksum-based-filenames/output-expected/stdout b/gm/tests/outputs/checksum-based-filenames/output-expected/stdout
index 656d695..05d4a59 100644
--- a/gm/tests/outputs/checksum-based-filenames/output-expected/stdout
+++ b/gm/tests/outputs/checksum-based-filenames/output-expected/stdout
@@ -2,6 +2,7 @@
GM: reading expectations from JSON summary file gm/tests/inputs/json/different-pixels-no-hierarchy.json
GM: writing to gm/tests/outputs/checksum-based-filenames/output-actual/writePath
GM: writing mismatches to gm/tests/outputs/checksum-based-filenames/output-actual/mismatchPath
+GM: writing images without expectations to gm/tests/outputs/checksum-based-filenames/output-actual/missingExpectationsPath
GM: drawing... selftest1 [300 200]
GM: Ran 1 GMs
GM: ... over 2 configs ["8888", "565"]
diff --git a/gm/tests/outputs/checksum-based-filenames/output-expected/writePath/bogusfile b/gm/tests/outputs/checksum-based-filenames/output-expected/writePath/bogusfile
new file mode 100644
index 0000000..d86cd5b
--- /dev/null
+++ b/gm/tests/outputs/checksum-based-filenames/output-expected/writePath/bogusfile
@@ -0,0 +1 @@
+Created additional file to make sure directory isn't empty, because self-test cannot handle empty directories.
diff --git a/gm/tests/outputs/compared-against-different-pixels-images/output-expected/command_line b/gm/tests/outputs/compared-against-different-pixels-images/output-expected/command_line
index 397c6b3..90fb36c 100644
--- a/gm/tests/outputs/compared-against-different-pixels-images/output-expected/command_line
+++ b/gm/tests/outputs/compared-against-different-pixels-images/output-expected/command_line
@@ -1 +1 @@
-out/Debug/gm --verbose --hierarchy --match selftest1 --config 8888 565 -r gm/tests/inputs/images/different-pixels --writeJsonSummaryPath gm/tests/outputs/compared-against-different-pixels-images/output-actual/json-summary.txt --writePath gm/tests/outputs/compared-against-different-pixels-images/output-actual/writePath --mismatchPath gm/tests/outputs/compared-against-different-pixels-images/output-actual/mismatchPath
+out/Debug/gm --verbose --hierarchy --match selftest1 --config 8888 565 -r gm/tests/inputs/images/different-pixels --writeJsonSummaryPath gm/tests/outputs/compared-against-different-pixels-images/output-actual/json-summary.txt --writePath gm/tests/outputs/compared-against-different-pixels-images/output-actual/writePath --mismatchPath gm/tests/outputs/compared-against-different-pixels-images/output-actual/mismatchPath --missingExpectationsPath gm/tests/outputs/compared-against-different-pixels-images/output-actual/missingExpectationsPath
diff --git a/gm/tests/outputs/compared-against-different-pixels-images/output-expected/mismatchPath/bogusfile b/gm/tests/outputs/compared-against-different-pixels-images/output-expected/mismatchPath/bogusfile
new file mode 100644
index 0000000..d86cd5b
--- /dev/null
+++ b/gm/tests/outputs/compared-against-different-pixels-images/output-expected/mismatchPath/bogusfile
@@ -0,0 +1 @@
+Created additional file to make sure directory isn't empty, because self-test cannot handle empty directories.
diff --git a/gm/tests/outputs/compared-against-different-pixels-images/output-expected/missingExpectationsPath/565/bogusfile b/gm/tests/outputs/compared-against-different-pixels-images/output-expected/missingExpectationsPath/565/bogusfile
new file mode 100644
index 0000000..d86cd5b
--- /dev/null
+++ b/gm/tests/outputs/compared-against-different-pixels-images/output-expected/missingExpectationsPath/565/bogusfile
@@ -0,0 +1 @@
+Created additional file to make sure directory isn't empty, because self-test cannot handle empty directories.
diff --git a/gm/tests/outputs/compared-against-different-pixels-images/output-expected/missingExpectationsPath/8888/bogusfile b/gm/tests/outputs/compared-against-different-pixels-images/output-expected/missingExpectationsPath/8888/bogusfile
new file mode 100644
index 0000000..d86cd5b
--- /dev/null
+++ b/gm/tests/outputs/compared-against-different-pixels-images/output-expected/missingExpectationsPath/8888/bogusfile
@@ -0,0 +1 @@
+Created additional file to make sure directory isn't empty, because self-test cannot handle empty directories.
diff --git a/gm/tests/outputs/compared-against-different-pixels-images/output-expected/missingExpectationsPath/bogusfile b/gm/tests/outputs/compared-against-different-pixels-images/output-expected/missingExpectationsPath/bogusfile
new file mode 100644
index 0000000..d86cd5b
--- /dev/null
+++ b/gm/tests/outputs/compared-against-different-pixels-images/output-expected/missingExpectationsPath/bogusfile
@@ -0,0 +1 @@
+Created additional file to make sure directory isn't empty, because self-test cannot handle empty directories.
diff --git a/gm/tests/outputs/compared-against-different-pixels-images/output-expected/stdout b/gm/tests/outputs/compared-against-different-pixels-images/output-expected/stdout
index c80ad62..3513a42 100644
--- a/gm/tests/outputs/compared-against-different-pixels-images/output-expected/stdout
+++ b/gm/tests/outputs/compared-against-different-pixels-images/output-expected/stdout
@@ -2,6 +2,7 @@
GM: reading from gm/tests/inputs/images/different-pixels
GM: writing to gm/tests/outputs/compared-against-different-pixels-images/output-actual/writePath
GM: writing mismatches to gm/tests/outputs/compared-against-different-pixels-images/output-actual/mismatchPath
+GM: writing images without expectations to gm/tests/outputs/compared-against-different-pixels-images/output-actual/missingExpectationsPath
GM: drawing... selftest1 [300 200]
GM: Ran 1 GMs
GM: ... over 2 configs ["8888", "565"]
diff --git a/gm/tests/outputs/compared-against-different-pixels-images/output-expected/writePath/565/bogusfile b/gm/tests/outputs/compared-against-different-pixels-images/output-expected/writePath/565/bogusfile
new file mode 100644
index 0000000..d86cd5b
--- /dev/null
+++ b/gm/tests/outputs/compared-against-different-pixels-images/output-expected/writePath/565/bogusfile
@@ -0,0 +1 @@
+Created additional file to make sure directory isn't empty, because self-test cannot handle empty directories.
diff --git a/gm/tests/outputs/compared-against-different-pixels-images/output-expected/writePath/8888/bogusfile b/gm/tests/outputs/compared-against-different-pixels-images/output-expected/writePath/8888/bogusfile
new file mode 100644
index 0000000..d86cd5b
--- /dev/null
+++ b/gm/tests/outputs/compared-against-different-pixels-images/output-expected/writePath/8888/bogusfile
@@ -0,0 +1 @@
+Created additional file to make sure directory isn't empty, because self-test cannot handle empty directories.
diff --git a/gm/tests/outputs/compared-against-different-pixels-images/output-expected/writePath/bogusfile b/gm/tests/outputs/compared-against-different-pixels-images/output-expected/writePath/bogusfile
new file mode 100644
index 0000000..d86cd5b
--- /dev/null
+++ b/gm/tests/outputs/compared-against-different-pixels-images/output-expected/writePath/bogusfile
@@ -0,0 +1 @@
+Created additional file to make sure directory isn't empty, because self-test cannot handle empty directories.
diff --git a/gm/tests/outputs/compared-against-different-pixels-json/output-expected/command_line b/gm/tests/outputs/compared-against-different-pixels-json/output-expected/command_line
index a455456..0175596 100644
--- a/gm/tests/outputs/compared-against-different-pixels-json/output-expected/command_line
+++ b/gm/tests/outputs/compared-against-different-pixels-json/output-expected/command_line
@@ -1 +1 @@
-out/Debug/gm --verbose --hierarchy --match selftest1 --config 8888 565 -r gm/tests/inputs/json/different-pixels.json --writeJsonSummaryPath gm/tests/outputs/compared-against-different-pixels-json/output-actual/json-summary.txt --writePath gm/tests/outputs/compared-against-different-pixels-json/output-actual/writePath --mismatchPath gm/tests/outputs/compared-against-different-pixels-json/output-actual/mismatchPath
+out/Debug/gm --verbose --hierarchy --match selftest1 --config 8888 565 -r gm/tests/inputs/json/different-pixels.json --writeJsonSummaryPath gm/tests/outputs/compared-against-different-pixels-json/output-actual/json-summary.txt --writePath gm/tests/outputs/compared-against-different-pixels-json/output-actual/writePath --mismatchPath gm/tests/outputs/compared-against-different-pixels-json/output-actual/mismatchPath --missingExpectationsPath gm/tests/outputs/compared-against-different-pixels-json/output-actual/missingExpectationsPath
diff --git a/gm/tests/outputs/compared-against-different-pixels-json/output-expected/mismatchPath/bogusfile b/gm/tests/outputs/compared-against-different-pixels-json/output-expected/mismatchPath/bogusfile
new file mode 100644
index 0000000..d86cd5b
--- /dev/null
+++ b/gm/tests/outputs/compared-against-different-pixels-json/output-expected/mismatchPath/bogusfile
@@ -0,0 +1 @@
+Created additional file to make sure directory isn't empty, because self-test cannot handle empty directories.
diff --git a/gm/tests/outputs/compared-against-different-pixels-json/output-expected/missingExpectationsPath/565/bogusfile b/gm/tests/outputs/compared-against-different-pixels-json/output-expected/missingExpectationsPath/565/bogusfile
new file mode 100644
index 0000000..d86cd5b
--- /dev/null
+++ b/gm/tests/outputs/compared-against-different-pixels-json/output-expected/missingExpectationsPath/565/bogusfile
@@ -0,0 +1 @@
+Created additional file to make sure directory isn't empty, because self-test cannot handle empty directories.
diff --git a/gm/tests/outputs/compared-against-different-pixels-json/output-expected/missingExpectationsPath/8888/bogusfile b/gm/tests/outputs/compared-against-different-pixels-json/output-expected/missingExpectationsPath/8888/bogusfile
new file mode 100644
index 0000000..d86cd5b
--- /dev/null
+++ b/gm/tests/outputs/compared-against-different-pixels-json/output-expected/missingExpectationsPath/8888/bogusfile
@@ -0,0 +1 @@
+Created additional file to make sure directory isn't empty, because self-test cannot handle empty directories.
diff --git a/gm/tests/outputs/compared-against-different-pixels-json/output-expected/missingExpectationsPath/bogusfile b/gm/tests/outputs/compared-against-different-pixels-json/output-expected/missingExpectationsPath/bogusfile
new file mode 100644
index 0000000..d86cd5b
--- /dev/null
+++ b/gm/tests/outputs/compared-against-different-pixels-json/output-expected/missingExpectationsPath/bogusfile
@@ -0,0 +1 @@
+Created additional file to make sure directory isn't empty, because self-test cannot handle empty directories.
diff --git a/gm/tests/outputs/compared-against-different-pixels-json/output-expected/stdout b/gm/tests/outputs/compared-against-different-pixels-json/output-expected/stdout
index f17bde6..db69c30 100644
--- a/gm/tests/outputs/compared-against-different-pixels-json/output-expected/stdout
+++ b/gm/tests/outputs/compared-against-different-pixels-json/output-expected/stdout
@@ -2,6 +2,7 @@
GM: reading expectations from JSON summary file gm/tests/inputs/json/different-pixels.json
GM: writing to gm/tests/outputs/compared-against-different-pixels-json/output-actual/writePath
GM: writing mismatches to gm/tests/outputs/compared-against-different-pixels-json/output-actual/mismatchPath
+GM: writing images without expectations to gm/tests/outputs/compared-against-different-pixels-json/output-actual/missingExpectationsPath
GM: drawing... selftest1 [300 200]
GM: Ran 1 GMs
GM: ... over 2 configs ["8888", "565"]
diff --git a/gm/tests/outputs/compared-against-different-pixels-json/output-expected/writePath/565/bogusfile b/gm/tests/outputs/compared-against-different-pixels-json/output-expected/writePath/565/bogusfile
new file mode 100644
index 0000000..d86cd5b
--- /dev/null
+++ b/gm/tests/outputs/compared-against-different-pixels-json/output-expected/writePath/565/bogusfile
@@ -0,0 +1 @@
+Created additional file to make sure directory isn't empty, because self-test cannot handle empty directories.
diff --git a/gm/tests/outputs/compared-against-different-pixels-json/output-expected/writePath/8888/bogusfile b/gm/tests/outputs/compared-against-different-pixels-json/output-expected/writePath/8888/bogusfile
new file mode 100644
index 0000000..d86cd5b
--- /dev/null
+++ b/gm/tests/outputs/compared-against-different-pixels-json/output-expected/writePath/8888/bogusfile
@@ -0,0 +1 @@
+Created additional file to make sure directory isn't empty, because self-test cannot handle empty directories.
diff --git a/gm/tests/outputs/compared-against-different-pixels-json/output-expected/writePath/bogusfile b/gm/tests/outputs/compared-against-different-pixels-json/output-expected/writePath/bogusfile
new file mode 100644
index 0000000..d86cd5b
--- /dev/null
+++ b/gm/tests/outputs/compared-against-different-pixels-json/output-expected/writePath/bogusfile
@@ -0,0 +1 @@
+Created additional file to make sure directory isn't empty, because self-test cannot handle empty directories.
diff --git a/gm/tests/outputs/compared-against-empty-dir/output-expected/command_line b/gm/tests/outputs/compared-against-empty-dir/output-expected/command_line
index 48d12f8..23ad119 100644
--- a/gm/tests/outputs/compared-against-empty-dir/output-expected/command_line
+++ b/gm/tests/outputs/compared-against-empty-dir/output-expected/command_line
@@ -1 +1 @@
-out/Debug/gm --verbose --hierarchy --match selftest1 --config 8888 565 -r gm/tests/inputs/images/empty-dir --writeJsonSummaryPath gm/tests/outputs/compared-against-empty-dir/output-actual/json-summary.txt --writePath gm/tests/outputs/compared-against-empty-dir/output-actual/writePath --mismatchPath gm/tests/outputs/compared-against-empty-dir/output-actual/mismatchPath
+out/Debug/gm --verbose --hierarchy --match selftest1 --config 8888 565 -r gm/tests/inputs/images/empty-dir --writeJsonSummaryPath gm/tests/outputs/compared-against-empty-dir/output-actual/json-summary.txt --writePath gm/tests/outputs/compared-against-empty-dir/output-actual/writePath --mismatchPath gm/tests/outputs/compared-against-empty-dir/output-actual/mismatchPath --missingExpectationsPath gm/tests/outputs/compared-against-empty-dir/output-actual/missingExpectationsPath
diff --git a/gm/tests/outputs/compared-against-empty-dir/output-expected/mismatchPath/bogusfile b/gm/tests/outputs/compared-against-empty-dir/output-expected/mismatchPath/bogusfile
new file mode 100644
index 0000000..d86cd5b
--- /dev/null
+++ b/gm/tests/outputs/compared-against-empty-dir/output-expected/mismatchPath/bogusfile
@@ -0,0 +1 @@
+Created additional file to make sure directory isn't empty, because self-test cannot handle empty directories.
diff --git a/gm/tests/outputs/compared-against-empty-dir/output-expected/missingExpectationsPath/565/bogusfile b/gm/tests/outputs/compared-against-empty-dir/output-expected/missingExpectationsPath/565/bogusfile
new file mode 100644
index 0000000..d86cd5b
--- /dev/null
+++ b/gm/tests/outputs/compared-against-empty-dir/output-expected/missingExpectationsPath/565/bogusfile
@@ -0,0 +1 @@
+Created additional file to make sure directory isn't empty, because self-test cannot handle empty directories.
diff --git a/gm/tests/outputs/compared-against-empty-dir/output-expected/missingExpectationsPath/565/selftest1.png b/gm/tests/outputs/compared-against-empty-dir/output-expected/missingExpectationsPath/565/selftest1.png
new file mode 100644
index 0000000..57f48ed
--- /dev/null
+++ b/gm/tests/outputs/compared-against-empty-dir/output-expected/missingExpectationsPath/565/selftest1.png
@@ -0,0 +1 @@
+[contents of gm/tests/outputs/compared-against-empty-dir/output-actual/missingExpectationsPath/565/selftest1.png]
diff --git a/gm/tests/outputs/compared-against-empty-dir/output-expected/missingExpectationsPath/8888/bogusfile b/gm/tests/outputs/compared-against-empty-dir/output-expected/missingExpectationsPath/8888/bogusfile
new file mode 100644
index 0000000..d86cd5b
--- /dev/null
+++ b/gm/tests/outputs/compared-against-empty-dir/output-expected/missingExpectationsPath/8888/bogusfile
@@ -0,0 +1 @@
+Created additional file to make sure directory isn't empty, because self-test cannot handle empty directories.
diff --git a/gm/tests/outputs/compared-against-empty-dir/output-expected/missingExpectationsPath/8888/selftest1.png b/gm/tests/outputs/compared-against-empty-dir/output-expected/missingExpectationsPath/8888/selftest1.png
new file mode 100644
index 0000000..9abe3e8
--- /dev/null
+++ b/gm/tests/outputs/compared-against-empty-dir/output-expected/missingExpectationsPath/8888/selftest1.png
@@ -0,0 +1 @@
+[contents of gm/tests/outputs/compared-against-empty-dir/output-actual/missingExpectationsPath/8888/selftest1.png]
diff --git a/gm/tests/outputs/compared-against-empty-dir/output-expected/missingExpectationsPath/bogusfile b/gm/tests/outputs/compared-against-empty-dir/output-expected/missingExpectationsPath/bogusfile
new file mode 100644
index 0000000..d86cd5b
--- /dev/null
+++ b/gm/tests/outputs/compared-against-empty-dir/output-expected/missingExpectationsPath/bogusfile
@@ -0,0 +1 @@
+Created additional file to make sure directory isn't empty, because self-test cannot handle empty directories.
diff --git a/gm/tests/outputs/compared-against-empty-dir/output-expected/stdout b/gm/tests/outputs/compared-against-empty-dir/output-expected/stdout
index 232baf9..de58e0e 100644
--- a/gm/tests/outputs/compared-against-empty-dir/output-expected/stdout
+++ b/gm/tests/outputs/compared-against-empty-dir/output-expected/stdout
@@ -2,6 +2,7 @@
GM: reading from gm/tests/inputs/images/empty-dir
GM: writing to gm/tests/outputs/compared-against-empty-dir/output-actual/writePath
GM: writing mismatches to gm/tests/outputs/compared-against-empty-dir/output-actual/mismatchPath
+GM: writing images without expectations to gm/tests/outputs/compared-against-empty-dir/output-actual/missingExpectationsPath
GM: drawing... selftest1 [300 200]
GM: Ran 1 GMs
GM: ... over 2 configs ["8888", "565"]
diff --git a/gm/tests/outputs/compared-against-empty-dir/output-expected/writePath/565/bogusfile b/gm/tests/outputs/compared-against-empty-dir/output-expected/writePath/565/bogusfile
new file mode 100644
index 0000000..d86cd5b
--- /dev/null
+++ b/gm/tests/outputs/compared-against-empty-dir/output-expected/writePath/565/bogusfile
@@ -0,0 +1 @@
+Created additional file to make sure directory isn't empty, because self-test cannot handle empty directories.
diff --git a/gm/tests/outputs/compared-against-empty-dir/output-expected/writePath/8888/bogusfile b/gm/tests/outputs/compared-against-empty-dir/output-expected/writePath/8888/bogusfile
new file mode 100644
index 0000000..d86cd5b
--- /dev/null
+++ b/gm/tests/outputs/compared-against-empty-dir/output-expected/writePath/8888/bogusfile
@@ -0,0 +1 @@
+Created additional file to make sure directory isn't empty, because self-test cannot handle empty directories.
diff --git a/gm/tests/outputs/compared-against-empty-dir/output-expected/writePath/bogusfile b/gm/tests/outputs/compared-against-empty-dir/output-expected/writePath/bogusfile
new file mode 100644
index 0000000..d86cd5b
--- /dev/null
+++ b/gm/tests/outputs/compared-against-empty-dir/output-expected/writePath/bogusfile
@@ -0,0 +1 @@
+Created additional file to make sure directory isn't empty, because self-test cannot handle empty directories.
diff --git a/gm/tests/outputs/compared-against-identical-bytes-images/output-expected/command_line b/gm/tests/outputs/compared-against-identical-bytes-images/output-expected/command_line
index 51e4582..0de4a7e 100644
--- a/gm/tests/outputs/compared-against-identical-bytes-images/output-expected/command_line
+++ b/gm/tests/outputs/compared-against-identical-bytes-images/output-expected/command_line
@@ -1 +1 @@
-out/Debug/gm --verbose --hierarchy --match selftest1 --config 8888 565 -r gm/tests/inputs/images/identical-bytes --writeJsonSummaryPath gm/tests/outputs/compared-against-identical-bytes-images/output-actual/json-summary.txt --writePath gm/tests/outputs/compared-against-identical-bytes-images/output-actual/writePath --mismatchPath gm/tests/outputs/compared-against-identical-bytes-images/output-actual/mismatchPath
+out/Debug/gm --verbose --hierarchy --match selftest1 --config 8888 565 -r gm/tests/inputs/images/identical-bytes --writeJsonSummaryPath gm/tests/outputs/compared-against-identical-bytes-images/output-actual/json-summary.txt --writePath gm/tests/outputs/compared-against-identical-bytes-images/output-actual/writePath --mismatchPath gm/tests/outputs/compared-against-identical-bytes-images/output-actual/mismatchPath --missingExpectationsPath gm/tests/outputs/compared-against-identical-bytes-images/output-actual/missingExpectationsPath
diff --git a/gm/tests/outputs/compared-against-identical-bytes-images/output-expected/mismatchPath/bogusfile b/gm/tests/outputs/compared-against-identical-bytes-images/output-expected/mismatchPath/bogusfile
new file mode 100644
index 0000000..d86cd5b
--- /dev/null
+++ b/gm/tests/outputs/compared-against-identical-bytes-images/output-expected/mismatchPath/bogusfile
@@ -0,0 +1 @@
+Created additional file to make sure directory isn't empty, because self-test cannot handle empty directories.
diff --git a/gm/tests/outputs/compared-against-identical-bytes-images/output-expected/missingExpectationsPath/565/bogusfile b/gm/tests/outputs/compared-against-identical-bytes-images/output-expected/missingExpectationsPath/565/bogusfile
new file mode 100644
index 0000000..d86cd5b
--- /dev/null
+++ b/gm/tests/outputs/compared-against-identical-bytes-images/output-expected/missingExpectationsPath/565/bogusfile
@@ -0,0 +1 @@
+Created additional file to make sure directory isn't empty, because self-test cannot handle empty directories.
diff --git a/gm/tests/outputs/compared-against-identical-bytes-images/output-expected/missingExpectationsPath/8888/bogusfile b/gm/tests/outputs/compared-against-identical-bytes-images/output-expected/missingExpectationsPath/8888/bogusfile
new file mode 100644
index 0000000..d86cd5b
--- /dev/null
+++ b/gm/tests/outputs/compared-against-identical-bytes-images/output-expected/missingExpectationsPath/8888/bogusfile
@@ -0,0 +1 @@
+Created additional file to make sure directory isn't empty, because self-test cannot handle empty directories.
diff --git a/gm/tests/outputs/compared-against-identical-bytes-images/output-expected/missingExpectationsPath/bogusfile b/gm/tests/outputs/compared-against-identical-bytes-images/output-expected/missingExpectationsPath/bogusfile
new file mode 100644
index 0000000..d86cd5b
--- /dev/null
+++ b/gm/tests/outputs/compared-against-identical-bytes-images/output-expected/missingExpectationsPath/bogusfile
@@ -0,0 +1 @@
+Created additional file to make sure directory isn't empty, because self-test cannot handle empty directories.
diff --git a/gm/tests/outputs/compared-against-identical-bytes-images/output-expected/stdout b/gm/tests/outputs/compared-against-identical-bytes-images/output-expected/stdout
index e844583..30ea8b1 100644
--- a/gm/tests/outputs/compared-against-identical-bytes-images/output-expected/stdout
+++ b/gm/tests/outputs/compared-against-identical-bytes-images/output-expected/stdout
@@ -2,6 +2,7 @@
GM: reading from gm/tests/inputs/images/identical-bytes
GM: writing to gm/tests/outputs/compared-against-identical-bytes-images/output-actual/writePath
GM: writing mismatches to gm/tests/outputs/compared-against-identical-bytes-images/output-actual/mismatchPath
+GM: writing images without expectations to gm/tests/outputs/compared-against-identical-bytes-images/output-actual/missingExpectationsPath
GM: drawing... selftest1 [300 200]
GM: Ran 1 GMs
GM: ... over 2 configs ["8888", "565"]
diff --git a/gm/tests/outputs/compared-against-identical-bytes-images/output-expected/writePath/565/bogusfile b/gm/tests/outputs/compared-against-identical-bytes-images/output-expected/writePath/565/bogusfile
new file mode 100644
index 0000000..d86cd5b
--- /dev/null
+++ b/gm/tests/outputs/compared-against-identical-bytes-images/output-expected/writePath/565/bogusfile
@@ -0,0 +1 @@
+Created additional file to make sure directory isn't empty, because self-test cannot handle empty directories.
diff --git a/gm/tests/outputs/compared-against-identical-bytes-images/output-expected/writePath/8888/bogusfile b/gm/tests/outputs/compared-against-identical-bytes-images/output-expected/writePath/8888/bogusfile
new file mode 100644
index 0000000..d86cd5b
--- /dev/null
+++ b/gm/tests/outputs/compared-against-identical-bytes-images/output-expected/writePath/8888/bogusfile
@@ -0,0 +1 @@
+Created additional file to make sure directory isn't empty, because self-test cannot handle empty directories.
diff --git a/gm/tests/outputs/compared-against-identical-bytes-images/output-expected/writePath/bogusfile b/gm/tests/outputs/compared-against-identical-bytes-images/output-expected/writePath/bogusfile
new file mode 100644
index 0000000..d86cd5b
--- /dev/null
+++ b/gm/tests/outputs/compared-against-identical-bytes-images/output-expected/writePath/bogusfile
@@ -0,0 +1 @@
+Created additional file to make sure directory isn't empty, because self-test cannot handle empty directories.
diff --git a/gm/tests/outputs/compared-against-identical-bytes-json/output-expected/command_line b/gm/tests/outputs/compared-against-identical-bytes-json/output-expected/command_line
index 3a29e12..f5da935 100644
--- a/gm/tests/outputs/compared-against-identical-bytes-json/output-expected/command_line
+++ b/gm/tests/outputs/compared-against-identical-bytes-json/output-expected/command_line
@@ -1 +1 @@
-out/Debug/gm --verbose --hierarchy --match selftest1 --config 8888 565 -r gm/tests/inputs/json/identical-bytes.json --writeJsonSummaryPath gm/tests/outputs/compared-against-identical-bytes-json/output-actual/json-summary.txt --writePath gm/tests/outputs/compared-against-identical-bytes-json/output-actual/writePath --mismatchPath gm/tests/outputs/compared-against-identical-bytes-json/output-actual/mismatchPath
+out/Debug/gm --verbose --hierarchy --match selftest1 --config 8888 565 -r gm/tests/inputs/json/identical-bytes.json --writeJsonSummaryPath gm/tests/outputs/compared-against-identical-bytes-json/output-actual/json-summary.txt --writePath gm/tests/outputs/compared-against-identical-bytes-json/output-actual/writePath --mismatchPath gm/tests/outputs/compared-against-identical-bytes-json/output-actual/mismatchPath --missingExpectationsPath gm/tests/outputs/compared-against-identical-bytes-json/output-actual/missingExpectationsPath
diff --git a/gm/tests/outputs/compared-against-identical-bytes-json/output-expected/mismatchPath/bogusfile b/gm/tests/outputs/compared-against-identical-bytes-json/output-expected/mismatchPath/bogusfile
new file mode 100644
index 0000000..d86cd5b
--- /dev/null
+++ b/gm/tests/outputs/compared-against-identical-bytes-json/output-expected/mismatchPath/bogusfile
@@ -0,0 +1 @@
+Created additional file to make sure directory isn't empty, because self-test cannot handle empty directories.
diff --git a/gm/tests/outputs/compared-against-identical-bytes-json/output-expected/missingExpectationsPath/565/bogusfile b/gm/tests/outputs/compared-against-identical-bytes-json/output-expected/missingExpectationsPath/565/bogusfile
new file mode 100644
index 0000000..d86cd5b
--- /dev/null
+++ b/gm/tests/outputs/compared-against-identical-bytes-json/output-expected/missingExpectationsPath/565/bogusfile
@@ -0,0 +1 @@
+Created additional file to make sure directory isn't empty, because self-test cannot handle empty directories.
diff --git a/gm/tests/outputs/compared-against-identical-bytes-json/output-expected/missingExpectationsPath/8888/bogusfile b/gm/tests/outputs/compared-against-identical-bytes-json/output-expected/missingExpectationsPath/8888/bogusfile
new file mode 100644
index 0000000..d86cd5b
--- /dev/null
+++ b/gm/tests/outputs/compared-against-identical-bytes-json/output-expected/missingExpectationsPath/8888/bogusfile
@@ -0,0 +1 @@
+Created additional file to make sure directory isn't empty, because self-test cannot handle empty directories.
diff --git a/gm/tests/outputs/compared-against-identical-bytes-json/output-expected/missingExpectationsPath/bogusfile b/gm/tests/outputs/compared-against-identical-bytes-json/output-expected/missingExpectationsPath/bogusfile
new file mode 100644
index 0000000..d86cd5b
--- /dev/null
+++ b/gm/tests/outputs/compared-against-identical-bytes-json/output-expected/missingExpectationsPath/bogusfile
@@ -0,0 +1 @@
+Created additional file to make sure directory isn't empty, because self-test cannot handle empty directories.
diff --git a/gm/tests/outputs/compared-against-identical-bytes-json/output-expected/stdout b/gm/tests/outputs/compared-against-identical-bytes-json/output-expected/stdout
index 9ed95b5..19f8a77 100644
--- a/gm/tests/outputs/compared-against-identical-bytes-json/output-expected/stdout
+++ b/gm/tests/outputs/compared-against-identical-bytes-json/output-expected/stdout
@@ -2,6 +2,7 @@
GM: reading expectations from JSON summary file gm/tests/inputs/json/identical-bytes.json
GM: writing to gm/tests/outputs/compared-against-identical-bytes-json/output-actual/writePath
GM: writing mismatches to gm/tests/outputs/compared-against-identical-bytes-json/output-actual/mismatchPath
+GM: writing images without expectations to gm/tests/outputs/compared-against-identical-bytes-json/output-actual/missingExpectationsPath
GM: drawing... selftest1 [300 200]
GM: Ran 1 GMs
GM: ... over 2 configs ["8888", "565"]
diff --git a/gm/tests/outputs/compared-against-identical-bytes-json/output-expected/writePath/565/bogusfile b/gm/tests/outputs/compared-against-identical-bytes-json/output-expected/writePath/565/bogusfile
new file mode 100644
index 0000000..d86cd5b
--- /dev/null
+++ b/gm/tests/outputs/compared-against-identical-bytes-json/output-expected/writePath/565/bogusfile
@@ -0,0 +1 @@
+Created additional file to make sure directory isn't empty, because self-test cannot handle empty directories.
diff --git a/gm/tests/outputs/compared-against-identical-bytes-json/output-expected/writePath/8888/bogusfile b/gm/tests/outputs/compared-against-identical-bytes-json/output-expected/writePath/8888/bogusfile
new file mode 100644
index 0000000..d86cd5b
--- /dev/null
+++ b/gm/tests/outputs/compared-against-identical-bytes-json/output-expected/writePath/8888/bogusfile
@@ -0,0 +1 @@
+Created additional file to make sure directory isn't empty, because self-test cannot handle empty directories.
diff --git a/gm/tests/outputs/compared-against-identical-bytes-json/output-expected/writePath/bogusfile b/gm/tests/outputs/compared-against-identical-bytes-json/output-expected/writePath/bogusfile
new file mode 100644
index 0000000..d86cd5b
--- /dev/null
+++ b/gm/tests/outputs/compared-against-identical-bytes-json/output-expected/writePath/bogusfile
@@ -0,0 +1 @@
+Created additional file to make sure directory isn't empty, because self-test cannot handle empty directories.
diff --git a/gm/tests/outputs/compared-against-identical-pixels-images/output-expected/command_line b/gm/tests/outputs/compared-against-identical-pixels-images/output-expected/command_line
index b967776..16b328f 100644
--- a/gm/tests/outputs/compared-against-identical-pixels-images/output-expected/command_line
+++ b/gm/tests/outputs/compared-against-identical-pixels-images/output-expected/command_line
@@ -1 +1 @@
-out/Debug/gm --verbose --hierarchy --match selftest1 --config 8888 565 -r gm/tests/inputs/images/identical-pixels --writeJsonSummaryPath gm/tests/outputs/compared-against-identical-pixels-images/output-actual/json-summary.txt --writePath gm/tests/outputs/compared-against-identical-pixels-images/output-actual/writePath --mismatchPath gm/tests/outputs/compared-against-identical-pixels-images/output-actual/mismatchPath
+out/Debug/gm --verbose --hierarchy --match selftest1 --config 8888 565 -r gm/tests/inputs/images/identical-pixels --writeJsonSummaryPath gm/tests/outputs/compared-against-identical-pixels-images/output-actual/json-summary.txt --writePath gm/tests/outputs/compared-against-identical-pixels-images/output-actual/writePath --mismatchPath gm/tests/outputs/compared-against-identical-pixels-images/output-actual/mismatchPath --missingExpectationsPath gm/tests/outputs/compared-against-identical-pixels-images/output-actual/missingExpectationsPath
diff --git a/gm/tests/outputs/compared-against-identical-pixels-images/output-expected/mismatchPath/bogusfile b/gm/tests/outputs/compared-against-identical-pixels-images/output-expected/mismatchPath/bogusfile
new file mode 100644
index 0000000..d86cd5b
--- /dev/null
+++ b/gm/tests/outputs/compared-against-identical-pixels-images/output-expected/mismatchPath/bogusfile
@@ -0,0 +1 @@
+Created additional file to make sure directory isn't empty, because self-test cannot handle empty directories.
diff --git a/gm/tests/outputs/compared-against-identical-pixels-images/output-expected/missingExpectationsPath/565/bogusfile b/gm/tests/outputs/compared-against-identical-pixels-images/output-expected/missingExpectationsPath/565/bogusfile
new file mode 100644
index 0000000..d86cd5b
--- /dev/null
+++ b/gm/tests/outputs/compared-against-identical-pixels-images/output-expected/missingExpectationsPath/565/bogusfile
@@ -0,0 +1 @@
+Created additional file to make sure directory isn't empty, because self-test cannot handle empty directories.
diff --git a/gm/tests/outputs/compared-against-identical-pixels-images/output-expected/missingExpectationsPath/8888/bogusfile b/gm/tests/outputs/compared-against-identical-pixels-images/output-expected/missingExpectationsPath/8888/bogusfile
new file mode 100644
index 0000000..d86cd5b
--- /dev/null
+++ b/gm/tests/outputs/compared-against-identical-pixels-images/output-expected/missingExpectationsPath/8888/bogusfile
@@ -0,0 +1 @@
+Created additional file to make sure directory isn't empty, because self-test cannot handle empty directories.
diff --git a/gm/tests/outputs/compared-against-identical-pixels-images/output-expected/missingExpectationsPath/bogusfile b/gm/tests/outputs/compared-against-identical-pixels-images/output-expected/missingExpectationsPath/bogusfile
new file mode 100644
index 0000000..d86cd5b
--- /dev/null
+++ b/gm/tests/outputs/compared-against-identical-pixels-images/output-expected/missingExpectationsPath/bogusfile
@@ -0,0 +1 @@
+Created additional file to make sure directory isn't empty, because self-test cannot handle empty directories.
diff --git a/gm/tests/outputs/compared-against-identical-pixels-images/output-expected/stdout b/gm/tests/outputs/compared-against-identical-pixels-images/output-expected/stdout
index e61e9f3..a9b3653 100644
--- a/gm/tests/outputs/compared-against-identical-pixels-images/output-expected/stdout
+++ b/gm/tests/outputs/compared-against-identical-pixels-images/output-expected/stdout
@@ -2,6 +2,7 @@
GM: reading from gm/tests/inputs/images/identical-pixels
GM: writing to gm/tests/outputs/compared-against-identical-pixels-images/output-actual/writePath
GM: writing mismatches to gm/tests/outputs/compared-against-identical-pixels-images/output-actual/mismatchPath
+GM: writing images without expectations to gm/tests/outputs/compared-against-identical-pixels-images/output-actual/missingExpectationsPath
GM: drawing... selftest1 [300 200]
GM: Ran 1 GMs
GM: ... over 2 configs ["8888", "565"]
diff --git a/gm/tests/outputs/compared-against-identical-pixels-images/output-expected/writePath/565/bogusfile b/gm/tests/outputs/compared-against-identical-pixels-images/output-expected/writePath/565/bogusfile
new file mode 100644
index 0000000..d86cd5b
--- /dev/null
+++ b/gm/tests/outputs/compared-against-identical-pixels-images/output-expected/writePath/565/bogusfile
@@ -0,0 +1 @@
+Created additional file to make sure directory isn't empty, because self-test cannot handle empty directories.
diff --git a/gm/tests/outputs/compared-against-identical-pixels-images/output-expected/writePath/8888/bogusfile b/gm/tests/outputs/compared-against-identical-pixels-images/output-expected/writePath/8888/bogusfile
new file mode 100644
index 0000000..d86cd5b
--- /dev/null
+++ b/gm/tests/outputs/compared-against-identical-pixels-images/output-expected/writePath/8888/bogusfile
@@ -0,0 +1 @@
+Created additional file to make sure directory isn't empty, because self-test cannot handle empty directories.
diff --git a/gm/tests/outputs/compared-against-identical-pixels-images/output-expected/writePath/bogusfile b/gm/tests/outputs/compared-against-identical-pixels-images/output-expected/writePath/bogusfile
new file mode 100644
index 0000000..d86cd5b
--- /dev/null
+++ b/gm/tests/outputs/compared-against-identical-pixels-images/output-expected/writePath/bogusfile
@@ -0,0 +1 @@
+Created additional file to make sure directory isn't empty, because self-test cannot handle empty directories.
diff --git a/gm/tests/outputs/compared-against-identical-pixels-json/output-expected/command_line b/gm/tests/outputs/compared-against-identical-pixels-json/output-expected/command_line
index 71a9ac7..30faa0f 100644
--- a/gm/tests/outputs/compared-against-identical-pixels-json/output-expected/command_line
+++ b/gm/tests/outputs/compared-against-identical-pixels-json/output-expected/command_line
@@ -1 +1 @@
-out/Debug/gm --verbose --hierarchy --match selftest1 --config 8888 565 -r gm/tests/inputs/json/identical-pixels.json --writeJsonSummaryPath gm/tests/outputs/compared-against-identical-pixels-json/output-actual/json-summary.txt --writePath gm/tests/outputs/compared-against-identical-pixels-json/output-actual/writePath --mismatchPath gm/tests/outputs/compared-against-identical-pixels-json/output-actual/mismatchPath
+out/Debug/gm --verbose --hierarchy --match selftest1 --config 8888 565 -r gm/tests/inputs/json/identical-pixels.json --writeJsonSummaryPath gm/tests/outputs/compared-against-identical-pixels-json/output-actual/json-summary.txt --writePath gm/tests/outputs/compared-against-identical-pixels-json/output-actual/writePath --mismatchPath gm/tests/outputs/compared-against-identical-pixels-json/output-actual/mismatchPath --missingExpectationsPath gm/tests/outputs/compared-against-identical-pixels-json/output-actual/missingExpectationsPath
diff --git a/gm/tests/outputs/compared-against-identical-pixels-json/output-expected/mismatchPath/bogusfile b/gm/tests/outputs/compared-against-identical-pixels-json/output-expected/mismatchPath/bogusfile
new file mode 100644
index 0000000..d86cd5b
--- /dev/null
+++ b/gm/tests/outputs/compared-against-identical-pixels-json/output-expected/mismatchPath/bogusfile
@@ -0,0 +1 @@
+Created additional file to make sure directory isn't empty, because self-test cannot handle empty directories.
diff --git a/gm/tests/outputs/compared-against-identical-pixels-json/output-expected/missingExpectationsPath/565/bogusfile b/gm/tests/outputs/compared-against-identical-pixels-json/output-expected/missingExpectationsPath/565/bogusfile
new file mode 100644
index 0000000..d86cd5b
--- /dev/null
+++ b/gm/tests/outputs/compared-against-identical-pixels-json/output-expected/missingExpectationsPath/565/bogusfile
@@ -0,0 +1 @@
+Created additional file to make sure directory isn't empty, because self-test cannot handle empty directories.
diff --git a/gm/tests/outputs/compared-against-identical-pixels-json/output-expected/missingExpectationsPath/8888/bogusfile b/gm/tests/outputs/compared-against-identical-pixels-json/output-expected/missingExpectationsPath/8888/bogusfile
new file mode 100644
index 0000000..d86cd5b
--- /dev/null
+++ b/gm/tests/outputs/compared-against-identical-pixels-json/output-expected/missingExpectationsPath/8888/bogusfile
@@ -0,0 +1 @@
+Created additional file to make sure directory isn't empty, because self-test cannot handle empty directories.
diff --git a/gm/tests/outputs/compared-against-identical-pixels-json/output-expected/missingExpectationsPath/bogusfile b/gm/tests/outputs/compared-against-identical-pixels-json/output-expected/missingExpectationsPath/bogusfile
new file mode 100644
index 0000000..d86cd5b
--- /dev/null
+++ b/gm/tests/outputs/compared-against-identical-pixels-json/output-expected/missingExpectationsPath/bogusfile
@@ -0,0 +1 @@
+Created additional file to make sure directory isn't empty, because self-test cannot handle empty directories.
diff --git a/gm/tests/outputs/compared-against-identical-pixels-json/output-expected/stdout b/gm/tests/outputs/compared-against-identical-pixels-json/output-expected/stdout
index 562ccdc..7a02809 100644
--- a/gm/tests/outputs/compared-against-identical-pixels-json/output-expected/stdout
+++ b/gm/tests/outputs/compared-against-identical-pixels-json/output-expected/stdout
@@ -2,6 +2,7 @@
GM: reading expectations from JSON summary file gm/tests/inputs/json/identical-pixels.json
GM: writing to gm/tests/outputs/compared-against-identical-pixels-json/output-actual/writePath
GM: writing mismatches to gm/tests/outputs/compared-against-identical-pixels-json/output-actual/mismatchPath
+GM: writing images without expectations to gm/tests/outputs/compared-against-identical-pixels-json/output-actual/missingExpectationsPath
GM: drawing... selftest1 [300 200]
GM: Ran 1 GMs
GM: ... over 2 configs ["8888", "565"]
diff --git a/gm/tests/outputs/compared-against-identical-pixels-json/output-expected/writePath/565/bogusfile b/gm/tests/outputs/compared-against-identical-pixels-json/output-expected/writePath/565/bogusfile
new file mode 100644
index 0000000..d86cd5b
--- /dev/null
+++ b/gm/tests/outputs/compared-against-identical-pixels-json/output-expected/writePath/565/bogusfile
@@ -0,0 +1 @@
+Created additional file to make sure directory isn't empty, because self-test cannot handle empty directories.
diff --git a/gm/tests/outputs/compared-against-identical-pixels-json/output-expected/writePath/8888/bogusfile b/gm/tests/outputs/compared-against-identical-pixels-json/output-expected/writePath/8888/bogusfile
new file mode 100644
index 0000000..d86cd5b
--- /dev/null
+++ b/gm/tests/outputs/compared-against-identical-pixels-json/output-expected/writePath/8888/bogusfile
@@ -0,0 +1 @@
+Created additional file to make sure directory isn't empty, because self-test cannot handle empty directories.
diff --git a/gm/tests/outputs/compared-against-identical-pixels-json/output-expected/writePath/bogusfile b/gm/tests/outputs/compared-against-identical-pixels-json/output-expected/writePath/bogusfile
new file mode 100644
index 0000000..d86cd5b
--- /dev/null
+++ b/gm/tests/outputs/compared-against-identical-pixels-json/output-expected/writePath/bogusfile
@@ -0,0 +1 @@
+Created additional file to make sure directory isn't empty, because self-test cannot handle empty directories.
diff --git a/gm/tests/outputs/compared-against-nonexistent-dir/output-expected/command_line b/gm/tests/outputs/compared-against-nonexistent-dir/output-expected/command_line
index 1753a9f..5c6c403 100644
--- a/gm/tests/outputs/compared-against-nonexistent-dir/output-expected/command_line
+++ b/gm/tests/outputs/compared-against-nonexistent-dir/output-expected/command_line
@@ -1 +1 @@
-out/Debug/gm --verbose --hierarchy --match selftest1 --config 8888 565 -r ../path/to/nowhere --writeJsonSummaryPath gm/tests/outputs/compared-against-nonexistent-dir/output-actual/json-summary.txt --writePath gm/tests/outputs/compared-against-nonexistent-dir/output-actual/writePath --mismatchPath gm/tests/outputs/compared-against-nonexistent-dir/output-actual/mismatchPath
+out/Debug/gm --verbose --hierarchy --match selftest1 --config 8888 565 -r ../path/to/nowhere --writeJsonSummaryPath gm/tests/outputs/compared-against-nonexistent-dir/output-actual/json-summary.txt --writePath gm/tests/outputs/compared-against-nonexistent-dir/output-actual/writePath --mismatchPath gm/tests/outputs/compared-against-nonexistent-dir/output-actual/mismatchPath --missingExpectationsPath gm/tests/outputs/compared-against-nonexistent-dir/output-actual/missingExpectationsPath
diff --git a/gm/tests/outputs/ignore-expectations-mismatch/output-expected/command_line b/gm/tests/outputs/ignore-expectations-mismatch/output-expected/command_line
index c9a4ed0..48bb35f 100644
--- a/gm/tests/outputs/ignore-expectations-mismatch/output-expected/command_line
+++ b/gm/tests/outputs/ignore-expectations-mismatch/output-expected/command_line
@@ -1 +1 @@
-out/Debug/gm --ignoreErrorTypes ExpectationsMismatch NoGpuContext --verbose --hierarchy --match selftest1 --config 8888 565 -r gm/tests/inputs/json/different-pixels.json --writeJsonSummaryPath gm/tests/outputs/ignore-expectations-mismatch/output-actual/json-summary.txt --writePath gm/tests/outputs/ignore-expectations-mismatch/output-actual/writePath --mismatchPath gm/tests/outputs/ignore-expectations-mismatch/output-actual/mismatchPath
+out/Debug/gm --ignoreErrorTypes ExpectationsMismatch NoGpuContext --verbose --hierarchy --match selftest1 --config 8888 565 -r gm/tests/inputs/json/different-pixels.json --writeJsonSummaryPath gm/tests/outputs/ignore-expectations-mismatch/output-actual/json-summary.txt --writePath gm/tests/outputs/ignore-expectations-mismatch/output-actual/writePath --mismatchPath gm/tests/outputs/ignore-expectations-mismatch/output-actual/mismatchPath --missingExpectationsPath gm/tests/outputs/ignore-expectations-mismatch/output-actual/missingExpectationsPath
diff --git a/gm/tests/outputs/ignore-expectations-mismatch/output-expected/mismatchPath/bogusfile b/gm/tests/outputs/ignore-expectations-mismatch/output-expected/mismatchPath/bogusfile
new file mode 100644
index 0000000..d86cd5b
--- /dev/null
+++ b/gm/tests/outputs/ignore-expectations-mismatch/output-expected/mismatchPath/bogusfile
@@ -0,0 +1 @@
+Created additional file to make sure directory isn't empty, because self-test cannot handle empty directories.
diff --git a/gm/tests/outputs/ignore-expectations-mismatch/output-expected/missingExpectationsPath/565/bogusfile b/gm/tests/outputs/ignore-expectations-mismatch/output-expected/missingExpectationsPath/565/bogusfile
new file mode 100644
index 0000000..d86cd5b
--- /dev/null
+++ b/gm/tests/outputs/ignore-expectations-mismatch/output-expected/missingExpectationsPath/565/bogusfile
@@ -0,0 +1 @@
+Created additional file to make sure directory isn't empty, because self-test cannot handle empty directories.
diff --git a/gm/tests/outputs/ignore-expectations-mismatch/output-expected/missingExpectationsPath/8888/bogusfile b/gm/tests/outputs/ignore-expectations-mismatch/output-expected/missingExpectationsPath/8888/bogusfile
new file mode 100644
index 0000000..d86cd5b
--- /dev/null
+++ b/gm/tests/outputs/ignore-expectations-mismatch/output-expected/missingExpectationsPath/8888/bogusfile
@@ -0,0 +1 @@
+Created additional file to make sure directory isn't empty, because self-test cannot handle empty directories.
diff --git a/gm/tests/outputs/ignore-expectations-mismatch/output-expected/missingExpectationsPath/bogusfile b/gm/tests/outputs/ignore-expectations-mismatch/output-expected/missingExpectationsPath/bogusfile
new file mode 100644
index 0000000..d86cd5b
--- /dev/null
+++ b/gm/tests/outputs/ignore-expectations-mismatch/output-expected/missingExpectationsPath/bogusfile
@@ -0,0 +1 @@
+Created additional file to make sure directory isn't empty, because self-test cannot handle empty directories.
diff --git a/gm/tests/outputs/ignore-expectations-mismatch/output-expected/stdout b/gm/tests/outputs/ignore-expectations-mismatch/output-expected/stdout
index 635f9af..646c051 100644
--- a/gm/tests/outputs/ignore-expectations-mismatch/output-expected/stdout
+++ b/gm/tests/outputs/ignore-expectations-mismatch/output-expected/stdout
@@ -2,6 +2,7 @@
GM: reading expectations from JSON summary file gm/tests/inputs/json/different-pixels.json
GM: writing to gm/tests/outputs/ignore-expectations-mismatch/output-actual/writePath
GM: writing mismatches to gm/tests/outputs/ignore-expectations-mismatch/output-actual/mismatchPath
+GM: writing images without expectations to gm/tests/outputs/ignore-expectations-mismatch/output-actual/missingExpectationsPath
GM: drawing... selftest1 [300 200]
GM: Ran 1 GMs
GM: ... over 2 configs ["8888", "565"]
diff --git a/gm/tests/outputs/ignore-expectations-mismatch/output-expected/writePath/565/bogusfile b/gm/tests/outputs/ignore-expectations-mismatch/output-expected/writePath/565/bogusfile
new file mode 100644
index 0000000..d86cd5b
--- /dev/null
+++ b/gm/tests/outputs/ignore-expectations-mismatch/output-expected/writePath/565/bogusfile
@@ -0,0 +1 @@
+Created additional file to make sure directory isn't empty, because self-test cannot handle empty directories.
diff --git a/gm/tests/outputs/ignore-expectations-mismatch/output-expected/writePath/8888/bogusfile b/gm/tests/outputs/ignore-expectations-mismatch/output-expected/writePath/8888/bogusfile
new file mode 100644
index 0000000..d86cd5b
--- /dev/null
+++ b/gm/tests/outputs/ignore-expectations-mismatch/output-expected/writePath/8888/bogusfile
@@ -0,0 +1 @@
+Created additional file to make sure directory isn't empty, because self-test cannot handle empty directories.
diff --git a/gm/tests/outputs/ignore-expectations-mismatch/output-expected/writePath/bogusfile b/gm/tests/outputs/ignore-expectations-mismatch/output-expected/writePath/bogusfile
new file mode 100644
index 0000000..d86cd5b
--- /dev/null
+++ b/gm/tests/outputs/ignore-expectations-mismatch/output-expected/writePath/bogusfile
@@ -0,0 +1 @@
+Created additional file to make sure directory isn't empty, because self-test cannot handle empty directories.
diff --git a/gm/tests/outputs/intentionally-skipped-tests/output-expected/command_line b/gm/tests/outputs/intentionally-skipped-tests/output-expected/command_line
index 29ff44d..5061bb3 100644
--- a/gm/tests/outputs/intentionally-skipped-tests/output-expected/command_line
+++ b/gm/tests/outputs/intentionally-skipped-tests/output-expected/command_line
@@ -1 +1 @@
-out/Debug/gm --verbose --hierarchy --match selftest1 selftest2 --config 8888 565 --writeJsonSummaryPath gm/tests/outputs/intentionally-skipped-tests/output-actual/json-summary.txt --writePath gm/tests/outputs/intentionally-skipped-tests/output-actual/writePath --mismatchPath gm/tests/outputs/intentionally-skipped-tests/output-actual/mismatchPath
+out/Debug/gm --verbose --hierarchy --match selftest1 selftest2 --config 8888 565 --writeJsonSummaryPath gm/tests/outputs/intentionally-skipped-tests/output-actual/json-summary.txt --writePath gm/tests/outputs/intentionally-skipped-tests/output-actual/writePath --mismatchPath gm/tests/outputs/intentionally-skipped-tests/output-actual/mismatchPath --missingExpectationsPath gm/tests/outputs/intentionally-skipped-tests/output-actual/missingExpectationsPath
diff --git a/gm/tests/outputs/intentionally-skipped-tests/output-expected/mismatchPath/bogusfile b/gm/tests/outputs/intentionally-skipped-tests/output-expected/mismatchPath/bogusfile
new file mode 100644
index 0000000..d86cd5b
--- /dev/null
+++ b/gm/tests/outputs/intentionally-skipped-tests/output-expected/mismatchPath/bogusfile
@@ -0,0 +1 @@
+Created additional file to make sure directory isn't empty, because self-test cannot handle empty directories.
diff --git a/gm/tests/outputs/intentionally-skipped-tests/output-expected/missingExpectationsPath/565/bogusfile b/gm/tests/outputs/intentionally-skipped-tests/output-expected/missingExpectationsPath/565/bogusfile
new file mode 100644
index 0000000..d86cd5b
--- /dev/null
+++ b/gm/tests/outputs/intentionally-skipped-tests/output-expected/missingExpectationsPath/565/bogusfile
@@ -0,0 +1 @@
+Created additional file to make sure directory isn't empty, because self-test cannot handle empty directories.
diff --git a/gm/tests/outputs/intentionally-skipped-tests/output-expected/missingExpectationsPath/8888/bogusfile b/gm/tests/outputs/intentionally-skipped-tests/output-expected/missingExpectationsPath/8888/bogusfile
new file mode 100644
index 0000000..d86cd5b
--- /dev/null
+++ b/gm/tests/outputs/intentionally-skipped-tests/output-expected/missingExpectationsPath/8888/bogusfile
@@ -0,0 +1 @@
+Created additional file to make sure directory isn't empty, because self-test cannot handle empty directories.
diff --git a/gm/tests/outputs/intentionally-skipped-tests/output-expected/missingExpectationsPath/bogusfile b/gm/tests/outputs/intentionally-skipped-tests/output-expected/missingExpectationsPath/bogusfile
new file mode 100644
index 0000000..d86cd5b
--- /dev/null
+++ b/gm/tests/outputs/intentionally-skipped-tests/output-expected/missingExpectationsPath/bogusfile
@@ -0,0 +1 @@
+Created additional file to make sure directory isn't empty, because self-test cannot handle empty directories.
diff --git a/gm/tests/outputs/intentionally-skipped-tests/output-expected/stdout b/gm/tests/outputs/intentionally-skipped-tests/output-expected/stdout
index b94f24c..31ae218 100644
--- a/gm/tests/outputs/intentionally-skipped-tests/output-expected/stdout
+++ b/gm/tests/outputs/intentionally-skipped-tests/output-expected/stdout
@@ -1,6 +1,7 @@
GM: These configs will be run: 8888 565
GM: writing to gm/tests/outputs/intentionally-skipped-tests/output-actual/writePath
GM: writing mismatches to gm/tests/outputs/intentionally-skipped-tests/output-actual/mismatchPath
+GM: writing images without expectations to gm/tests/outputs/intentionally-skipped-tests/output-actual/missingExpectationsPath
GM: drawing... selftest2 [300 200]
GM: drawing... selftest1 [300 200]
GM: Ran 2 GMs
diff --git a/gm/tests/outputs/intentionally-skipped-tests/output-expected/writePath/565/bogusfile b/gm/tests/outputs/intentionally-skipped-tests/output-expected/writePath/565/bogusfile
new file mode 100644
index 0000000..d86cd5b
--- /dev/null
+++ b/gm/tests/outputs/intentionally-skipped-tests/output-expected/writePath/565/bogusfile
@@ -0,0 +1 @@
+Created additional file to make sure directory isn't empty, because self-test cannot handle empty directories.
diff --git a/gm/tests/outputs/intentionally-skipped-tests/output-expected/writePath/8888/bogusfile b/gm/tests/outputs/intentionally-skipped-tests/output-expected/writePath/8888/bogusfile
new file mode 100644
index 0000000..d86cd5b
--- /dev/null
+++ b/gm/tests/outputs/intentionally-skipped-tests/output-expected/writePath/8888/bogusfile
@@ -0,0 +1 @@
+Created additional file to make sure directory isn't empty, because self-test cannot handle empty directories.
diff --git a/gm/tests/outputs/intentionally-skipped-tests/output-expected/writePath/bogusfile b/gm/tests/outputs/intentionally-skipped-tests/output-expected/writePath/bogusfile
new file mode 100644
index 0000000..d86cd5b
--- /dev/null
+++ b/gm/tests/outputs/intentionally-skipped-tests/output-expected/writePath/bogusfile
@@ -0,0 +1 @@
+Created additional file to make sure directory isn't empty, because self-test cannot handle empty directories.
diff --git a/gm/tests/outputs/no-hierarchy/output-expected/command_line b/gm/tests/outputs/no-hierarchy/output-expected/command_line
index 7f8fa53..1b5f8aa 100644
--- a/gm/tests/outputs/no-hierarchy/output-expected/command_line
+++ b/gm/tests/outputs/no-hierarchy/output-expected/command_line
@@ -1 +1 @@
-out/Debug/gm --verbose --match selftest1 --config 8888 565 -r gm/tests/inputs/json/different-pixels-no-hierarchy.json --writeJsonSummaryPath gm/tests/outputs/no-hierarchy/output-actual/json-summary.txt --writePath gm/tests/outputs/no-hierarchy/output-actual/writePath --mismatchPath gm/tests/outputs/no-hierarchy/output-actual/mismatchPath
+out/Debug/gm --verbose --match selftest1 --config 8888 565 -r gm/tests/inputs/json/different-pixels-no-hierarchy.json --writeJsonSummaryPath gm/tests/outputs/no-hierarchy/output-actual/json-summary.txt --writePath gm/tests/outputs/no-hierarchy/output-actual/writePath --mismatchPath gm/tests/outputs/no-hierarchy/output-actual/mismatchPath --missingExpectationsPath gm/tests/outputs/no-hierarchy/output-actual/missingExpectationsPath
diff --git a/gm/tests/outputs/no-hierarchy/output-expected/mismatchPath/bogusfile b/gm/tests/outputs/no-hierarchy/output-expected/mismatchPath/bogusfile
new file mode 100644
index 0000000..d86cd5b
--- /dev/null
+++ b/gm/tests/outputs/no-hierarchy/output-expected/mismatchPath/bogusfile
@@ -0,0 +1 @@
+Created additional file to make sure directory isn't empty, because self-test cannot handle empty directories.
diff --git a/gm/tests/outputs/no-hierarchy/output-expected/missingExpectationsPath/bogusfile b/gm/tests/outputs/no-hierarchy/output-expected/missingExpectationsPath/bogusfile
new file mode 100644
index 0000000..d86cd5b
--- /dev/null
+++ b/gm/tests/outputs/no-hierarchy/output-expected/missingExpectationsPath/bogusfile
@@ -0,0 +1 @@
+Created additional file to make sure directory isn't empty, because self-test cannot handle empty directories.
diff --git a/gm/tests/outputs/no-hierarchy/output-expected/stdout b/gm/tests/outputs/no-hierarchy/output-expected/stdout
index c53e244..dffd3c8 100644
--- a/gm/tests/outputs/no-hierarchy/output-expected/stdout
+++ b/gm/tests/outputs/no-hierarchy/output-expected/stdout
@@ -2,6 +2,7 @@
GM: reading expectations from JSON summary file gm/tests/inputs/json/different-pixels-no-hierarchy.json
GM: writing to gm/tests/outputs/no-hierarchy/output-actual/writePath
GM: writing mismatches to gm/tests/outputs/no-hierarchy/output-actual/mismatchPath
+GM: writing images without expectations to gm/tests/outputs/no-hierarchy/output-actual/missingExpectationsPath
GM: drawing... selftest1 [300 200]
GM: Ran 1 GMs
GM: ... over 2 configs ["8888", "565"]
diff --git a/gm/tests/outputs/no-hierarchy/output-expected/writePath/bogusfile b/gm/tests/outputs/no-hierarchy/output-expected/writePath/bogusfile
new file mode 100644
index 0000000..d86cd5b
--- /dev/null
+++ b/gm/tests/outputs/no-hierarchy/output-expected/writePath/bogusfile
@@ -0,0 +1 @@
+Created additional file to make sure directory isn't empty, because self-test cannot handle empty directories.
diff --git a/gm/tests/outputs/no-readpath/output-expected/command_line b/gm/tests/outputs/no-readpath/output-expected/command_line
index bb3679c..9689801 100644
--- a/gm/tests/outputs/no-readpath/output-expected/command_line
+++ b/gm/tests/outputs/no-readpath/output-expected/command_line
@@ -1 +1 @@
-out/Debug/gm --verbose --hierarchy --match selftest1 --config 8888 565 --writeJsonSummaryPath gm/tests/outputs/no-readpath/output-actual/json-summary.txt --writePath gm/tests/outputs/no-readpath/output-actual/writePath --mismatchPath gm/tests/outputs/no-readpath/output-actual/mismatchPath
+out/Debug/gm --verbose --hierarchy --match selftest1 --config 8888 565 --writeJsonSummaryPath gm/tests/outputs/no-readpath/output-actual/json-summary.txt --writePath gm/tests/outputs/no-readpath/output-actual/writePath --mismatchPath gm/tests/outputs/no-readpath/output-actual/mismatchPath --missingExpectationsPath gm/tests/outputs/no-readpath/output-actual/missingExpectationsPath
diff --git a/gm/tests/outputs/no-readpath/output-expected/mismatchPath/bogusfile b/gm/tests/outputs/no-readpath/output-expected/mismatchPath/bogusfile
new file mode 100644
index 0000000..d86cd5b
--- /dev/null
+++ b/gm/tests/outputs/no-readpath/output-expected/mismatchPath/bogusfile
@@ -0,0 +1 @@
+Created additional file to make sure directory isn't empty, because self-test cannot handle empty directories.
diff --git a/gm/tests/outputs/no-readpath/output-expected/missingExpectationsPath/565/bogusfile b/gm/tests/outputs/no-readpath/output-expected/missingExpectationsPath/565/bogusfile
new file mode 100644
index 0000000..d86cd5b
--- /dev/null
+++ b/gm/tests/outputs/no-readpath/output-expected/missingExpectationsPath/565/bogusfile
@@ -0,0 +1 @@
+Created additional file to make sure directory isn't empty, because self-test cannot handle empty directories.
diff --git a/gm/tests/outputs/no-readpath/output-expected/missingExpectationsPath/8888/bogusfile b/gm/tests/outputs/no-readpath/output-expected/missingExpectationsPath/8888/bogusfile
new file mode 100644
index 0000000..d86cd5b
--- /dev/null
+++ b/gm/tests/outputs/no-readpath/output-expected/missingExpectationsPath/8888/bogusfile
@@ -0,0 +1 @@
+Created additional file to make sure directory isn't empty, because self-test cannot handle empty directories.
diff --git a/gm/tests/outputs/no-readpath/output-expected/missingExpectationsPath/bogusfile b/gm/tests/outputs/no-readpath/output-expected/missingExpectationsPath/bogusfile
new file mode 100644
index 0000000..d86cd5b
--- /dev/null
+++ b/gm/tests/outputs/no-readpath/output-expected/missingExpectationsPath/bogusfile
@@ -0,0 +1 @@
+Created additional file to make sure directory isn't empty, because self-test cannot handle empty directories.
diff --git a/gm/tests/outputs/no-readpath/output-expected/stdout b/gm/tests/outputs/no-readpath/output-expected/stdout
index 43f4ca3..688e5b9 100644
--- a/gm/tests/outputs/no-readpath/output-expected/stdout
+++ b/gm/tests/outputs/no-readpath/output-expected/stdout
@@ -1,6 +1,7 @@
GM: These configs will be run: 8888 565
GM: writing to gm/tests/outputs/no-readpath/output-actual/writePath
GM: writing mismatches to gm/tests/outputs/no-readpath/output-actual/mismatchPath
+GM: writing images without expectations to gm/tests/outputs/no-readpath/output-actual/missingExpectationsPath
GM: drawing... selftest1 [300 200]
GM: Ran 1 GMs
GM: ... over 2 configs ["8888", "565"]
diff --git a/gm/tests/outputs/no-readpath/output-expected/writePath/565/bogusfile b/gm/tests/outputs/no-readpath/output-expected/writePath/565/bogusfile
new file mode 100644
index 0000000..d86cd5b
--- /dev/null
+++ b/gm/tests/outputs/no-readpath/output-expected/writePath/565/bogusfile
@@ -0,0 +1 @@
+Created additional file to make sure directory isn't empty, because self-test cannot handle empty directories.
diff --git a/gm/tests/outputs/no-readpath/output-expected/writePath/8888/bogusfile b/gm/tests/outputs/no-readpath/output-expected/writePath/8888/bogusfile
new file mode 100644
index 0000000..d86cd5b
--- /dev/null
+++ b/gm/tests/outputs/no-readpath/output-expected/writePath/8888/bogusfile
@@ -0,0 +1 @@
+Created additional file to make sure directory isn't empty, because self-test cannot handle empty directories.
diff --git a/gm/tests/outputs/no-readpath/output-expected/writePath/bogusfile b/gm/tests/outputs/no-readpath/output-expected/writePath/bogusfile
new file mode 100644
index 0000000..d86cd5b
--- /dev/null
+++ b/gm/tests/outputs/no-readpath/output-expected/writePath/bogusfile
@@ -0,0 +1 @@
+Created additional file to make sure directory isn't empty, because self-test cannot handle empty directories.
diff --git a/gm/tests/outputs/nonverbose/output-expected/command_line b/gm/tests/outputs/nonverbose/output-expected/command_line
index 911455f..c9964ec 100644
--- a/gm/tests/outputs/nonverbose/output-expected/command_line
+++ b/gm/tests/outputs/nonverbose/output-expected/command_line
@@ -1 +1 @@
-out/Debug/gm --hierarchy --match selftest1 --config 8888 565 -r gm/tests/inputs/images/empty-dir --writeJsonSummaryPath gm/tests/outputs/nonverbose/output-actual/json-summary.txt --writePath gm/tests/outputs/nonverbose/output-actual/writePath --mismatchPath gm/tests/outputs/nonverbose/output-actual/mismatchPath
+out/Debug/gm --hierarchy --match selftest1 --config 8888 565 -r gm/tests/inputs/images/empty-dir --writeJsonSummaryPath gm/tests/outputs/nonverbose/output-actual/json-summary.txt --writePath gm/tests/outputs/nonverbose/output-actual/writePath --mismatchPath gm/tests/outputs/nonverbose/output-actual/mismatchPath --missingExpectationsPath gm/tests/outputs/nonverbose/output-actual/missingExpectationsPath
diff --git a/gm/tests/outputs/nonverbose/output-expected/mismatchPath/bogusfile b/gm/tests/outputs/nonverbose/output-expected/mismatchPath/bogusfile
new file mode 100644
index 0000000..d86cd5b
--- /dev/null
+++ b/gm/tests/outputs/nonverbose/output-expected/mismatchPath/bogusfile
@@ -0,0 +1 @@
+Created additional file to make sure directory isn't empty, because self-test cannot handle empty directories.
diff --git a/gm/tests/outputs/nonverbose/output-expected/missingExpectationsPath/565/bogusfile b/gm/tests/outputs/nonverbose/output-expected/missingExpectationsPath/565/bogusfile
new file mode 100644
index 0000000..d86cd5b
--- /dev/null
+++ b/gm/tests/outputs/nonverbose/output-expected/missingExpectationsPath/565/bogusfile
@@ -0,0 +1 @@
+Created additional file to make sure directory isn't empty, because self-test cannot handle empty directories.
diff --git a/gm/tests/outputs/nonverbose/output-expected/missingExpectationsPath/565/selftest1.png b/gm/tests/outputs/nonverbose/output-expected/missingExpectationsPath/565/selftest1.png
new file mode 100644
index 0000000..a8ef872
--- /dev/null
+++ b/gm/tests/outputs/nonverbose/output-expected/missingExpectationsPath/565/selftest1.png
@@ -0,0 +1 @@
+[contents of gm/tests/outputs/nonverbose/output-actual/missingExpectationsPath/565/selftest1.png]
diff --git a/gm/tests/outputs/nonverbose/output-expected/missingExpectationsPath/8888/bogusfile b/gm/tests/outputs/nonverbose/output-expected/missingExpectationsPath/8888/bogusfile
new file mode 100644
index 0000000..d86cd5b
--- /dev/null
+++ b/gm/tests/outputs/nonverbose/output-expected/missingExpectationsPath/8888/bogusfile
@@ -0,0 +1 @@
+Created additional file to make sure directory isn't empty, because self-test cannot handle empty directories.
diff --git a/gm/tests/outputs/nonverbose/output-expected/missingExpectationsPath/8888/selftest1.png b/gm/tests/outputs/nonverbose/output-expected/missingExpectationsPath/8888/selftest1.png
new file mode 100644
index 0000000..9132f60
--- /dev/null
+++ b/gm/tests/outputs/nonverbose/output-expected/missingExpectationsPath/8888/selftest1.png
@@ -0,0 +1 @@
+[contents of gm/tests/outputs/nonverbose/output-actual/missingExpectationsPath/8888/selftest1.png]
diff --git a/gm/tests/outputs/nonverbose/output-expected/missingExpectationsPath/bogusfile b/gm/tests/outputs/nonverbose/output-expected/missingExpectationsPath/bogusfile
new file mode 100644
index 0000000..d86cd5b
--- /dev/null
+++ b/gm/tests/outputs/nonverbose/output-expected/missingExpectationsPath/bogusfile
@@ -0,0 +1 @@
+Created additional file to make sure directory isn't empty, because self-test cannot handle empty directories.
diff --git a/gm/tests/outputs/nonverbose/output-expected/writePath/565/bogusfile b/gm/tests/outputs/nonverbose/output-expected/writePath/565/bogusfile
new file mode 100644
index 0000000..d86cd5b
--- /dev/null
+++ b/gm/tests/outputs/nonverbose/output-expected/writePath/565/bogusfile
@@ -0,0 +1 @@
+Created additional file to make sure directory isn't empty, because self-test cannot handle empty directories.
diff --git a/gm/tests/outputs/nonverbose/output-expected/writePath/8888/bogusfile b/gm/tests/outputs/nonverbose/output-expected/writePath/8888/bogusfile
new file mode 100644
index 0000000..d86cd5b
--- /dev/null
+++ b/gm/tests/outputs/nonverbose/output-expected/writePath/8888/bogusfile
@@ -0,0 +1 @@
+Created additional file to make sure directory isn't empty, because self-test cannot handle empty directories.
diff --git a/gm/tests/outputs/nonverbose/output-expected/writePath/bogusfile b/gm/tests/outputs/nonverbose/output-expected/writePath/bogusfile
new file mode 100644
index 0000000..d86cd5b
--- /dev/null
+++ b/gm/tests/outputs/nonverbose/output-expected/writePath/bogusfile
@@ -0,0 +1 @@
+Created additional file to make sure directory isn't empty, because self-test cannot handle empty directories.
diff --git a/gm/tests/outputs/pipe-playback-failure/output-expected/command_line b/gm/tests/outputs/pipe-playback-failure/output-expected/command_line
index ffcf72d..60f36dd 100644
--- a/gm/tests/outputs/pipe-playback-failure/output-expected/command_line
+++ b/gm/tests/outputs/pipe-playback-failure/output-expected/command_line
@@ -1 +1 @@
-out/Debug/gm --simulatePipePlaybackFailure --verbose --hierarchy --match selftest1 --config 8888 565 -r gm/tests/inputs/json/identical-pixels.json --writeJsonSummaryPath gm/tests/outputs/pipe-playback-failure/output-actual/json-summary.txt --writePath gm/tests/outputs/pipe-playback-failure/output-actual/writePath --mismatchPath gm/tests/outputs/pipe-playback-failure/output-actual/mismatchPath
+out/Debug/gm --simulatePipePlaybackFailure --verbose --hierarchy --match selftest1 --config 8888 565 -r gm/tests/inputs/json/identical-pixels.json --writeJsonSummaryPath gm/tests/outputs/pipe-playback-failure/output-actual/json-summary.txt --writePath gm/tests/outputs/pipe-playback-failure/output-actual/writePath --mismatchPath gm/tests/outputs/pipe-playback-failure/output-actual/mismatchPath --missingExpectationsPath gm/tests/outputs/pipe-playback-failure/output-actual/missingExpectationsPath
diff --git a/gm/tests/outputs/pipe-playback-failure/output-expected/mismatchPath/bogusfile b/gm/tests/outputs/pipe-playback-failure/output-expected/mismatchPath/bogusfile
new file mode 100644
index 0000000..d86cd5b
--- /dev/null
+++ b/gm/tests/outputs/pipe-playback-failure/output-expected/mismatchPath/bogusfile
@@ -0,0 +1 @@
+Created additional file to make sure directory isn't empty, because self-test cannot handle empty directories.
diff --git a/gm/tests/outputs/pipe-playback-failure/output-expected/missingExpectationsPath/565/bogusfile b/gm/tests/outputs/pipe-playback-failure/output-expected/missingExpectationsPath/565/bogusfile
new file mode 100644
index 0000000..d86cd5b
--- /dev/null
+++ b/gm/tests/outputs/pipe-playback-failure/output-expected/missingExpectationsPath/565/bogusfile
@@ -0,0 +1 @@
+Created additional file to make sure directory isn't empty, because self-test cannot handle empty directories.
diff --git a/gm/tests/outputs/pipe-playback-failure/output-expected/missingExpectationsPath/8888/bogusfile b/gm/tests/outputs/pipe-playback-failure/output-expected/missingExpectationsPath/8888/bogusfile
new file mode 100644
index 0000000..d86cd5b
--- /dev/null
+++ b/gm/tests/outputs/pipe-playback-failure/output-expected/missingExpectationsPath/8888/bogusfile
@@ -0,0 +1 @@
+Created additional file to make sure directory isn't empty, because self-test cannot handle empty directories.
diff --git a/gm/tests/outputs/pipe-playback-failure/output-expected/missingExpectationsPath/bogusfile b/gm/tests/outputs/pipe-playback-failure/output-expected/missingExpectationsPath/bogusfile
new file mode 100644
index 0000000..d86cd5b
--- /dev/null
+++ b/gm/tests/outputs/pipe-playback-failure/output-expected/missingExpectationsPath/bogusfile
@@ -0,0 +1 @@
+Created additional file to make sure directory isn't empty, because self-test cannot handle empty directories.
diff --git a/gm/tests/outputs/pipe-playback-failure/output-expected/stdout b/gm/tests/outputs/pipe-playback-failure/output-expected/stdout
index e15af88..818b0e8 100644
--- a/gm/tests/outputs/pipe-playback-failure/output-expected/stdout
+++ b/gm/tests/outputs/pipe-playback-failure/output-expected/stdout
@@ -2,6 +2,7 @@
GM: reading expectations from JSON summary file gm/tests/inputs/json/identical-pixels.json
GM: writing to gm/tests/outputs/pipe-playback-failure/output-actual/writePath
GM: writing mismatches to gm/tests/outputs/pipe-playback-failure/output-actual/mismatchPath
+GM: writing images without expectations to gm/tests/outputs/pipe-playback-failure/output-actual/missingExpectationsPath
GM: drawing... selftest1 [300 200]
GM: Ran 1 GMs
GM: ... over 2 configs ["8888", "565"]
diff --git a/gm/tests/outputs/pipe-playback-failure/output-expected/writePath/565/bogusfile b/gm/tests/outputs/pipe-playback-failure/output-expected/writePath/565/bogusfile
new file mode 100644
index 0000000..d86cd5b
--- /dev/null
+++ b/gm/tests/outputs/pipe-playback-failure/output-expected/writePath/565/bogusfile
@@ -0,0 +1 @@
+Created additional file to make sure directory isn't empty, because self-test cannot handle empty directories.
diff --git a/gm/tests/outputs/pipe-playback-failure/output-expected/writePath/8888/bogusfile b/gm/tests/outputs/pipe-playback-failure/output-expected/writePath/8888/bogusfile
new file mode 100644
index 0000000..d86cd5b
--- /dev/null
+++ b/gm/tests/outputs/pipe-playback-failure/output-expected/writePath/8888/bogusfile
@@ -0,0 +1 @@
+Created additional file to make sure directory isn't empty, because self-test cannot handle empty directories.
diff --git a/gm/tests/outputs/pipe-playback-failure/output-expected/writePath/bogusfile b/gm/tests/outputs/pipe-playback-failure/output-expected/writePath/bogusfile
new file mode 100644
index 0000000..d86cd5b
--- /dev/null
+++ b/gm/tests/outputs/pipe-playback-failure/output-expected/writePath/bogusfile
@@ -0,0 +1 @@
+Created additional file to make sure directory isn't empty, because self-test cannot handle empty directories.
diff --git a/gm/tests/run.sh b/gm/tests/run.sh
index ab930a1..ef36680 100755
--- a/gm/tests/run.sh
+++ b/gm/tests/run.sh
@@ -85,7 +85,7 @@
rm -rf $ACTUAL_OUTPUT_DIR
mkdir -p $ACTUAL_OUTPUT_DIR
- COMMAND="$GM_BINARY $GM_ARGS --writeJsonSummaryPath $JSON_SUMMARY_FILE --writePath $ACTUAL_OUTPUT_DIR/writePath --mismatchPath $ACTUAL_OUTPUT_DIR/mismatchPath"
+ COMMAND="$GM_BINARY $GM_ARGS --writeJsonSummaryPath $JSON_SUMMARY_FILE --writePath $ACTUAL_OUTPUT_DIR/writePath --mismatchPath $ACTUAL_OUTPUT_DIR/mismatchPath --missingExpectationsPath $ACTUAL_OUTPUT_DIR/missingExpectationsPath"
echo "$COMMAND" >$ACTUAL_OUTPUT_DIR/command_line
$COMMAND >$ACTUAL_OUTPUT_DIR/stdout 2>$ACTUAL_OUTPUT_DIR/stderr
@@ -108,11 +108,11 @@
for IMAGEFILE in $(find $ACTUAL_OUTPUT_DIR -name *.png); do
echo "[contents of $IMAGEFILE]" >$IMAGEFILE
done
- if [ -d $ACTUAL_OUTPUT_DIR/mismatchPath ]; then
- for MISMATCHDIR in $(find $ACTUAL_OUTPUT_DIR/mismatchPath -mindepth 1 -type d); do
- echo "Created additional file to make sure directory isn't empty, because self-test cannot handle empty directories." >$MISMATCHDIR/bogusfile
- done
- fi
+
+ # Add a file to any empty subdirectories.
+ for DIR in $(find $ACTUAL_OUTPUT_DIR -mindepth 1 -type d); do
+ echo "Created additional file to make sure directory isn't empty, because self-test cannot handle empty directories." >$DIR/bogusfile
+ done
compare_directories $EXPECTED_OUTPUT_DIR $ACTUAL_OUTPUT_DIR
}