Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(89)

Unified Diff: gm/gmmain.cpp

Issue 26294004: GM: Allow ignored-tests.txt to list configs as well as tests (and combinations too) (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: clarify Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gm/gm.cpp ('k') | gm/tests/outputs/ignoring-one-test/output-expected/command_line » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/gmmain.cpp
===================================================================
--- gm/gmmain.cpp (revision 11630)
+++ gm/gmmain.cpp (working copy)
@@ -329,6 +329,18 @@
}
/**
+ * Returns true if failures on this test should be ignored.
+ */
+ bool ShouldIgnoreTest(const SkString &name) const {
+ for (int i = 0; i < fIgnorableTestSubstrings.count(); i++) {
+ if (name.contains(fIgnorableTestSubstrings[i].c_str())) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ /**
* Records the results of this test in fTestsRun and fFailedTests.
*
* We even record successes, and errors that we regard as
@@ -905,7 +917,7 @@
* See comments above complete_bitmap() for more detail.
*/
Expectations expectations = expectationsSource->get(nameWithExtension.c_str());
- if (gm->isIgnoringFailures()) {
+ if (this->ShouldIgnoreTest(shortNamePlusConfig)) {
expectations.setIgnoreFailure(true);
}
errors.add(compare_to_expectations(expectations, *actualBitmapAndDigest,
@@ -1212,6 +1224,7 @@
bool fUseFileHierarchy, fWriteChecksumBasedFilenames;
ErrorCombination fIgnorableErrorTypes;
+ SkTArray<SkString> fIgnorableTestSubstrings;
const char* fMismatchPath;
const char* fMissingExpectationsPath;
@@ -1979,6 +1992,18 @@
return true;
}
+/**
+ * Replace contents of ignoreTestSubstrings with a list of testname/config substrings, indicating
+ * which tests' failures should be ignored.
+ */
+static bool parse_flags_ignore_tests(SkTArray<SkString> &ignoreTestSubstrings) {
+ ignoreTestSubstrings.reset();
+ for (int i = 0; i < FLAGS_ignoreTests.count(); i++) {
+ ignoreTestSubstrings.push_back(SkString(FLAGS_ignoreTests[i]));
+ }
+ return true;
+}
+
static bool parse_flags_modulo(int* moduloRemainder, int* moduloDivisor) {
if (FLAGS_modulo.count() == 2) {
*moduloRemainder = atoi(FLAGS_modulo[0]);
@@ -2110,6 +2135,7 @@
if (!parse_flags_modulo(&moduloRemainder, &moduloDivisor) ||
!parse_flags_ignore_error_types(&gmmain.fIgnorableErrorTypes) ||
+ !parse_flags_ignore_tests(gmmain.fIgnorableTestSubstrings) ||
#if SK_SUPPORT_GPU
!parse_flags_gpu_cache(&gGpuCacheSizeBytes, &gGpuCacheSizeCount) ||
#endif
@@ -2191,9 +2217,6 @@
if (SkCommandLineFlags::ShouldSkip(FLAGS_match, shortName)) {
continue;
}
- if (FLAGS_ignoreTests.contains(shortName)) {
- gm->setIgnoreFailures(true);
- }
gmsRun++;
SkISize size = gm->getISize();
« no previous file with comments | « gm/gm.cpp ('k') | gm/tests/outputs/ignoring-one-test/output-expected/command_line » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698