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

Side by Side Diff: base/shared_memory_unittest.cc

Issue 4228003: Mark SharedMemoryProcessTest.Tasks as flaky on Mac. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 10 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/basictypes.h" 5 #include "base/basictypes.h"
6 #include "base/mac/scoped_nsautorelease_pool.h" 6 #include "base/mac/scoped_nsautorelease_pool.h"
7 #include "base/platform_thread.h" 7 #include "base/platform_thread.h"
8 #include "base/shared_memory.h" 8 #include "base/shared_memory.h"
9 #include "base/scoped_ptr.h" 9 #include "base/scoped_ptr.h"
10 #include "base/test/multiprocess_test.h" 10 #include "base/test/multiprocess_test.h"
(...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after
364 return errors; 364 return errors;
365 } 365 }
366 366
367 private: 367 private:
368 static const char* const s_test_name_; 368 static const char* const s_test_name_;
369 }; 369 };
370 370
371 const char* const SharedMemoryProcessTest::s_test_name_ = "MPMem"; 371 const char* const SharedMemoryProcessTest::s_test_name_ = "MPMem";
372 372
373 373
374 TEST_F(SharedMemoryProcessTest, Tasks) { 374 #if defined(OS_MACOSX)
375 #define MAYBE_Tasks FLAKY_Tasks
376 #else
377 #define MAYBE_Tasks Tasks
378 #endif
379
380 TEST_F(SharedMemoryProcessTest, MAYBE_Tasks) {
375 SharedMemoryProcessTest::CleanUp(); 381 SharedMemoryProcessTest::CleanUp();
376 382
377 base::ProcessHandle handles[kNumTasks]; 383 base::ProcessHandle handles[kNumTasks];
378 for (int index = 0; index < kNumTasks; ++index) { 384 for (int index = 0; index < kNumTasks; ++index) {
379 handles[index] = SpawnChild("SharedMemoryTestMain", false); 385 handles[index] = SpawnChild("SharedMemoryTestMain", false);
380 } 386 }
381 387
382 int exit_code = 0; 388 int exit_code = 0;
383 for (int index = 0; index < kNumTasks; ++index) { 389 for (int index = 0; index < kNumTasks; ++index) {
384 EXPECT_TRUE(base::WaitForExitCode(handles[index], &exit_code)); 390 EXPECT_TRUE(base::WaitForExitCode(handles[index], &exit_code));
385 EXPECT_TRUE(exit_code == 0); 391 EXPECT_TRUE(exit_code == 0);
386 } 392 }
387 393
388 SharedMemoryProcessTest::CleanUp(); 394 SharedMemoryProcessTest::CleanUp();
389 } 395 }
390 396
391 MULTIPROCESS_TEST_MAIN(SharedMemoryTestMain) { 397 MULTIPROCESS_TEST_MAIN(SharedMemoryTestMain) {
392 return SharedMemoryProcessTest::TaskTestMain(); 398 return SharedMemoryProcessTest::TaskTestMain();
393 } 399 }
394 400
395 } // namespace base 401 } // namespace base
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698