Index: gm/gmmain.cpp |
=================================================================== |
--- gm/gmmain.cpp (revision 8593) |
+++ gm/gmmain.cpp (working copy) |
@@ -1189,8 +1189,6 @@ |
// Alphabetized ignoring "no" prefix ("readPath", "noreplay", "resourcePath"). |
DEFINE_string(config, "", configUsage().c_str()); |
DEFINE_bool(deferred, true, "Exercise the deferred rendering test pass."); |
-DEFINE_bool(enableMissingWarning, true, "Print message to stderr (but don't fail) if " |
- "unable to read a reference image for any tests."); |
DEFINE_string(excludeConfig, "", "Space delimited list of configs to skip."); |
DEFINE_bool(forceBWtext, false, "Disable text anti-aliasing."); |
#if SK_SUPPORT_GPU |
@@ -1220,7 +1218,8 @@ |
DEFINE_string(tileGridReplayScales, "", "Space separated list of floating-point scale " |
"factors to be used for tileGrid playback testing. Default value: 1.0"); |
DEFINE_string(writeJsonSummaryPath, "", "Write a JSON-formatted result summary to this file."); |
-DEFINE_bool2(verbose, v, false, "Print diagnostics (e.g. list each config to be tested)."); |
+DEFINE_bool2(verbose, v, false, "Give more detail (e.g. list all GMs run, more info about " |
+ "each test)."); |
DEFINE_string2(writePath, w, "", "Write rendered images into this directory."); |
DEFINE_string2(writePicturePath, p, "", "Write .skp files into this directory."); |
@@ -1685,14 +1684,14 @@ |
if (kGPU_Backend == gRec[index].fBackend) { |
GrContext* ctx = grFactory->get(gRec[index].fGLContextType); |
if (NULL == ctx) { |
- SkDebugf("GrContext could not be created for config %s. Config will be skipped.", |
- gRec[index].fName); |
+ gm_fprintf(stderr, "GrContext could not be created for config %s." |
+ " Config will be skipped.\n", gRec[index].fName); |
configs.remove(i); |
--i; |
} |
if (gRec[index].fSampleCnt > ctx->getMaxSampleCount()) { |
- SkDebugf("Sample count (%d) of config %s is not supported. Config will be skipped.", |
- gRec[index].fSampleCnt, gRec[index].fName); |
+ gm_fprintf(stderr, "Sample count (%d) of config %s is not supported." |
+ " Config will be skipped.\n", gRec[index].fSampleCnt, gRec[index].fName); |
configs.remove(i); |
--i; |
} |
@@ -1713,25 +1712,30 @@ |
return -1; |
} |
if (sk_isdir(readPath)) { |
- gm_fprintf(stdout, "reading from %s\n", readPath); |
+ if (FLAGS_verbose) { |
+ gm_fprintf(stdout, "reading from %s\n", readPath); |
+ } |
gmmain.fExpectationsSource.reset(SkNEW_ARGS( |
- IndividualImageExpectationsSource, |
- (readPath, FLAGS_enableMissingWarning))); |
+ IndividualImageExpectationsSource, (readPath))); |
} else { |
- gm_fprintf(stdout, "reading expectations from JSON summary file %s\n", readPath); |
+ if (FLAGS_verbose) { |
+ gm_fprintf(stdout, "reading expectations from JSON summary file %s\n", readPath); |
+ } |
gmmain.fExpectationsSource.reset(SkNEW_ARGS( |
JsonExpectationsSource, (readPath))); |
} |
} |
- if (FLAGS_writePath.count() == 1) { |
- gm_fprintf(stderr, "writing to %s\n", FLAGS_writePath[0]); |
+ if (FLAGS_verbose) { |
+ if (FLAGS_writePath.count() == 1) { |
+ gm_fprintf(stdout, "writing to %s\n", FLAGS_writePath[0]); |
+ } |
+ if (FLAGS_writePicturePath.count() == 1) { |
+ gm_fprintf(stdout, "writing pictures to %s\n", FLAGS_writePicturePath[0]); |
+ } |
+ if (FLAGS_resourcePath.count() == 1) { |
+ gm_fprintf(stdout, "reading resources from %s\n", FLAGS_resourcePath[0]); |
+ } |
} |
- if (FLAGS_writePicturePath.count() == 1) { |
- gm_fprintf(stderr, "writing pictures to %s\n", FLAGS_writePicturePath[0]); |
- } |
- if (FLAGS_resourcePath.count() == 1) { |
- gm_fprintf(stderr, "reading resources from %s\n", FLAGS_resourcePath[0]); |
- } |
if (moduloDivisor <= 0) { |
moduloRemainder = -1; |
@@ -1782,8 +1786,10 @@ |
gmsRun++; |
SkISize size = gm->getISize(); |
- gm_fprintf(stdout, "%sdrawing... %s [%d %d]\n", moduloStr.c_str(), shortName, |
- size.width(), size.height()); |
+ if (FLAGS_verbose) { |
+ gm_fprintf(stdout, "%sdrawing... %s [%d %d]\n", moduloStr.c_str(), shortName, |
+ size.width(), size.height()); |
+ } |
run_multiple_configs(gmmain, gm, configs, grFactory); |
@@ -1850,7 +1856,7 @@ |
for (int i = 0; i < configs.count(); i++) { |
ConfigData config = gRec[configs[i]]; |
- if (kGPU_Backend == config.fBackend) { |
+ if (FLAGS_verbose && (kGPU_Backend == config.fBackend)) { |
GrContext* gr = grFactory->get(config.fGLContextType); |
gm_fprintf(stdout, "config: %s %x\n", config.fName, gr); |