Skip to content

Commit

Permalink
Break out page load test into its own target on Linux.
Browse files Browse the repository at this point in the history
Also, build the reliability_tests target on Linux.

Neither of the new targets have trybots or buildbots yet, however, they do work for me locally.

BUG=19085
Review URL: http://codereview.chromium.org/209022

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26530 0039d316-1c4b-4281-b951-d872f2087c98
  • Loading branch information
estade@chromium.org committed Sep 18, 2009
1 parent e2be3ca commit 767e997
Show file tree
Hide file tree
Showing 3 changed files with 75 additions and 39 deletions.
97 changes: 67 additions & 30 deletions chrome/chrome.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -3897,6 +3897,8 @@
'../tools/xdisplaycheck/xdisplaycheck.gyp:xdisplaycheck',
],
'sources!': [
# We run this test in the linux_page_load_uitest target.
'test/reliability/page_load_test.cc',
# TODO(port)
'browser/login_prompt_uitest.cc',
'test/ui/layout_plugin_uitest.cc',
Expand Down Expand Up @@ -5405,8 +5407,72 @@
}],
],
},
# TODO(port): enable on mac.
{
'target_name': 'reliability_tests',
'type': 'executable',
'msvs_guid': '8A3E1774-1DE9-445C-982D-3EE37C8A752A',
'dependencies': [
'test_support_common',
'test_support_ui',
'theme_resources',
'../skia/skia.gyp:skia',
'../testing/gtest.gyp:gtest',
],
'include_dirs': [
'..',
],
'sources': [
'test/reliability/page_load_test.cc',
'test/reliability/page_load_test.h',
'test/reliability/reliability_test_suite.h',
'test/reliability/run_all_unittests.cc',
],
'conditions': [
['OS=="win"', {
'dependencies': [
'../third_party/tcmalloc/tcmalloc.gyp:tcmalloc',
],
},],
['OS=="linux"', {
'dependencies': [
'../build/linux/system.gyp:gtk',
],
},],
],
},
],
}], # OS!="mac"
},], # OS!="mac"
['OS=="linux"',
{ 'targets': [
{
# The page load tests are separated from the ui tests on Linux
# because we need to
#
# a) Build with breakpad (GYP_DEFINES="linux_chromium_breakpad=1")
# b) Build in release mode only (debug mode generates too large
# of a binary since it includes symbols twice)
# c) Run with CHROME_HEADLESS=1 to generate crash dumps.
'target_name': 'linux_page_load_uitest',
'type': 'executable',
'dependencies': [
'test_support_common',
'test_support_ui',
'theme_resources',
'../build/linux/system.gyp:gtk',
'../skia/skia.gyp:skia',
'../testing/gtest.gyp:gtest',
],
'include_dirs': [
'..',
],
'sources': [
'test/reliability/page_load_test.cc',
'test/reliability/page_load_test.h',
],
},
],
},], # OS=="linux"
['OS!="win"',
{ 'targets': [
{
Expand Down Expand Up @@ -6017,34 +6083,6 @@
},],
],
},
{
'target_name': 'reliability_tests',
'type': 'executable',
'msvs_guid': '8A3E1774-1DE9-445C-982D-3EE37C8A752A',
'dependencies': [
'test_support_common',
'test_support_ui',
'theme_resources',
'../skia/skia.gyp:skia',
'../testing/gtest.gyp:gtest',
],
'include_dirs': [
'..',
],
'sources': [
'test/reliability/page_load_test.cc',
'test/reliability/page_load_test.h',
'test/reliability/reliability_test_suite.h',
'test/reliability/run_all_unittests.cc',
],
'conditions': [
['OS=="win"', {
'dependencies': [
'../third_party/tcmalloc/tcmalloc.gyp:tcmalloc',
],
},],
],
},
{
'target_name': 'security_tests',
'type': 'shared_library',
Expand Down Expand Up @@ -6340,7 +6378,6 @@
}],
],
},

{
'target_name': 'sync_unit_tests',
'type': 'executable',
Expand Down
9 changes: 1 addition & 8 deletions chrome/test/reliability/page_load_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,6 @@
#include "chrome/test/reliability/page_load_test.h"
#include "net/base/net_util.h"

#if defined(OS_WIN)
#define MAYBE_Reliability Reliability
#else // defined(OS_WIN)
// TODO(estade): port till we can enable this.
#define MAYBE_Reliability DISABLED_Reliability
#endif // !defined(OS_WIN)

namespace {

// See comments at the beginning of the file for the definition of switches.
Expand Down Expand Up @@ -600,7 +593,7 @@ class PageLoadTest : public UITest {

} // namespace

TEST_F(PageLoadTest, MAYBE_Reliability) {
TEST_F(PageLoadTest, Reliability) {
std::ofstream log_file;

if (!g_log_file_path.empty()) {
Expand Down
8 changes: 7 additions & 1 deletion chrome/test/ui/ui_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,16 @@ static const int kMaxTestExecutionTime = 30000;
static const int kWaitForTerminateMsec = 30000;

const wchar_t UITest::kFailedNoCrashService[] =
#if defined(OS_WIN)
L"NOTE: This test is expected to fail if crash_service.exe is not "
L"running. Start it manually before running this test (see the build "
L"output directory).";
#elif defined(OS_LINUX)
L"NOTE: This test is expected to fail if breakpad is not built in "
L"or if chromium is not running headless (try CHROME_HEADLESS=1).";
#else
L"NOTE: Crash service not ported to this platform!";
#endif
bool UITest::in_process_renderer_ = false;
bool UITest::no_sandbox_ = false;
bool UITest::full_memory_dump_ = false;
Expand All @@ -63,7 +70,6 @@ int UITest::timeout_ms_ = 20 * 60 * 1000;
std::wstring UITest::js_flags_ = L"";
std::wstring UITest::log_level_ = L"";


// Specify the time (in milliseconds) that the ui_tests should wait before
// timing out. This is used to specify longer timeouts when running under Purify
// which requires much more time.
Expand Down

0 comments on commit 767e997

Please sign in to comment.