Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(33)

Unified Diff: client/site_tests/desktopui_BrowserTest/desktopui_BrowserTest.py

Issue 661476: Chrome's UI automation tests (browser_test) added as autotest (Closed)
Patch Set: minor fixes Created 10 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « client/site_tests/desktopui_BrowserTest/control ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: client/site_tests/desktopui_BrowserTest/desktopui_BrowserTest.py
diff --git a/client/site_tests/desktopui_BrowserTest/desktopui_BrowserTest.py b/client/site_tests/desktopui_BrowserTest/desktopui_BrowserTest.py
new file mode 100644
index 0000000000000000000000000000000000000000..ea772ae7bf67a41c16edba7afe23bb1cee9a4ccb
--- /dev/null
+++ b/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.')
« no previous file with comments | « client/site_tests/desktopui_BrowserTest/control ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698