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

Unified Diff: test/cctest/test-api.cc

Issue 6929063: Split threaded cctests into four parts (instead of 2) (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 9 years, 7 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 | « test/cctest/cctest.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-api.cc
===================================================================
--- test/cctest/test-api.cc (revision 7793)
+++ test/cctest/test-api.cc (working copy)
@@ -9007,11 +9007,10 @@
void ApiTestFuzzer::Setup(PartOfTest part) {
linear_congruential_generator = i::FLAG_testing_prng_seed;
fuzzing_ = true;
- int start = (part == FIRST_PART) ? 0 : (RegisterThreadedTest::count() >> 1);
- int end = (part == FIRST_PART)
- ? (RegisterThreadedTest::count() >> 1)
- : RegisterThreadedTest::count();
- active_tests_ = tests_being_run_ = end - start;
+ int count = RegisterThreadedTest::count();
+ int start = count * part / (LAST_PART + 1);
+ int end = (count * (part + 1) / (LAST_PART + 1)) - 1;
+ active_tests_ = tests_being_run_ = end - start + 1;
for (int i = 0; i < tests_being_run_; i++) {
RegisterThreadedTest::nth(i)->fuzzer_ = new ApiTestFuzzer(
i::Isolate::Current(), i + start);
@@ -9081,7 +9080,18 @@
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() {
if (kLogThreading)
printf("Start test %d\n", test_number_);
« no previous file with comments | « test/cctest/cctest.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698