Commit 1d9133bb authored by ricow@chromium.org's avatar ricow@chromium.org

Split threaded cctests into four parts (instead of 2)

The number of cctests are now so large that this is causing timeouts
when only splitting these into two parts.
Review URL: http://codereview.chromium.org/6929063

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7801 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent d4306605
...@@ -98,7 +98,11 @@ class ApiTestFuzzer: public v8::internal::Thread { ...@@ -98,7 +98,11 @@ class ApiTestFuzzer: public v8::internal::Thread {
// The ApiTestFuzzer is also a Thread, so it has a Run method. // The ApiTestFuzzer is also a Thread, so it has a Run method.
virtual void Run(); virtual void Run();
enum PartOfTest { FIRST_PART, SECOND_PART }; enum PartOfTest { FIRST_PART,
SECOND_PART,
THIRD_PART,
FOURTH_PART,
LAST_PART = FOURTH_PART };
static void Setup(PartOfTest part); static void Setup(PartOfTest part);
static void RunAllTests(); static void RunAllTests();
......
...@@ -9008,11 +9008,10 @@ static unsigned linear_congruential_generator; ...@@ -9008,11 +9008,10 @@ static unsigned linear_congruential_generator;
void ApiTestFuzzer::Setup(PartOfTest part) { void ApiTestFuzzer::Setup(PartOfTest part) {
linear_congruential_generator = i::FLAG_testing_prng_seed; linear_congruential_generator = i::FLAG_testing_prng_seed;
fuzzing_ = true; fuzzing_ = true;
int start = (part == FIRST_PART) ? 0 : (RegisterThreadedTest::count() >> 1); int count = RegisterThreadedTest::count();
int end = (part == FIRST_PART) int start = count * part / (LAST_PART + 1);
? (RegisterThreadedTest::count() >> 1) int end = (count * (part + 1) / (LAST_PART + 1)) - 1;
: RegisterThreadedTest::count(); active_tests_ = tests_being_run_ = end - start + 1;
active_tests_ = tests_being_run_ = end - start;
for (int i = 0; i < tests_being_run_; i++) { for (int i = 0; i < tests_being_run_; i++) {
RegisterThreadedTest::nth(i)->fuzzer_ = new ApiTestFuzzer( RegisterThreadedTest::nth(i)->fuzzer_ = new ApiTestFuzzer(
i::Isolate::Current(), i + start); i::Isolate::Current(), i + start);
...@@ -9082,6 +9081,17 @@ TEST(Threading2) { ...@@ -9082,6 +9081,17 @@ TEST(Threading2) {
ApiTestFuzzer::TearDown(); ApiTestFuzzer::TearDown();
} }
TEST(Threading3) {
ApiTestFuzzer::Setup(ApiTestFuzzer::THIRD_PART);
ApiTestFuzzer::RunAllTests();
ApiTestFuzzer::TearDown();
}
TEST(Threading4) {
ApiTestFuzzer::Setup(ApiTestFuzzer::FOURTH_PART);
ApiTestFuzzer::RunAllTests();
ApiTestFuzzer::TearDown();
}
void ApiTestFuzzer::CallTest() { void ApiTestFuzzer::CallTest() {
if (kLogThreading) if (kLogThreading)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment