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

Unified Diff: gm/gmmain.cpp

Issue 136883006: make ignored-tests.txt specify full test name, not partial name (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: update real ignored-tests.txt file Created 6 years, 11 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
Index: gm/gmmain.cpp
diff --git a/gm/gmmain.cpp b/gm/gmmain.cpp
index daf0baed51ef0d39faed5f8fb683750891fa85d0..3b7e76a757145198ea5ffb947a21f0c5198a11f8 100644
--- a/gm/gmmain.cpp
+++ b/gm/gmmain.cpp
@@ -326,9 +326,9 @@ public:
/**
* 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())) {
+ bool ShouldIgnoreTest(const char *name) const {
+ for (int i = 0; i < fIgnorableTestNames.count(); i++) {
+ if (fIgnorableTestNames[i].equals(name)) {
return true;
}
}
@@ -918,9 +918,6 @@ public:
ErrorCombination compare_test_results_to_stored_expectations(
GM* gm, const ConfigData& gRec, const char* configName,
const BitmapAndDigest* actualBitmapAndDigest) {
-
- SkString shortNamePlusConfig = make_shortname_plus_config(gm->shortName(), configName);
-
ErrorCombination errors;
if (NULL == actualBitmapAndDigest) {
@@ -937,7 +934,7 @@ public:
errors.add(ErrorCombination(kIntentionallySkipped_ErrorType));
} else {
ExpectationsSource *expectationsSource = this->fExpectationsSource.get();
- SkString nameWithExtension(shortNamePlusConfig);
+ SkString nameWithExtension = make_shortname_plus_config(gm->shortName(), configName);
nameWithExtension.append(".");
nameWithExtension.append(kPNG_FileExtension);
@@ -956,7 +953,7 @@ public:
* See comments above complete_bitmap() for more detail.
*/
Expectations expectations = expectationsSource->get(nameWithExtension.c_str());
- if (this->ShouldIgnoreTest(shortNamePlusConfig)) {
+ if (this->ShouldIgnoreTest(gm->shortName())) {
expectations.setIgnoreFailure(true);
}
errors.add(compare_to_expectations(expectations, *actualBitmapAndDigest,
@@ -1254,7 +1251,7 @@ public:
bool fUseFileHierarchy, fWriteChecksumBasedFilenames;
ErrorCombination fIgnorableErrorTypes;
- SkTArray<SkString> fIgnorableTestSubstrings;
+ SkTArray<SkString> fIgnorableTestNames;
const char* fMismatchPath;
const char* fMissingExpectationsPath;
@@ -2074,11 +2071,11 @@ static bool parse_flags_ignore_error_types(ErrorCombination* outErrorTypes) {
}
/**
- * Replace contents of ignoreTestSubstrings with a list of testname/config substrings, indicating
+ * Replace contents of ignoreTestNames with a list of test names, indicating
* which tests' failures should be ignored.
*/
-static bool parse_flags_ignore_tests(SkTArray<SkString> &ignoreTestSubstrings) {
- ignoreTestSubstrings.reset();
+static bool parse_flags_ignore_tests(SkTArray<SkString> &ignoreTestNames) {
+ ignoreTestNames.reset();
// Parse --ignoreFailuresFile
for (int i = 0; i < FLAGS_ignoreFailuresFile.count(); i++) {
@@ -2091,7 +2088,7 @@ static bool parse_flags_ignore_tests(SkTArray<SkString> &ignoreTestSubstrings) {
if (thisLine.isEmpty() || thisLine.startsWith('#')) {
// skip this line
} else {
- ignoreTestSubstrings.push_back(thisLine);
+ ignoreTestNames.push_back(thisLine);
}
}
}
@@ -2231,7 +2228,7 @@ int tool_main(int argc, char** argv) {
if (!parse_flags_modulo(&moduloRemainder, &moduloDivisor) ||
!parse_flags_ignore_error_types(&gmmain.fIgnorableErrorTypes) ||
- !parse_flags_ignore_tests(gmmain.fIgnorableTestSubstrings) ||
+ !parse_flags_ignore_tests(gmmain.fIgnorableTestNames) ||
#if SK_SUPPORT_GPU
!parse_flags_gpu_cache(&gGpuCacheSizeBytes, &gGpuCacheSizeCount) ||
#endif
« no previous file with comments | « expectations/gm/ignored-tests.txt ('k') | gm/tests/outputs/compared-against-empty-dir/output-expected/command_line » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698