From 26de65fda62713655b007c8a6be3a90bdfa11240 Mon Sep 17 00:00:00 2001 From: Aaron Gable Date: Wed, 3 Apr 2013 11:01:54 -0700 Subject: [PATCH 1/3] Initial commit of gen_steps script. --- build/gen_steps.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 build/gen_steps.py diff --git a/build/gen_steps.py b/build/gen_steps.py new file mode 100644 index 0000000000..1bacef472e --- /dev/null +++ b/build/gen_steps.py @@ -0,0 +1,14 @@ +"""Step generator script for the annotated Toolkit builders. + +For more information, see scripts/slave/annotated_run.py in +https://chromium.googlesource.com/chromium/tools/build/""" + +def GetSteps(_api, build_properties): + return [ + {'name': 'update-install', + 'cmd': ['npm', 'install'], + 'cwd': ['toolkit']}, + {'name': 'grunt-test', + 'cmd': ['grunt', 'test'], + 'cwd': ['toolkit']} + ] From 617a78b9b8136cbd47f442504139de27bc50064d Mon Sep 17 00:00:00 2001 From: Aaron Gable Date: Wed, 3 Apr 2013 11:53:33 -0700 Subject: [PATCH 2/3] Updating GetSteps to modern api. --- build/gen_steps.py | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/build/gen_steps.py b/build/gen_steps.py index 1bacef472e..7757268d67 100644 --- a/build/gen_steps.py +++ b/build/gen_steps.py @@ -3,12 +3,15 @@ For more information, see scripts/slave/annotated_run.py in https://chromium.googlesource.com/chromium/tools/build/""" -def GetSteps(_api, build_properties): - return [ - {'name': 'update-install', - 'cmd': ['npm', 'install'], - 'cwd': ['toolkit']}, - {'name': 'grunt-test', - 'cmd': ['grunt', 'test'], - 'cwd': ['toolkit']} - ] +def GetSteps(api, _factory_properties, build_properties): + steps = api.Steps(build_properties) + return { + 'steps': [ + steps.step('update-install', + ['npm', 'install'], + cwd=api.checkout_path()), + steps.step('grunt-test', + ['grunt', 'test'], + cwd=api.checkout_path()), + ] + } From 33de394a04ff1aa0e0eef367bbb9dbdc2328ac52 Mon Sep 17 00:00:00 2001 From: Aaron Gable Date: Wed, 3 Apr 2013 13:40:46 -0700 Subject: [PATCH 3/3] gen_steps dict -> list --- build/gen_steps.py | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/build/gen_steps.py b/build/gen_steps.py index 7757268d67..a8d8e922cd 100644 --- a/build/gen_steps.py +++ b/build/gen_steps.py @@ -5,13 +5,11 @@ def GetSteps(api, _factory_properties, build_properties): steps = api.Steps(build_properties) - return { - 'steps': [ - steps.step('update-install', - ['npm', 'install'], - cwd=api.checkout_path()), - steps.step('grunt-test', - ['grunt', 'test'], - cwd=api.checkout_path()), - ] - } + return [ + steps.step('update-install', + ['npm', 'install'], + cwd=api.checkout_path()), + steps.step('grunt-test', + ['grunt', 'test'], + cwd=api.checkout_path()), + ]