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

Side by Side Diff: base/test/test_timeouts.cc

Issue 862133002: Update from https://crrev.com/312398 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/test/test_timeouts.h" 5 #include "base/test/test_timeouts.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/debug/debugger.h" 10 #include "base/debug/debugger.h"
11 #include "base/logging.h" 11 #include "base/logging.h"
12 #include "base/strings/string_number_conversions.h" 12 #include "base/strings/string_number_conversions.h"
13 #include "base/test/test_switches.h" 13 #include "base/test/test_switches.h"
14 14
15 namespace { 15 namespace {
16 16
17 // ASan/TSan/MSan instrument each memory access. This may slow the execution 17 // ASan/TSan/MSan instrument each memory access. This may slow the execution
18 // down significantly. 18 // down significantly.
19 #if defined(MEMORY_SANITIZER) 19 #if defined(MEMORY_SANITIZER)
20 // For MSan the slowdown depends heavily on the value of msan_track_origins GYP 20 // For MSan the slowdown depends heavily on the value of msan_track_origins GYP
21 // flag. The multiplier below corresponds to msan_track_origins=1. 21 // flag. The multiplier below corresponds to msan_track_origins=1.
22 static const int kTimeoutMultiplier = 6; 22 static const int kTimeoutMultiplier = 6;
23 #elif defined(ADDRESS_SANITIZER) && defined(OS_WIN) 23 #elif defined(ADDRESS_SANITIZER) && defined(OS_WIN)
24 // Asan/Win has not been optimized yet, give it a higher 24 // Asan/Win has not been optimized yet, give it a higher
25 // timeout multiplier. See http://crbug.com/412471 25 // timeout multiplier. See http://crbug.com/412471
26 static const int kTimeoutMultiplier = 8; 26 static const int kTimeoutMultiplier = 3;
27 #elif defined(ADDRESS_SANITIZER) || defined(THREAD_SANITIZER) || \ 27 #elif defined(ADDRESS_SANITIZER) || defined(THREAD_SANITIZER) || \
28 defined(SYZYASAN) 28 defined(SYZYASAN)
29 static const int kTimeoutMultiplier = 2; 29 static const int kTimeoutMultiplier = 2;
30 #else 30 #else
31 static const int kTimeoutMultiplier = 1; 31 static const int kTimeoutMultiplier = 1;
32 #endif 32 #endif
33 33
34 const int kAlmostInfiniteTimeoutMs = 100000000; 34 const int kAlmostInfiniteTimeoutMs = 100000000;
35 35
36 // Sets value to the greatest of: 36 // Sets value to the greatest of:
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 // Test launcher timeout is independent from anything above action timeout. 104 // Test launcher timeout is independent from anything above action timeout.
105 InitializeTimeout(switches::kTestLauncherTimeout, action_timeout_ms_, 105 InitializeTimeout(switches::kTestLauncherTimeout, action_timeout_ms_,
106 &test_launcher_timeout_ms_); 106 &test_launcher_timeout_ms_);
107 107
108 // The timeout values should be increasing in the right order. 108 // The timeout values should be increasing in the right order.
109 CHECK(tiny_timeout_ms_ <= action_timeout_ms_); 109 CHECK(tiny_timeout_ms_ <= action_timeout_ms_);
110 CHECK(action_timeout_ms_ <= action_max_timeout_ms_); 110 CHECK(action_timeout_ms_ <= action_max_timeout_ms_);
111 111
112 CHECK(action_timeout_ms_ <= test_launcher_timeout_ms_); 112 CHECK(action_timeout_ms_ <= test_launcher_timeout_ms_);
113 } 113 }
OLDNEW
« no previous file with comments | « base/test/test_switches.cc ('k') | base/time/time.h » ('j') | shell/BUILD.gn » ('J')

Powered by Google App Engine
This is Rietveld 408576698