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

Unified Diff: frog/scripts/buildbot_annotated_steps.py

Issue 8491052: Minor code clean-ups addressing Nicolas suggestions (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: '' Created 9 years, 1 month 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 | « no previous file | tools/testing/architecture.py » ('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 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'
« no previous file with comments | « no previous file | tools/testing/architecture.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698