Skip to content

Commit

Permalink
GTTF: always run perf tests serially
Browse files Browse the repository at this point in the history
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
  • Loading branch information
phajdan.jr@chromium.org committed Oct 30, 2013
1 parent da96efc commit 368e58e
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cc/cc_tests.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -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',
],
Expand Down
16 changes: 16 additions & 0 deletions cc/test/run_all_perftests.cc
Original file line number Diff line number Diff line change
@@ -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();
}
4 changes: 2 additions & 2 deletions chrome/chrome_tests.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -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': [
Expand Down
11 changes: 11 additions & 0 deletions chrome/test/base/browser_perf_tests_main.cc
Original file line number Diff line number Diff line change
@@ -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);
}

0 comments on commit 368e58e

Please sign in to comment.