diff options
author | Alexandru DAMIAN <alexandru.damian@intel.com> | 2014-07-15 19:31:10 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-07-23 20:06:58 +0100 |
commit | 1b9175af3fabf12af80c8446af94078afd0832ed (patch) | |
tree | 180743528e824556bb21672826971cb7f1c36538 /bitbake/lib/toaster/bldcontrol/management | |
parent | 6e71c276b582135228419d95174b7e7784d496b2 (diff) | |
download | poky-1b9175af3fabf12af80c8446af94078afd0832ed.tar.gz |
bitbake: toaster: properly set layers when running a build
This patch enables the localhost build controller to
properly set the layers before the build runs.
It creates the checkout directories under BuildEnvironment
sourcedir directory, and runs the build in the buildir
directory.
Build launch errors are tracked in the newly added BRError table.
These are different from build errors, in the sense that the
build can't start due to these errors.
(Bitbake rev: 1868d5635b517e0fe1b874674ea7a78910b26e2e)
Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/toaster/bldcontrol/management')
-rw-r--r-- | bitbake/lib/toaster/bldcontrol/management/commands/runbuilds.py | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/bitbake/lib/toaster/bldcontrol/management/commands/runbuilds.py b/bitbake/lib/toaster/bldcontrol/management/commands/runbuilds.py index dd8f84b07a..fa8c1a9906 100644 --- a/bitbake/lib/toaster/bldcontrol/management/commands/runbuilds.py +++ b/bitbake/lib/toaster/bldcontrol/management/commands/runbuilds.py | |||
@@ -1,8 +1,8 @@ | |||
1 | from django.core.management.base import NoArgsCommand, CommandError | 1 | from django.core.management.base import NoArgsCommand, CommandError |
2 | from django.db import transaction | 2 | from django.db import transaction |
3 | from orm.models import Build | 3 | from orm.models import Build |
4 | from bldcontrol.bbcontroller import getBuildEnvironmentController, ShellCmdException | 4 | from bldcontrol.bbcontroller import getBuildEnvironmentController, ShellCmdException, BuildSetupException |
5 | from bldcontrol.models import BuildRequest, BuildEnvironment | 5 | from bldcontrol.models import BuildRequest, BuildEnvironment, BRError |
6 | import os | 6 | import os |
7 | 7 | ||
8 | class Command(NoArgsCommand): | 8 | class Command(NoArgsCommand): |
@@ -25,6 +25,7 @@ class Command(NoArgsCommand): | |||
25 | return br | 25 | return br |
26 | 26 | ||
27 | def schedule(self): | 27 | def schedule(self): |
28 | import traceback | ||
28 | try: | 29 | try: |
29 | br = None | 30 | br = None |
30 | try: | 31 | try: |
@@ -63,15 +64,19 @@ class Command(NoArgsCommand): | |||
63 | 64 | ||
64 | # cleanup to be performed by toaster when the deed is done | 65 | # cleanup to be performed by toaster when the deed is done |
65 | 66 | ||
66 | except ShellCmdException as e: | ||
67 | import traceback | ||
68 | print " EE Error executing shell command\n", e | ||
69 | traceback.format_exc(e) | ||
70 | 67 | ||
71 | except Exception as e: | 68 | except Exception as e: |
72 | import traceback | 69 | print " EE Error executing shell command\n", e |
73 | traceback.print_exc() | 70 | traceback.print_exc(e) |
74 | raise e | 71 | BRError.objects.create(req = br, |
72 | errtype = str(type(e)), | ||
73 | errmsg = str(e), | ||
74 | traceback = traceback.format_exc(e)) | ||
75 | br.state = BuildRequest.REQ_FAILED | ||
76 | br.save() | ||
77 | bec.be.lock = BuildEnvironment.LOCK_FREE | ||
78 | bec.be.save() | ||
79 | |||
75 | 80 | ||
76 | def cleanup(self): | 81 | def cleanup(self): |
77 | from django.utils import timezone | 82 | from django.utils import timezone |