diff options
author | Michael Wood <michael.g.wood@intel.com> | 2016-05-19 13:59:29 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-05-20 10:09:02 +0100 |
commit | 82dc991f487803d9ce632fc5d66b2c9b7c2c6825 (patch) | |
tree | 4a2267f6529c4cb23fe34107e63b4a00aa11aa7e /bitbake | |
parent | db843070554fe9bd518103ab922284b510ead7b5 (diff) | |
download | poky-82dc991f487803d9ce632fc5d66b2c9b7c2c6825.tar.gz |
bitbake: toaster: runbuilds move the execution sequence out of the poll loop
Move the execution sequence for a build out of the polling loop and into
it's own fuction. This means that we can call the function on it's own
if we just want to trigger one build rather than infinite polling.
This is something needed for the build tests.
(Bitbake rev: e8e059602c31394a4be5293e2ca0b8434fb4a8cf)
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Elliot Smith <elliot.smith@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r-- | bitbake/lib/toaster/bldcontrol/management/commands/runbuilds.py | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/bitbake/lib/toaster/bldcontrol/management/commands/runbuilds.py b/bitbake/lib/toaster/bldcontrol/management/commands/runbuilds.py index 5532b9deb2..e3145e8be6 100644 --- a/bitbake/lib/toaster/bldcontrol/management/commands/runbuilds.py +++ b/bitbake/lib/toaster/bldcontrol/management/commands/runbuilds.py | |||
@@ -158,22 +158,23 @@ class Command(NoArgsCommand): | |||
158 | br.environment.lock = BuildEnvironment.LOCK_FREE | 158 | br.environment.lock = BuildEnvironment.LOCK_FREE |
159 | br.environment.save() | 159 | br.environment.save() |
160 | 160 | ||
161 | def runbuild(self): | ||
162 | try: | ||
163 | self.cleanup() | ||
164 | except Exception as e: | ||
165 | logger.warn("runbuilds: cleanup exception %s" % str(e)) | ||
161 | 166 | ||
162 | def handle_noargs(self, **options): | 167 | try: |
163 | while True: | 168 | self.archive() |
164 | try: | 169 | except Exception as e: |
165 | self.cleanup() | 170 | logger.warn("runbuilds: archive exception %s" % str(e)) |
166 | except Exception as e: | ||
167 | logger.warning("runbuilds: cleanup exception %s" % str(e)) | ||
168 | |||
169 | try: | ||
170 | self.archive() | ||
171 | except Exception as e: | ||
172 | logger.warning("runbuilds: archive exception %s" % str(e)) | ||
173 | 171 | ||
174 | try: | 172 | try: |
175 | self.schedule() | 173 | self.schedule() |
176 | except Exception as e: | 174 | except Exception as e: |
177 | logger.warning("runbuilds: schedule exception %s" % str(e)) | 175 | logger.warn("runbuilds: schedule exception %s" % str(e)) |
178 | 176 | ||
177 | def handle_noargs(self, **options): | ||
178 | while True: | ||
179 | self.runbuild() | ||
179 | time.sleep(1) | 180 | time.sleep(1) |