summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-10-30 00:21:26 +0000
committerphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-10-30 00:21:26 +0000
commit368e58e6b72a049dd8a3cb2732ed80a5ec0ffec1 (patch)
treec23ccd4628ab33477dc348e2de7e8c212ca9e001
parentda96efc3dd788c27a4f626214861b600aec80870 (diff)
downloadchromium_src-368e58e6b72a049dd8a3cb2732ed80a5ec0ffec1.zip
chromium_src-368e58e6b72a049dd8a3cb2732ed80a5ec0ffec1.tar.gz
chromium_src-368e58e6b72a049dd8a3cb2732ed80a5ec0ffec1.tar.bz2
GTTF: always run perf tests serially
BUG=236893 R=hubbe@chromium.org, jamesr@chromium.org Review URL: https://codereview.chromium.org/47023009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@231680 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--cc/cc_tests.gyp2
-rw-r--r--cc/test/run_all_perftests.cc16
-rw-r--r--chrome/chrome_tests.gypi4
-rw-r--r--chrome/test/base/browser_perf_tests_main.cc11
4 files changed, 30 insertions, 3 deletions
diff --git a/cc/cc_tests.gyp b/cc/cc_tests.gyp
index 54fd81c..6d8ffc92 100644
--- a/cc/cc_tests.gyp
+++ b/cc/cc_tests.gyp
@@ -261,7 +261,7 @@
'resources/worker_pool_perftest.cc',
'test/cc_test_suite.cc',
'test/lap_timer.cc',
- 'test/run_all_unittests.cc',
+ 'test/run_all_perftests.cc',
'trees/layer_tree_host_common_perftest.cc',
'trees/layer_tree_host_perftest.cc',
],
diff --git a/cc/test/run_all_perftests.cc b/cc/test/run_all_perftests.cc
new file mode 100644
index 0000000..abe8549
--- /dev/null
+++ b/cc/test/run_all_perftests.cc
@@ -0,0 +1,16 @@
+// Copyright 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "cc/test/cc_test_suite.h"
+#include "testing/gmock/include/gmock/gmock.h"
+
+int main(int argc, char** argv) {
+ ::testing::InitGoogleMock(&argc, argv);
+ cc::CCTestSuite test_suite(argc, argv);
+
+ // Always run the perf tests serially, to avoid distorting
+ // perf measurements with randomness resulting from running
+ // in parallel.
+ return test_suite.Run();
+}
diff --git a/chrome/chrome_tests.gypi b/chrome/chrome_tests.gypi
index 904898e..afcdad1 100644
--- a/chrome/chrome_tests.gypi
+++ b/chrome/chrome_tests.gypi
@@ -2057,7 +2057,7 @@
'browser/extensions/extension_apitest.cc',
'browser/extensions/extension_browsertest.cc',
'browser/extensions/extension_test_notification_observer.cc',
- 'test/base/browser_tests_main.cc',
+ 'test/base/browser_perf_tests_main.cc',
'test/base/chrome_render_view_test.cc',
'test/base/chrome_render_view_test.h',
'test/perf/browser_perf_test.cc',
@@ -2521,7 +2521,7 @@
'browser/sync/test/integration/sync_test.h',
'browser/sync/test/integration/typed_urls_helper.cc',
'browser/sync/test/integration/typed_urls_helper.h',
- 'test/base/browser_tests_main.cc',
+ 'test/base/browser_perf_tests_main.cc',
'test/data/resource.rc',
],
'conditions': [
diff --git a/chrome/test/base/browser_perf_tests_main.cc b/chrome/test/base/browser_perf_tests_main.cc
new file mode 100644
index 0000000..e9aafbf
--- /dev/null
+++ b/chrome/test/base/browser_perf_tests_main.cc
@@ -0,0 +1,11 @@
+// Copyright 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/test/base/chrome_test_launcher.h"
+
+int main(int argc, char** argv) {
+ // Always run browser perf tests serially - parallel running would be less
+ // deterministic and distort perf measurements.
+ return LaunchChromeTests(1, argc, argv);
+}