summaryrefslogtreecommitdiffstats
path: root/chrome/test
diff options
context:
space:
mode:
authorzelidrag@chromium.org <zelidrag@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-16 00:25:17 +0000
committerzelidrag@chromium.org <zelidrag@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-16 00:25:17 +0000
commitf3c713000ecf4057ceef9a62202cabd7dab14550 (patch)
treef47f98f4a7c8ea316c4ce25ff5af027b0a090e80 /chrome/test
parent9892b477aaf5bc739bc1a896052266ad13c79ac0 (diff)
downloadchromium_src-f3c713000ecf4057ceef9a62202cabd7dab14550.zip
chromium_src-f3c713000ecf4057ceef9a62202cabd7dab14550.tar.gz
chromium_src-f3c713000ecf4057ceef9a62202cabd7dab14550.tar.bz2
Simplified chrome-specific ChromeOS autotest by introducing a common wrapper class.
TEST=none BUG=none Review URL: http://codereview.chromium.org/3408006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59590 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test')
-rw-r--r--chrome/test/chromeos/autotest/files/client/site_tests/desktopui_BrowserTest/desktopui_BrowserTest.py32
-rw-r--r--chrome/test/chromeos/autotest/files/client/site_tests/desktopui_SyncIntegrationTests/desktopui_SyncIntegrationTests.py32
-rw-r--r--chrome/test/chromeos/autotest/files/client/site_tests/desktopui_UITest/desktopui_UITest.py32
3 files changed, 12 insertions, 84 deletions
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 3f3402b..ef1d3bd 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
@@ -2,37 +2,11 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
-import logging, os, 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_BrowserTest(test.test):
+class desktopui_BrowserTest(site_chrome_test.ChromeTestBase):
version = 1
- def setup(self):
- self.job.setup_dep(['chrome_test'])
- # create a empty srcdir to prevent the error that checks .version file
- if not os.path.exists(self.srcdir):
- os.mkdir(self.srcdir)
-
-
def run_once(self):
- dep = 'chrome_test'
- dep_dir = os.path.join(self.autodir, 'deps', dep)
- self.job.install_pkg(dep, 'dep', dep_dir)
-
- chrome_dir = '/opt/google/chrome'
- test_binary_dir = '%s/test_src/out/Release' % dep_dir
-
- try:
- setup_cmd = '%s/%s' % (test_binary_dir,
- 'setup_test_links.sh')
- utils.system(setup_cmd)
+ self.run_chrome_test('browser_tests', '')
- cmd = '%s/%s' % (test_binary_dir, 'browser_tests')
- cmd = site_ui.xcommand(cmd)
- logging.info("Running %s" % cmd)
- utils.system(cmd)
- except error.CmdError, e:
- logging.debug(e)
- raise error.TestFail('browser_test failed.')
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 5b53dba..430c71f 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
@@ -2,38 +2,18 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
-import logging, os, utils
-from autotest_lib.client.bin import test
-from autotest_lib.client.common_lib import error, site_ui
+import os
+from autotest_lib.client.bin import site_chrome_test
-class desktopui_SyncIntegrationTests(test.test):
+class desktopui_SyncIntegrationTests(site_chrome_test.ChromeTestBase):
version = 1
- def setup(self):
- self.job.setup_dep(['chrome_test'])
- # create a empty srcdir to prevent the error that checks .version file
- if not os.path.exists(self.srcdir):
- os.mkdir(self.srcdir)
-
-
def run_once(self):
dep = 'chrome_test'
dep_dir = os.path.join(self.autodir, 'deps', dep)
- self.job.install_pkg(dep, 'dep', dep_dir)
-
- chrome_dir = '/opt/google/chrome'
- test_binary_dir = '%s/test_src/out/Release' % dep_dir
password_file = '%s/sync_password.txt' % dep_dir
- try:
- setup_cmd = '%s/%s' % (test_binary_dir,
- 'setup_test_links.sh')
- utils.system(setup_cmd)
+ self.run_chrome_test('sync_integration_tests',
+ ('--password-file-for-test=%s ' +
+ '--test-terminate-timeout=300000') % password_file)
- cmd = '%s/sync_integration_tests --password-file-for-test=%s --test-terminate-timeout=300000' % (test_binary_dir, password_file)
- cmd = site_ui.xcommand(cmd)
- logging.info("Running %s" % cmd)
- utils.system(cmd)
- except error.CmdError, e:
- logging.debug(e)
- raise error.TestFail('sync_integration_tests failed.')
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 fcbb04b..2f4e056 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
@@ -2,37 +2,11 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
-import logging, os, 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_UITest(test.test):
+class desktopui_UITest(site_chrome_test.ChromeTestBase):
version = 1
- def setup(self):
- self.job.setup_dep(['chrome_test'])
- # create a empty srcdir to prevent the error that checks .version file
- if not os.path.exists(self.srcdir):
- os.mkdir(self.srcdir)
-
-
def run_once(self):
- dep = 'chrome_test'
- dep_dir = os.path.join(self.autodir, 'deps', dep)
- self.job.install_pkg(dep, 'dep', dep_dir)
-
- chrome_dir = '/opt/google/chrome'
- test_binary_dir = '%s/test_src/out/Release' % dep_dir
-
- try:
- setup_cmd = '%s/%s' % (test_binary_dir,
- 'setup_test_links.sh')
- utils.system(setup_cmd)
+ self.run_test('ui_tests', '')
- cmd = '%s/%s' % (test_binary_dir, 'ui_tests')
- cmd = site_ui.xcommand(cmd)
- logging.info("Running %s" % cmd)
- utils.system(cmd)
- except error.CmdError, e:
- logging.debug(e)
- raise error.TestFail('browser_test failed.')