Chromium Code Reviews| Index: frog/scripts/buildbot_annotated_steps.py |
| diff --git a/frog/scripts/buildbot_annotated_steps.py b/frog/scripts/buildbot_annotated_steps.py |
| index 85de92dc9f6f6f6e83abb865a5e0164b49b6413a..fb200d6670bc14446356f29f29416d97bf81d759 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 |
| @@ -103,10 +108,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: |
|
Emily Fortuna
2012/01/11 18:59:45
browsers never gets initialized to [], so in the c
Siggi Cherem (dart-lang)
2012/01/11 19:55:22
In this case it's ok, we are running webdriver tes
|
| + TestStep(browser, testpy_mode, 'webdriver', tests, |
| + flags + ['--browser=' + browser]) |
| return 0 |
| @@ -116,12 +133,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 |