Commit Graph

23 Commits

Author SHA1 Message Date
Ed Bartosh 9a3f2b3912 bitbake: toaster: fix local imports
Replaced local imports with absolute imports.
Used .module for local imports.

This should make the code to work on python 2 and python 3.

[YOCTO #9584]

(Bitbake rev: 3f1e68c783308dcb51242d0fdeef758e581ccc8c)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-02 08:24:03 +01:00
Richard Purdie 3795f4d6a6 bitbake: bin, toaster: Fix print and exception syntax
This updates the print "" syntax to print() and fixes some exception
handling syntax such that its compatible with python v2 and v3.

(Bitbake rev: 58304fcce9727fd89564436771356c033ecd22a3)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-11 10:34:30 +01:00
brian avery 8068aa3b0f bitbake: toaster: get rid of interactivity in bldcontrol
removed layer dir questions and base off TOASTER_DIR

removed build dir questions and base off TOASTER_DIR

base configuration file off of TOASTER_CONF

fixed some pylint issues

[YOCTO #8217]

(Bitbake rev: d5811968b5f22093365f381fb7e75ab46e5269c2)

Signed-off-by: brian avery <avery.brian@gmail.com>
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-10-11 05:33:06 +01:00
Elliot Smith b6d1d2acd5 bitbake: toaster: Avoid unnecessary local to local copy of cooker log
The cooker log is copied from its original (bitbake) location
to an artifact directory chosen by the user (chosen when
checksettings.py runs as part of the managed mode;
it's one of the annoying questions you're asked at startup).
The copy happens as part of the runbuilds script run, which
is started in a loop from the toaster startup script
in managed mode.

When a user requests the log for a build via toaster, they
are getting the log which has been copied to the artifact
directory, not the original bitbake log.

This works for the managed case, where the runbuilds command is
running in a loop and copying log files for completed builds to
the artifact directory. However, in analysis mode, there are two
problems:

1. checksettings isn't run, so the artifacts directory isn't
set. toaster is then unable to figure out where the log files
should have been copied to.

2. The log files aren't copied to the artifacts directory
anyway, as runbuilds isn't running in analysis mode.

To fix this, just point the user to the local bitbake log file
in its original location. This avoids the copy step, and means
we can remove a whole question from the toaster startup sequence,
as we no longer need an artifact directory.

The only downside to this is that it's not appropriate for
remote bitbake servers. We will need to revisit this and
possibly reinstate the copy step once we have to reconcile
local and remote builds and make their logs available in
the same way.

[YOCTO #8209]

(Bitbake rev: 5697bbcc88edad85891f66d28b8803a9c9d27ff2)

Signed-off-by: Elliot Smith <elliot.smith@intel.com>
Signed-off-by: brian avery <avery.brian@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-18 09:05:33 +01:00
Belen Barros Pena ccc1d9ac0c bitbake: toaster: improve explanation of checkout dir
Improve the explanation we show to users during set up
when asking them to set the layers checkout directory.

The patch also makes minor changes in text formatting to
improve legibility.

[YOCTO #7740]

(Bitbake rev: dd9284944ae0f0feecb70adab880fed636f7cd59)

Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com>
Signed-off-by: Elliot Smith <elliot.smith@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-04 16:23:57 +01:00
Alexandru DAMIAN 99730d64d4 bitbake: toaster: checksettings: fix TEMPLATECONF detection
Improving the TEMPLATECONF detection by verifying the return
code and dumping extra debug information in case of exception.

(Bitbake rev: bdc00755993aa37e7669c3859ef4ea9b1fc3e680)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-19 18:05:52 +01:00
Alexandru DAMIAN 3a1af07177 bitbake: toaster: checksettings: fix guesspath initialization
Object fields need to be instantiated in the constructor.
Fixed prompted by pylint.

(Bitbake rev: 40db75c6117c3226c27d278d2acf0cd3ba61a167)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-19 18:05:51 +01:00
Alexandru DAMIAN 98dfa27050 bitbake: toaster: pylint fixes
This patch fixes imports, default parameters to functions,
incorrect overloading and exception handling issues
highlighted by pylint. There are no functional changes.

(Bitbake rev: 066e096b80dcb0e93e1a088acf5d914184361769)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-19 18:05:51 +01:00
Belen Barros Pena 8ab2101166 bitbake: toaster: Fix typo in set up script output
Removing an spurious 'it' when setting the build directory.
Thanks to Scott Rifenbark for finding the typo!

(Bitbake rev: dd644a2c87e651c3990520759bab55a56ba110d1)

Signed-off-by: Belen Barros Pena <belen.barros.pena@intel.com>
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-08-17 08:48:27 +01:00
Michael Wood 62288a6689 bitbake: toaster: bldcontrol Ignore toasterconf files in own directories
If toaster has previously cloned poky or a layer with a toasterconf
file we don't want this to be picked up as a choice as these clones are
"internal" to toaster and may have undesired effects on toaster's setup.

[YOCTO #7741]

(Bitbake rev: 2f74ff59f2873c1cf121f7a385f3ab971c793a9c)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-06-26 09:27:33 +01:00
Alexandru DAMIAN 1b6a50c6b2 bitbake: toaster: refactor checksettings command
This patch refactors the checksetting command to prevent
early return from the handle function.

It also adds a check that marks IN PROGRESS builds at startup time
as FAILED. Minor changes to BuildRequest and Build classes
ensure useful string representation for the objects.

(Bitbake rev: adf67dd79dbf6b585bf8cd54f99c389409b88ecd)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-05-29 11:59:45 +01:00
Alexandru DAMIAN c368d83bd6 bitbake: toaster: bitbake cooker log saving and downloading
This patch brings in cooker log saving and proper download links.

* toasterui will now write the cooker log file if running in managed
mode
* the BuildRequest has a new state, REQ_ARCHIVE, indicating that the
build is completed, and the artifacts are ready to be grabbed
* the runbuild test execution commands will gather needed artifacts,
and save them to a storage directory selected during Toaster setup.
* the build dashboard, project builds and all builds pages have
permanent links for the cooker log

[YOCTO #7220]
[YOCTO #7206]

(Bitbake rev: fad80e36c9da663b000cdf2cb3c75440c6431d84)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-20 12:58:19 +00:00
Alexandru DAMIAN 0c89846daf bitbake: toaster: enhancements for the startup sequence
This patch brings fixes and enhancements in the startup sequence.

- the dependency version checking is now correctly enforced when
starting in both modes
- fixed errors in looking up environment variables
- added message with 'daemon' program start location
- presenting menu for selecting config file

[YOCTO #7283]
[YOCTO #7291]
[YOCTO #7273]

(Bitbake rev: c5ddd9d88910857a1b745b1c237df0390dd56835)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-10 23:07:48 +00:00
Alexandru DAMIAN c58c94824b bitbake: toaster: update texts for the startup sequence
This patch updates the prompts to the user to better explain
what Toaster is doing and the information it needs from the user.

Additionally, fixes a check in loadconf command.

[YOCTO #6785]
[YOCTO #7251]

(Bitbake rev: 90ef8975f35e2da824bc1c80e41ca26d9af0b208)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-01-30 15:14:58 +00:00
Alexandru DAMIAN d086fa3aed bitbake: toasterui: add extra debug and development infos
We update and add logs throughout the code in order to help
with development. The extra logging is turned off by default,
but it can be enabled by using environment variables.

All logging happens through the Python logging facilities.

The toaster UI will save a log of all incoming events if the
TOASTER_EVENTLOG variable is set.

If TOASTER_SQLDEBUG is set all DB queries will be logged.

If TOASTER_DEVEL is set and the django-fresh module is available,
the module is enabled to allow auto-reload of pages when the
source is changed.

(Bitbake rev: 10c27450601b4d24bbb273bd0e053498807d1060)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-18 10:24:06 +00:00
Alexandru DAMIAN af1f9fda8b bitbake: toaster: display Toaster exceptions and other fixes
Changing ToasterUI to log toaster exceptions on a different level than
build errors.

Updating the build dashboard to show Toaster exceptions.

We add extra logging to console for exceptions.

Fixed a problem where packages database entries were created instead of
being looked up in the database, conficting with entries created to
satisfy dependency information.

Toaster now checks for invalid states at startup and performs needed
cleanups.

Removed loading reference to jquery-ui.min.css as we do not have this
file.

(Bitbake rev: 2378812bc24d433125fb940f110154f0ce638448)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-28 14:02:58 +00:00
Alexandru DAMIAN 0b6859cdf3 bitbake: toastergui: layer name correlation
This patch modifies how layers are identified and matched.

Layers were primarely organized by the source of layer information,
and Releases were separated by both layer git branches and originating
source of layer information. This setup prevented mixing layers from
different sources for a certain release, which didn't match the way
people use Yocto Project / bitbake.

This patch brings name-based indentification, where layers with the
same name are assumed to be equivalent, in the sense of being able
to substitute one another. To facilitate this identification to
humans, layers are differentiated by GIT URI instead of layer sources,
which was a rather arbitrary abstraction.

Additional changes include modification to models in order accomodate
for the new data structure, and to config file loading to match
the new toasterconf.json layout.

(Bitbake rev: 4357200aed522ad56cfd84917f877645b83b6a70)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-21 11:49:23 +00:00
Alexandru DAMIAN abf7551f60 bitbake: toaster: separate the load configuration file command
We separate the load configuration command as to allow
system administrators load toasterconf.json file as part of the
setup process.

[YOCTO #6895]

(Bitbake rev: 3ed596ac4e21a4494fd7f6cd8739d460fd98512f)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-12 17:04:49 +00:00
Alexandru DAMIAN 78e3a7877b bitbake: toaster: update Release model to pinpoint to specific Branch
We update the release model to pinpoint to specific branch,
instead of holding a branch name that needs to be matched.

This is needed because we move away from mixing branches on different
layer sources.

Various minor changes to models file.

(Bitbake rev: d58aacc69b1832f99758b941803123329e06082d)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-11-12 17:04:48 +00:00
Alexandru DAMIAN 83edc576b2 bitbake: toasterbld: update checksettings command
We update the checksettings command to allow for upstream
git url detection at runtime by looking up a named remote
of a local repository.

Also various small fixes in check settings.

(Bitbake rev: c127ecb3b5b27b705b8714af063d910b944c8bbc)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-10-30 13:39:47 +00:00
Alexandru DAMIAN 95df54238b bitbake: toaster: update checksettings command for auto-detection
We enhance the checksettings command to try to automatically
detect settings for running on localhost.

The checksettings will look for a nearby poky layer source,
for a nearby build directory, and will try to import settings
from "toasterconf.json" files found in the local layer.

On new configuration, it will also perform updates from the
layer source.

(Bitbake rev: 2aab77dfccb538e2b09829841ea6c464d40cafb1)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-08-29 13:56:50 +01:00
Alexandru DAMIAN 8a3789a7b1 bitbake: toaster: move bldcontrol initial_data fixture to code
We move the initial_data fixture to a code migration,
in order to make sure that we don't overwrite modified data.

The data is inserted only if no data is present, instead
of always overwriting the entry.

The check settings returns 0 if the check was ok.

(Bitbake rev: 525c316ac95c06c52fbcfc836ca5599ee9dbfe8b)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-07-23 20:06:58 +01:00
Alexandru DAMIAN 6cfb76fa8b bitbake: toaster: add fields for sourcedir and builddir paths
We add explicit absolute paths for a directory where
the layer sources will be checked out (sourcedir) and
where the build activities will take place.

Adding minimal checking when starting the application in
order to make sure that BuildEnvironment (BE) settings are
usable. This check is ran by the toaster script at startup.

Modify the localhost bbcontroller to use the BE settings
instead of trying to self-configure on checked out sources.

(Bitbake rev: d17500d3f73fdeeef5f11fb3773a65e927be3f02)

Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-07-23 20:06:57 +01:00