summaryrefslogtreecommitdiffstats
path: root/chrome/test
diff options
context:
space:
mode:
authorcmasone@chromium.org <cmasone@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-15 20:53:53 +0000
committercmasone@chromium.org <cmasone@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-15 20:53:53 +0000
commit8d8f11d7abee837d6fd15ba9c7d87efdca5d4707 (patch)
tree8da1748a48ce049c55b3a2cf18f649798628a7a1 /chrome/test
parentf8d01a8fe66f490e705dd563de3650dab206abc6 (diff)
downloadchromium_src-8d8f11d7abee837d6fd15ba9c7d87efdca5d4707.zip
chromium_src-8d8f11d7abee837d6fd15ba9c7d87efdca5d4707.tar.gz
chromium_src-8d8f11d7abee837d6fd15ba9c7d87efdca5d4707.tar.bz2
[Chrome OS] Cleanup and modify Chrome-for-ChromeOS autotest wrappers
Some deps in the chrome tree and support classes on the Chrome OS side have changed, so update our autotest wrappers to work again. The new code also takes advantage of some new features in the ChromeTestBase class. I've also split the control files to each run 1/4 of the browser tests and ui tests. I tried to come up with a way to divide them more cleanly, but this seems the best way to split them across multiple VMs with the infrastructure on the bots. If we used autoserv to run smoke suite, we could be more clever here, but that's a big hammer for this problem. BUG=chromium-os:8544 TEST=install chrome with tests, then run desktopui_BrowserTest and friends. They should be able to run, though not necessarily succeed. Review URL: http://codereview.chromium.org/4698004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@66168 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test')
-rwxr-xr-x[-rw-r--r--]chrome/test/chromeos/autotest/files/client/deps/chrome_test/setup_test_links.sh0
-rw-r--r--chrome/test/chromeos/autotest/files/client/site_tests/desktopui_BrowserTest/control5
-rw-r--r--chrome/test/chromeos/autotest/files/client/site_tests/desktopui_BrowserTest/control.one21
-rw-r--r--chrome/test/chromeos/autotest/files/client/site_tests/desktopui_BrowserTest/control.three21
-rw-r--r--chrome/test/chromeos/autotest/files/client/site_tests/desktopui_BrowserTest/control.two21
-rw-r--r--chrome/test/chromeos/autotest/files/client/site_tests/desktopui_BrowserTest/desktopui_BrowserTest.py12
-rw-r--r--chrome/test/chromeos/autotest/files/client/site_tests/desktopui_PyAutoFunctionalTests/control2
-rw-r--r--chrome/test/chromeos/autotest/files/client/site_tests/desktopui_PyAutoFunctionalTests/desktopui_PyAutoFunctionalTests.py43
-rw-r--r--chrome/test/chromeos/autotest/files/client/site_tests/desktopui_SyncIntegrationTests/control2
-rw-r--r--chrome/test/chromeos/autotest/files/client/site_tests/desktopui_SyncIntegrationTests/desktopui_SyncIntegrationTests.py8
-rw-r--r--chrome/test/chromeos/autotest/files/client/site_tests/desktopui_UITest/control2
-rw-r--r--chrome/test/chromeos/autotest/files/client/site_tests/desktopui_UITest/control.one18
-rw-r--r--chrome/test/chromeos/autotest/files/client/site_tests/desktopui_UITest/control.three18
-rw-r--r--chrome/test/chromeos/autotest/files/client/site_tests/desktopui_UITest/control.two18
-rw-r--r--chrome/test/chromeos/autotest/files/client/site_tests/desktopui_UITest/desktopui_UITest.py12
15 files changed, 148 insertions, 55 deletions
diff --git a/chrome/test/chromeos/autotest/files/client/deps/chrome_test/setup_test_links.sh b/chrome/test/chromeos/autotest/files/client/deps/chrome_test/setup_test_links.sh
index a938868..a938868 100644..100755
--- a/chrome/test/chromeos/autotest/files/client/deps/chrome_test/setup_test_links.sh
+++ b/chrome/test/chromeos/autotest/files/client/deps/chrome_test/setup_test_links.sh
diff --git a/chrome/test/chromeos/autotest/files/client/site_tests/desktopui_BrowserTest/control b/chrome/test/chromeos/autotest/files/client/site_tests/desktopui_BrowserTest/control
index 281a830..06f3d87 100644
--- a/chrome/test/chromeos/autotest/files/client/site_tests/desktopui_BrowserTest/control
+++ b/chrome/test/chromeos/autotest/files/client/site_tests/desktopui_BrowserTest/control
@@ -1,4 +1,4 @@
-# Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
+# Copyright (c) 2010 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.
@@ -17,4 +17,5 @@ DOC = """
This is a wrapper test for Chrome browser_test.
"""
-job.run_test('desktopui_BrowserTest')
+job.run_test('desktopui_BrowserTest', group=0, total_groups=4)
+
diff --git a/chrome/test/chromeos/autotest/files/client/site_tests/desktopui_BrowserTest/control.one b/chrome/test/chromeos/autotest/files/client/site_tests/desktopui_BrowserTest/control.one
new file mode 100644
index 0000000..af3b0c3
--- /dev/null
+++ b/chrome/test/chromeos/autotest/files/client/site_tests/desktopui_BrowserTest/control.one
@@ -0,0 +1,21 @@
+# Copyright (c) 2010 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.
+
+AUTHOR = "Chrome OS Team"
+NAME = "desktopui_BrowserTest"
+PURPOSE = "Verify basic browsing capability of Chrome."
+CRITERIA = """
+This test will fail if any of the commands chrome executes returns an error.
+"""
+TIME = "LONG"
+TEST_CATEGORY = "Functional"
+TEST_CLASS = "desktopui"
+TEST_TYPE = "client"
+
+DOC = """
+This is a wrapper test for Chrome browser_test.
+"""
+
+job.run_test('desktopui_BrowserTest', group=1, total_groups=4)
+
diff --git a/chrome/test/chromeos/autotest/files/client/site_tests/desktopui_BrowserTest/control.three b/chrome/test/chromeos/autotest/files/client/site_tests/desktopui_BrowserTest/control.three
new file mode 100644
index 0000000..0f67e5a
--- /dev/null
+++ b/chrome/test/chromeos/autotest/files/client/site_tests/desktopui_BrowserTest/control.three
@@ -0,0 +1,21 @@
+# Copyright (c) 2010 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.
+
+AUTHOR = "Chrome OS Team"
+NAME = "desktopui_BrowserTest"
+PURPOSE = "Verify basic browsing capability of Chrome."
+CRITERIA = """
+This test will fail if any of the commands chrome executes returns an error.
+"""
+TIME = "LONG"
+TEST_CATEGORY = "Functional"
+TEST_CLASS = "desktopui"
+TEST_TYPE = "client"
+
+DOC = """
+This is a wrapper test for Chrome browser_test.
+"""
+
+job.run_test('desktopui_BrowserTest', group=3, total_groups=4)
+
diff --git a/chrome/test/chromeos/autotest/files/client/site_tests/desktopui_BrowserTest/control.two b/chrome/test/chromeos/autotest/files/client/site_tests/desktopui_BrowserTest/control.two
new file mode 100644
index 0000000..8f067a56
--- /dev/null
+++ b/chrome/test/chromeos/autotest/files/client/site_tests/desktopui_BrowserTest/control.two
@@ -0,0 +1,21 @@
+# Copyright (c) 2010 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.
+
+AUTHOR = "Chrome OS Team"
+NAME = "desktopui_BrowserTest"
+PURPOSE = "Verify basic browsing capability of Chrome."
+CRITERIA = """
+This test will fail if any of the commands chrome executes returns an error.
+"""
+TIME = "LONG"
+TEST_CATEGORY = "Functional"
+TEST_CLASS = "desktopui"
+TEST_TYPE = "client"
+
+DOC = """
+This is a wrapper test for Chrome browser_test.
+"""
+
+job.run_test('desktopui_BrowserTest', group=2, total_groups=4)
+
diff --git a/chrome/test/chromeos/autotest/files/client/site_tests/desktopui_BrowserTest/desktopui_BrowserTest.py b/chrome/test/chromeos/autotest/files/client/site_tests/desktopui_BrowserTest/desktopui_BrowserTest.py
index ef1d3bd..38aafc7 100644
--- a/chrome/test/chromeos/autotest/files/client/site_tests/desktopui_BrowserTest/desktopui_BrowserTest.py
+++ b/chrome/test/chromeos/autotest/files/client/site_tests/desktopui_BrowserTest/desktopui_BrowserTest.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
+# Copyright (c) 2010 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.
@@ -7,6 +7,12 @@ from autotest_lib.client.bin import site_chrome_test
class desktopui_BrowserTest(site_chrome_test.ChromeTestBase):
version = 1
- def run_once(self):
- self.run_chrome_test('browser_tests', '')
+ binary_to_run='browser_tests'
+ blacklist = []
+ def run_once(self, group=0, total_groups=4):
+ tests_to_run = self.filter_bad_tests(
+ self.generate_test_list(self.binary_to_run, group, total_groups))
+ tests_to_run.extend(map(lambda(x): '-'+x, self.blacklist))
+ self.run_chrome_test(self.binary_to_run,
+ '--gtest_filter=%s' % ':'.join(tests_to_run))
diff --git a/chrome/test/chromeos/autotest/files/client/site_tests/desktopui_PyAutoFunctionalTests/control b/chrome/test/chromeos/autotest/files/client/site_tests/desktopui_PyAutoFunctionalTests/control
index 30eb89a..ac7ef4d 100644
--- a/chrome/test/chromeos/autotest/files/client/site_tests/desktopui_PyAutoFunctionalTests/control
+++ b/chrome/test/chromeos/autotest/files/client/site_tests/desktopui_PyAutoFunctionalTests/control
@@ -1,4 +1,4 @@
-# Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
+# Copyright (c) 2010 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.
diff --git a/chrome/test/chromeos/autotest/files/client/site_tests/desktopui_PyAutoFunctionalTests/desktopui_PyAutoFunctionalTests.py b/chrome/test/chromeos/autotest/files/client/site_tests/desktopui_PyAutoFunctionalTests/desktopui_PyAutoFunctionalTests.py
index 8cf66a8..2cba5f1 100644
--- a/chrome/test/chromeos/autotest/files/client/site_tests/desktopui_PyAutoFunctionalTests/desktopui_PyAutoFunctionalTests.py
+++ b/chrome/test/chromeos/autotest/files/client/site_tests/desktopui_PyAutoFunctionalTests/desktopui_PyAutoFunctionalTests.py
@@ -1,47 +1,14 @@
-# Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
+# Copyright (c) 2010 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.
-import logging, os, shutil, tempfile, utils
-from autotest_lib.client.bin import test
-from autotest_lib.client.common_lib import error, site_ui
+from autotest_lib.client.bin import site_chrome_test
-
-class desktopui_PyAutoFunctionalTests(test.test):
+class desktopui_PyAutoFunctionalTests(site_chrome_test.ChromeTestBase):
"""Wrapper for running Chrome's PyAuto-based functional tests."""
version = 1
- home_dir = None
-
- def setup(self):
- self.job.setup_dep(['chrome_test']) # to package chrome/test/data
def run_once(self):
- dep = 'chrome_test'
- dep_dir = os.path.join(self.autodir, 'deps', dep)
- self.job.install_pkg(dep, 'dep', dep_dir)
-
- cr_source_dir = '%s/test_src' % dep_dir
- test_binary_dir = '%s/test_src/out/Release' % dep_dir
pyauto_script = '%s/test_src/chrome/test/functional/' \
- 'pyauto_functional.py' % dep_dir
- self.home_dir = tempfile.mkdtemp()
-
- try:
- setup_cmd = '%s/%s' % (test_binary_dir,
- 'setup_test_links.sh')
- utils.system(setup_cmd)
-
- cmd = 'python %s' % pyauto_script
- cmd = 'HOME=%s CR_SOURCE_ROOT=%s %s' % (self.home_dir,
- cr_source_dir,
- site_ui.xcommand_as(cmd))
- logging.info("Running %s" % cmd)
- utils.system(cmd)
- except error.CmdError, e:
- logging.debug(e)
- raise error.TestFail('%s failed!' % pyauto_script)
-
- def cleanup(self):
- if self.home_dir:
- shutil.rmtree(self.home_dir, ignore_errors=True)
- test.test.cleanup(self)
+ 'pyauto_functional.py' % self.dep_dir
+ self.run_chrome_test(pyauto_script)
diff --git a/chrome/test/chromeos/autotest/files/client/site_tests/desktopui_SyncIntegrationTests/control b/chrome/test/chromeos/autotest/files/client/site_tests/desktopui_SyncIntegrationTests/control
index f45a852..adf7cec 100644
--- a/chrome/test/chromeos/autotest/files/client/site_tests/desktopui_SyncIntegrationTests/control
+++ b/chrome/test/chromeos/autotest/files/client/site_tests/desktopui_SyncIntegrationTests/control
@@ -1,4 +1,4 @@
-# Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
+# Copyright (c) 2010 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.
diff --git a/chrome/test/chromeos/autotest/files/client/site_tests/desktopui_SyncIntegrationTests/desktopui_SyncIntegrationTests.py b/chrome/test/chromeos/autotest/files/client/site_tests/desktopui_SyncIntegrationTests/desktopui_SyncIntegrationTests.py
index 430c71f..e82252b 100644
--- a/chrome/test/chromeos/autotest/files/client/site_tests/desktopui_SyncIntegrationTests/desktopui_SyncIntegrationTests.py
+++ b/chrome/test/chromeos/autotest/files/client/site_tests/desktopui_SyncIntegrationTests/desktopui_SyncIntegrationTests.py
@@ -1,19 +1,15 @@
-# Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
+# Copyright (c) 2010 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.
-import os
from autotest_lib.client.bin import site_chrome_test
class desktopui_SyncIntegrationTests(site_chrome_test.ChromeTestBase):
version = 1
def run_once(self):
- dep = 'chrome_test'
- dep_dir = os.path.join(self.autodir, 'deps', dep)
- password_file = '%s/sync_password.txt' % dep_dir
+ password_file = '%s/sync_password.txt' % self.dep_dir
self.run_chrome_test('sync_integration_tests',
('--password-file-for-test=%s ' +
'--test-terminate-timeout=300000') % password_file)
-
diff --git a/chrome/test/chromeos/autotest/files/client/site_tests/desktopui_UITest/control b/chrome/test/chromeos/autotest/files/client/site_tests/desktopui_UITest/control
index b76e395..8089b4a 100644
--- a/chrome/test/chromeos/autotest/files/client/site_tests/desktopui_UITest/control
+++ b/chrome/test/chromeos/autotest/files/client/site_tests/desktopui_UITest/control
@@ -1,4 +1,4 @@
-# Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
+# Copyright (c) 2010 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.
diff --git a/chrome/test/chromeos/autotest/files/client/site_tests/desktopui_UITest/control.one b/chrome/test/chromeos/autotest/files/client/site_tests/desktopui_UITest/control.one
new file mode 100644
index 0000000..e68061f
--- /dev/null
+++ b/chrome/test/chromeos/autotest/files/client/site_tests/desktopui_UITest/control.one
@@ -0,0 +1,18 @@
+# Copyright (c) 2010 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.
+
+AUTHOR = "Chrome OS Team"
+NAME = "desktopui_UITest"
+PURPOSE = "Verify Chrome executes and renders basic pages."
+CRITERIA = "This test will fail if running Chrome returns a command error."
+TIME = "LONG"
+TEST_CATEGORY = "Functional"
+TEST_CLASS = "desktopui"
+TEST_TYPE = "client"
+
+DOC = """
+This is a wrapper test for Chrome ui_tests
+"""
+
+job.run_test('desktopui_UITest', group=1, total_groups=4)
diff --git a/chrome/test/chromeos/autotest/files/client/site_tests/desktopui_UITest/control.three b/chrome/test/chromeos/autotest/files/client/site_tests/desktopui_UITest/control.three
new file mode 100644
index 0000000..7744403
--- /dev/null
+++ b/chrome/test/chromeos/autotest/files/client/site_tests/desktopui_UITest/control.three
@@ -0,0 +1,18 @@
+# Copyright (c) 2010 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.
+
+AUTHOR = "Chrome OS Team"
+NAME = "desktopui_UITest"
+PURPOSE = "Verify Chrome executes and renders basic pages."
+CRITERIA = "This test will fail if running Chrome returns a command error."
+TIME = "LONG"
+TEST_CATEGORY = "Functional"
+TEST_CLASS = "desktopui"
+TEST_TYPE = "client"
+
+DOC = """
+This is a wrapper test for Chrome ui_tests
+"""
+
+job.run_test('desktopui_UITest', group=3, total_groups=4)
diff --git a/chrome/test/chromeos/autotest/files/client/site_tests/desktopui_UITest/control.two b/chrome/test/chromeos/autotest/files/client/site_tests/desktopui_UITest/control.two
new file mode 100644
index 0000000..815b541
--- /dev/null
+++ b/chrome/test/chromeos/autotest/files/client/site_tests/desktopui_UITest/control.two
@@ -0,0 +1,18 @@
+# Copyright (c) 2010 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.
+
+AUTHOR = "Chrome OS Team"
+NAME = "desktopui_UITest"
+PURPOSE = "Verify Chrome executes and renders basic pages."
+CRITERIA = "This test will fail if running Chrome returns a command error."
+TIME = "LONG"
+TEST_CATEGORY = "Functional"
+TEST_CLASS = "desktopui"
+TEST_TYPE = "client"
+
+DOC = """
+This is a wrapper test for Chrome ui_tests
+"""
+
+job.run_test('desktopui_UITest', group=2, total_groups=4)
diff --git a/chrome/test/chromeos/autotest/files/client/site_tests/desktopui_UITest/desktopui_UITest.py b/chrome/test/chromeos/autotest/files/client/site_tests/desktopui_UITest/desktopui_UITest.py
index 2f4e056..5d88fde 100644
--- a/chrome/test/chromeos/autotest/files/client/site_tests/desktopui_UITest/desktopui_UITest.py
+++ b/chrome/test/chromeos/autotest/files/client/site_tests/desktopui_UITest/desktopui_UITest.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
+# Copyright (c) 2010 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.
@@ -7,6 +7,12 @@ from autotest_lib.client.bin import site_chrome_test
class desktopui_UITest(site_chrome_test.ChromeTestBase):
version = 1
- def run_once(self):
- self.run_test('ui_tests', '')
+ binary_to_run='ui_tests'
+ blacklist = []
+ def run_once(self, group=0, total_groups=4):
+ tests_to_run = self.filter_bad_tests(
+ self.generate_test_list(self.binary_to_run, group, total_groups))
+ tests_to_run.extend(map(lambda(x): '-'+x, self.blacklist))
+ self.run_chrome_test(self.binary_to_run,
+ '--gtest_filter=%s' % ':'.join(tests_to_run))