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 c6c4c6efe4c8f2a407753eb818590db194c052bc..dd617a1692a101383deaebd51c7980e056772827 100644 |
| --- a/frog/scripts/buildbot_annotated_steps.py |
| +++ b/frog/scripts/buildbot_annotated_steps.py |
| @@ -46,6 +46,27 @@ def ConvertConfiguration(arch, mode): |
| flags = '--checked' |
| return (testpy_mode, flags) |
| +def TestStep(message, mode, component, targets, flags): |
| + print '@@@BUILD_STEP %s: %s@@@' % (message, component) |
| + if component == 'frogium': |
| + cmd = ['xvfb-run'] |
| + else: |
| + cmd = [] |
| + |
| + cmd = (cmd |
| + + [sys.executable, |
| + '../tools/test.py', |
| + '--mode=' + mode, |
| + '--component=' + component, |
| + '--time', |
| + '--report', |
| + '--progress=buildbot', |
| + '-v'] |
| + + targets) |
| + if flags: |
| + cmd.append(flags) |
| + return subprocess.call(cmd) |
| + |
| def TestFrog(arch, mode): |
| """ build and test frog. |
| Args: |
| @@ -55,84 +76,28 @@ def TestFrog(arch, mode): |
| # Make sure we are in the frog directory |
| os.chdir(FROG_PATH) |
| - |
| testpy_mode, flags = ConvertConfiguration(arch, mode) |
| print '@@@BUILD_STEP build frog@@@' |
| - status = subprocess.call( |
| - [sys.executable, '../tools/build.py', '--mode=' + testpy_mode]) |
| - if status != 0: |
| - return status; |
| + if subprocess.call( |
| + [sys.executable, '../tools/build.py', '--mode=' + testpy_mode]) != 0: |
| + return 1 |
| - print ('@@@BUILD_STEP frog tests: %s@@@' % arch) |
| - cmd = [sys.executable, |
| - '../tools/test.py', |
| - '--mode=' + testpy_mode, |
| - '--component=' + arch, |
| - '--time', |
| - '--report', |
| - '--progress=buildbot', |
| - '-v', |
| - 'language', |
| - 'corelib', |
| - 'isolate', |
| - 'frog'] |
| - if flags: |
| - cmd.append(flags) |
| + if TestStep("frog tests", testpy_mode, arch, |
|
Emily Fortuna
2011/11/11 21:49:57
nit: move the word "tests" up into TestStep?
Siggi Cherem (dart-lang)
2011/11/11 22:20:19
:) Done
|
| + ['language', 'corelib', 'isolate', 'frog'], flags) != 0: |
| + return 1 |
| - status = subprocess.call(cmd) |
| - if status != 0: |
| - return status |
| + if TestStep("leg only tests", testpy_mode, 'leg', ['leg_only'], flags) != 0: |
| + return 1 |
| - print ('@@@BUILD_STEP leg only tests@@@') |
| - cmd = [sys.executable, |
| - '../tools/test.py', |
| - '--mode=' + testpy_mode, |
| - '--component=leg', |
| - '--time', |
| - '--report', |
| - '--progress=buildbot', |
| - '-v', |
| - 'leg_only'] |
| - if flags: |
| - cmd.append(flags) |
| + if (arch == 'frogsh' and |
| + TestStep("client tests", testpy_mode, 'frogium', ['client'], flags) != 0): |
| + return 1 |
| - status = subprocess.call(cmd) |
| - if status != 0: |
| - return status |
| - |
| - if arch == 'frogsh': |
| - print ('@@@BUILD_STEP client browser tests@@@') |
| - cmd = ['xvfb-run', sys.executable, |
| - '../tools/test.py', |
| - '--mode=' + testpy_mode, |
| - '--component=frogium', |
| - '--time', |
| - '--report', |
| - '--progress=buildbot', |
| - '-v', |
| - 'client'] |
| - if flags: |
| - cmd.append(flags) |
| - |
| - status = subprocess.call(cmd) |
| - if status != 0: |
| - return status |
| - |
| - print ('@@@BUILD_STEP frog co19 tests: %s@@@' %arch) |
| - cmd = [sys.executable, |
| - '../tools/test.py', |
| - '--mode=' + testpy_mode, |
| - '--component=' + arch, |
| - '--time', |
| - '--report', |
| - '--progress=buildbot', |
| - '-v', |
| - 'co19'] |
| - if flags: |
| - cmd.append(flags) |
| + if TestStep("frog co19 tests", testpy_mode, arch, ['co19'], flags) != 0: |
| + return 1 |
| - return subprocess.call(cmd) |
| + return 0 |
| def main(): |
| print 'main' |