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

Unified Diff: frog/scripts/buildbot_annotated_steps.py

Issue 9188012: bots: include webdriver tests in bots. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: '' Created 8 years, 11 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/tests/client/client.status ('k') | frog/tests/frog/frog.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: frog/scripts/buildbot_annotated_steps.py
diff --git a/frog/scripts/buildbot_annotated_steps.py b/frog/scripts/buildbot_annotated_steps.py
index 3c39e63d88b2e1ada798b1581c43c57072272469..5d22266471538014aa8a926d3cebf956646766ba 100644
--- a/frog/scripts/buildbot_annotated_steps.py
+++ b/frog/scripts/buildbot_annotated_steps.py
@@ -18,25 +18,28 @@ BUILDER_NAME = 'BUILDBOT_BUILDERNAME'
FROG_PATH = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
-BUILDER_PATTERN = r'(frog|frogsh|frogium)-linux-(debug|release)'
+BUILDER_PATTERN = r'(frog|frogsh|frogium)-(linux|mac|windows)-(debug|release)'
NO_COLOR_ENV = dict(os.environ)
NO_COLOR_ENV['TERM'] = 'nocolor'
def GetBuildInfo():
- """Returns a tuple (name, mode) where:
+ """Returns a tuple (name, mode, system) where:
- name: 'frog', 'frogsh', or None when the builder has an incorrect name
- mode: 'debug' or 'release'
+ - system: 'linux', 'mac', or 'windows'
"""
name = None
mode = None
+ system = None
builder_name = os.environ.get(BUILDER_NAME)
if builder_name:
pattern = re.match(BUILDER_PATTERN, builder_name)
if pattern:
name = pattern.group(1)
- mode = pattern.group(2)
- return (name, mode)
+ system = pattern.group(2)
+ mode = pattern.group(3)
+ return (name, mode, system)
# TODO(sigmund): delete this convertion when test.py uses the same
# configuration we do here.
@@ -46,13 +49,13 @@ def ConvertConfiguration(arch, mode):
testpy_mode = 'release'
flags = None
if mode == 'debug':
- flags = '--checked'
+ flags = ['--checked']
return (testpy_mode, flags)
def TestStep(name, mode, component, targets, flags):
print '@@@BUILD_STEP %s tests: %s@@@' % (name, component)
- if component == 'frogium':
- cmd = ['xvfb-run']
+ if component == 'frogium' or component == 'webdriver':
+ cmd = ['xvfb-run', '-a']
else:
cmd = []
@@ -67,17 +70,19 @@ def TestStep(name, mode, component, targets, flags):
'-v']
+ targets)
if flags:
- cmd.append(flags)
+ cmd.extend(flags)
+
exit_code = subprocess.call(cmd, env=NO_COLOR_ENV)
if exit_code != 0:
print '@@@STEP_FAILURE@@@'
return exit_code
-def TestFrog(arch, mode):
+def TestFrog(arch, mode, system):
""" build and test frog.
Args:
- arch: either 'frog', 'frogsh' (frog self-hosted), or 'frogium'
- mode: either 'debug' (with type checks) or 'release' (without)
+ - system: either 'linux', 'mac', or 'windows'
"""
# Make sure we are in the frog directory
@@ -105,10 +110,22 @@ def TestFrog(arch, mode):
TestStep("leg_extra", testpy_mode, 'vm', ['leg'], flags)
else:
- if (TestStep("browser", testpy_mode, 'frogium',
- ['client', 'language', 'corelib', 'isolate', 'frog',
- 'leg', 'peg', 'css'], flags) != 0):
- return 1
+ # DumpRenderTree tests:
+ tests = [
+ 'client', 'language', 'corelib', 'isolate', 'frog', 'leg', 'peg', 'css']
+ TestStep("browser", testpy_mode, 'frogium', tests, flags)
+
+ # Webdriver tests.
+ if system == 'linux':
+ browsers = ['ff', 'chrome']
+ elif system == 'mac':
+ browsers = ['ff', 'chrome', 'safari']
+ else:
+ browsers = ['ff', 'chrome', 'ie']
+
+ for browser in browsers:
+ TestStep(browser, testpy_mode, 'webdriver', tests,
+ flags + ['--browser=' + browser])
return 0
@@ -118,12 +135,12 @@ def main():
print 'Script pathname not known, giving up.'
return 1
- arch, mode = GetBuildInfo()
- print "arch: %s, mode: %s" % (arch, mode)
+ arch, mode, system = GetBuildInfo()
+ print "arch: %s, mode: %s, system: %s" % (arch, mode, system)
if arch is None:
return 1
- status = TestFrog(arch, mode)
+ status = TestFrog(arch, mode, system)
if status != 0:
print '@@@STEP_FAILURE@@@'
return status
« no previous file with comments | « client/tests/client/client.status ('k') | frog/tests/frog/frog.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698