summaryrefslogtreecommitdiffstats
path: root/chrome/test/chromeos
diff options
context:
space:
mode:
authorzelidrag@chromium.org <zelidrag@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-26 18:35:37 +0000
committerzelidrag@chromium.org <zelidrag@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-26 18:35:37 +0000
commit2b131972ac332e343d70dcf363f444fe3767e9c9 (patch)
tree02897494271866b0bc31ba9c69f3cac7ab57cc54 /chrome/test/chromeos
parent4e4d604e6d7d7403fb398e7ce1bd258a5896d64d (diff)
downloadchromium_src-2b131972ac332e343d70dcf363f444fe3767e9c9.zip
chromium_src-2b131972ac332e343d70dcf363f444fe3767e9c9.tar.gz
chromium_src-2b131972ac332e343d70dcf363f444fe3767e9c9.tar.bz2
Moved chrome specific autotests to chromium repository to avoid circular dependencies on autotest repo in chromeos builds.
TEST=make sure chrome tests still run in autotest framework on chromeos BUG=none Review URL: http://codereview.chromium.org/3185029 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57556 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/chromeos')
-rw-r--r--chrome/test/chromeos/autotest/files/client/deps/chrome_test/README7
-rwxr-xr-xchrome/test/chromeos/autotest/files/client/deps/chrome_test/chrome_test.py17
-rw-r--r--chrome/test/chromeos/autotest/files/client/deps/chrome_test/common.py12
-rw-r--r--chrome/test/chromeos/autotest/files/client/deps/chrome_test/control5
-rwxr-xr-xchrome/test/chromeos/autotest/files/client/deps/chrome_test/setup_test_links.sh16
-rw-r--r--chrome/test/chromeos/autotest/files/client/site_tests/desktopui_BrowserTest/control20
-rw-r--r--chrome/test/chromeos/autotest/files/client/site_tests/desktopui_BrowserTest/desktopui_BrowserTest.py38
-rw-r--r--chrome/test/chromeos/autotest/files/client/site_tests/desktopui_SyncIntegrationTests/control20
-rw-r--r--chrome/test/chromeos/autotest/files/client/site_tests/desktopui_SyncIntegrationTests/desktopui_SyncIntegrationTests.py39
-rw-r--r--chrome/test/chromeos/autotest/files/client/site_tests/desktopui_UITest/control18
-rw-r--r--chrome/test/chromeos/autotest/files/client/site_tests/desktopui_UITest/desktopui_UITest.py38
11 files changed, 230 insertions, 0 deletions
diff --git a/chrome/test/chromeos/autotest/files/client/deps/chrome_test/README b/chrome/test/chromeos/autotest/files/client/deps/chrome_test/README
new file mode 100644
index 0000000..445211e
--- /dev/null
+++ b/chrome/test/chromeos/autotest/files/client/deps/chrome_test/README
@@ -0,0 +1,7 @@
+# Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+This deps brings install Chrome test files into an image. This includes all
+resource and test servers for HTTP and FTP. Tests that depend
+on chrome_test should add this as a dep in the setup. \ No newline at end of file
diff --git a/chrome/test/chromeos/autotest/files/client/deps/chrome_test/chrome_test.py b/chrome/test/chromeos/autotest/files/client/deps/chrome_test/chrome_test.py
new file mode 100755
index 0000000..752683d
--- /dev/null
+++ b/chrome/test/chromeos/autotest/files/client/deps/chrome_test/chrome_test.py
@@ -0,0 +1,17 @@
+#!/usr/bin/python
+
+# Copyright (c) 2010 The Chromium OS 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 common, commands, logging, os
+from autotest_lib.client.bin import utils
+
+version = 1
+
+def setup(top_dir):
+ return
+
+
+pwd = os.getcwd()
+utils.update_version(pwd + '/src', False, version, setup, None)
diff --git a/chrome/test/chromeos/autotest/files/client/deps/chrome_test/common.py b/chrome/test/chromeos/autotest/files/client/deps/chrome_test/common.py
new file mode 100644
index 0000000..ac26b5d
--- /dev/null
+++ b/chrome/test/chromeos/autotest/files/client/deps/chrome_test/common.py
@@ -0,0 +1,12 @@
+# Copyright (c) 2010 The Chromium OS 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, sys
+dirname = os.path.dirname(sys.modules[__name__].__file__)
+client_dir = os.path.abspath(os.path.join(dirname, "../../"))
+sys.path.insert(0, client_dir)
+import setup_modules
+sys.path.pop(0)
+setup_modules.setup(base_path=client_dir,
+ root_module_name="autotest_lib.client")
diff --git a/chrome/test/chromeos/autotest/files/client/deps/chrome_test/control b/chrome/test/chromeos/autotest/files/client/deps/chrome_test/control
new file mode 100644
index 0000000..865c725
--- /dev/null
+++ b/chrome/test/chromeos/autotest/files/client/deps/chrome_test/control
@@ -0,0 +1,5 @@
+# Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+job.setup_dep(['chrome_test'])
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
new file mode 100755
index 0000000..a938868
--- /dev/null
+++ b/chrome/test/chromeos/autotest/files/client/deps/chrome_test/setup_test_links.sh
@@ -0,0 +1,16 @@
+#!/bin/bash
+#
+# Copyright (c) 2009 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.
+#
+# A script to setup symbolic links needed for Chrome's automated UI tests.
+
+ln -f -s /opt/google/chrome/chrome $(dirname $0)/chrome
+ln -f -s /opt/google/chrome/chrome.pak $(dirname $0)/chrome.pak
+ln -f -s /opt/google/chrome/locales $(dirname $0)/locales
+ln -f -s /opt/google/chrome/resources $(dirname $0)/resources
+
+mkdir -p $(dirname $0)/chromeos
+ln -f -s /opt/google/chrome/chromeos/libcros.so \
+ $(dirname $0)/chromeos/libcros.so
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
new file mode 100644
index 0000000..281a830
--- /dev/null
+++ b/chrome/test/chromeos/autotest/files/client/site_tests/desktopui_BrowserTest/control
@@ -0,0 +1,20 @@
+# Copyright (c) 2010 The Chromium OS 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')
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
new file mode 100644
index 0000000..3f3402b
--- /dev/null
+++ b/chrome/test/chromeos/autotest/files/client/site_tests/desktopui_BrowserTest/desktopui_BrowserTest.py
@@ -0,0 +1,38 @@
+# Copyright (c) 2010 The Chromium OS 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, utils
+from autotest_lib.client.bin import test
+from autotest_lib.client.common_lib import error, site_ui
+
+class desktopui_BrowserTest(test.test):
+ 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)
+
+ 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/control b/chrome/test/chromeos/autotest/files/client/site_tests/desktopui_SyncIntegrationTests/control
new file mode 100644
index 0000000..f45a852
--- /dev/null
+++ b/chrome/test/chromeos/autotest/files/client/site_tests/desktopui_SyncIntegrationTests/control
@@ -0,0 +1,20 @@
+# Copyright (c) 2010 The Chromium OS 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_SyncIntegrationTests"
+PURPOSE = "Verify sync 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 sync_integration_tests.
+"""
+
+job.run_test('desktopui_SyncIntegrationTests')
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
new file mode 100644
index 0000000..5b53dba
--- /dev/null
+++ b/chrome/test/chromeos/autotest/files/client/site_tests/desktopui_SyncIntegrationTests/desktopui_SyncIntegrationTests.py
@@ -0,0 +1,39 @@
+# Copyright (c) 2010 The Chromium OS 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, utils
+from autotest_lib.client.bin import test
+from autotest_lib.client.common_lib import error, site_ui
+
+class desktopui_SyncIntegrationTests(test.test):
+ 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)
+
+ 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/control b/chrome/test/chromeos/autotest/files/client/site_tests/desktopui_UITest/control
new file mode 100644
index 0000000..b76e395
--- /dev/null
+++ b/chrome/test/chromeos/autotest/files/client/site_tests/desktopui_UITest/control
@@ -0,0 +1,18 @@
+# Copyright (c) 2010 The Chromium OS 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')
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
new file mode 100644
index 0000000..fcbb04b
--- /dev/null
+++ b/chrome/test/chromeos/autotest/files/client/site_tests/desktopui_UITest/desktopui_UITest.py
@@ -0,0 +1,38 @@
+# Copyright (c) 2010 The Chromium OS 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, utils
+from autotest_lib.client.bin import test
+from autotest_lib.client.common_lib import error, site_ui
+
+class desktopui_UITest(test.test):
+ 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)
+
+ 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.')