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

Unified Diff: tests/skia_test.cpp

Issue 14002007: allow tests to optionally use multiple threads (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 8 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 | « tests/Test.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/skia_test.cpp
===================================================================
--- tests/skia_test.cpp (revision 8745)
+++ tests/skia_test.cpp (working copy)
@@ -62,10 +62,11 @@
class DebugfReporter : public Reporter {
public:
- DebugfReporter(bool allowExtendedTest)
+ DebugfReporter(bool allowExtendedTest, bool allowThreaded)
: fIndex(0)
, fTotal(0)
- , fAllowExtendedTest(allowExtendedTest) {
+ , fAllowExtendedTest(allowExtendedTest)
+ , fAllowThreaded(allowThreaded) {
}
void setIndexOfTotal(int index, int total) {
@@ -77,6 +78,10 @@
return fAllowExtendedTest;
}
+ virtual bool allowThreaded() const {
+ return fAllowThreaded;
+ }
+
protected:
virtual void onStart(Test* test) {
SkDebugf("[%d/%d] %s...\n", fIndex+1, fTotal, test->getName());
@@ -92,6 +97,7 @@
private:
int fIndex, fTotal;
bool fAllowExtendedTest;
+ bool fAllowThreaded;
};
static const char* make_canonical_dir_path(const char* path, SkString* storage) {
@@ -126,6 +132,7 @@
DEFINE_string2(tmpDir, t, NULL, "tmp directory for tests to use.");
DEFINE_string2(resourcePath, i, NULL, "directory for test resources.");
DEFINE_bool2(extendedTest, x, false, "run extended tests for pathOps.");
+DEFINE_bool2(threaded, z, false, "allow tests to use multiple threads.");
DEFINE_bool2(verbose, v, false, "enable verbose output.");
int tool_main(int argc, char** argv);
@@ -170,7 +177,7 @@
SkDebugf("%s\n", header.c_str());
}
- DebugfReporter reporter(FLAGS_extendedTest);
+ DebugfReporter reporter(FLAGS_extendedTest, FLAGS_threaded);
Iter iter(&reporter);
Test* test;
« no previous file with comments | « tests/Test.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698