summaryrefslogtreecommitdiffstats
path: root/bitbake
Commit message (Collapse)AuthorAgeFilesLines
* bitbake: toaster: use parent of the build dirEd Bartosh2015-12-071-1/+1
| | | | | | | | | | | | Assigned TOASTER_DIR to the parent of the build directory. This should fix local controller crash as it assumes that TOASTER_DIR is a root of local poky and tries to clone it. (Bitbake rev: 124eb2bb15de18e4d2d6483c3549e1d887234736) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: check for toaster configuration laterEd Bartosh2015-12-071-1/+24
| | | | | | | | | | | | Moved check for toasterconf.json after check of build environment. We'll need some variables from build environment to find toasterconf.json better way. (Bitbake rev: a4f6809237dffb1abff78c6a8c82bcc4852aedfa) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: remove unused variableEd Bartosh2015-12-071-2/+0
| | | | | | | | | | | Removed variable RUNNING as it's not used anymore in the toaster script. (Bitbake rev: 187c31a8789c37723b9288afd35f1785f1993895) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: change toasterconf.json logic to use TEMPLATECONF, like ↵brian avery2015-12-071-9/+24
| | | | | | | | | | | | | | oe-setup-builddir This changes the way we pick a toasterconf.json file so that it matches the way oe-setup-builddir does it. We now base it on TEMPLATECONF found in the .templateconf file. (Bitbake rev: 8476db82ea80edf2b70bc2082bcecee09037556d) Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: run bitbake the same wayEd Bartosh2015-12-071-6/+4
| | | | | | | | | | | Run bitbake in toaster script the same way as it's run by localbuildcontroller. (Bitbake rev: c5d5da095d5eace03f8a50910f5a60ab35acbb1a) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: set DATABASE_URL in toaster scriptEd Bartosh2015-12-071-0/+1
| | | | | | | | | | | Set environment variable DATABASE_URL in bitbake/bit/toaster Variable value is obtained by running 'manage.py get-dburl' (Bitbake rev: ac4800cc8b765b270f27ea9a5938f3f2a2e0ced4) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: implement get-dburl commandEd Bartosh2015-12-071-0/+9
| | | | | | | | | | | | Implemented management command to call getDATABASE_URL API. It will be used to get database url from toaster shell script by running 'manage.py get-dburl' (Bitbake rev: fabe9c8f14fd7b8ab204a2b610c64ac5b62135ac) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: don't allow to run toaster as a scriptEd Bartosh2015-12-071-75/+5
| | | | | | | | | | | | | | | | | Removed support of starting toaster as a script. Sourcing a toaster script becomes the only way to start it. It's consistent with the way oe build system is started by sourcing oe-init-build-env. It also returns user back to shell, so user can continue running builds without having to open new terminal window. [YOCTO #8279] (Bitbake rev: 7e8632c0527245c1474e487dd9a972948e794471) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: lib/bb/utils: improve edit_bblayers_conf() handling of ↵Paul Eggleton2015-12-072-14/+267
| | | | | | | | | | | | | | | | | | | | | | bblayers.conf formatting Make the following improvements to edit_bblayers_conf(): * Support ~ in BBLAYERS entries * Handle where BBLAYERS items are added over multiple lines with += instead of one single long item Also add some comments documenting the function arguments and return values as well as a set of bitbake-selftest tests. (This function is used by the bitbake-layers add, remove and layerindex-fetch subcommands, as well as devtool when adding the workspace layer). (Bitbake rev: e9a0858023c7671e30cc8ebb08496304b7f26b31) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: lib/bb/utils: fix error in edit_metadata() when deleting first linePaul Eggleton2015-12-071-1/+1
| | | | | | | | | | | | If you tried to delete the variable on the first line passed to edit_metadata() this failed because the logic for trimming extra blank lines didn't expect the list to be empty at that point - fix that bad assumption. (Bitbake rev: 8bce6fefdc5c046b916588962a2b429c0f648133) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: wget.py: parse only <a> tagsAlexander Kanavin2015-12-071-2/+3
| | | | | | | | | | | | | | | For two reasons: 1) The important one: we hit the following bug when doing upstream version checks on some webpages: https://bugs.launchpad.net/beautifulsoup/+bug/1471755 2) Also, documentation for beautifulsoup states that memory usage and speed is improved that way. (Bitbake rev: 7546d4aeb3ba8fda9832081b84d93138dc5e58d6) Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: toastergui tests Add generic test for ToasterTables widgetMichael Wood2015-12-071-11/+212
| | | | | | | | | | | | | | | | | | | | For each of the ToasterTables defined test: - Data returned - Search - Order by - Limit - Paginate - Filter These tests test that the functions on all tables work, it does not validate the content of the data in the tables themselves, this needs to be done in table specific tests. (Bitbake rev: 649d563f95ffc57d0fe3dbf494e7dbffcc99a1b4) 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>
* bitbake: toaster: tables Fix invalid field name on NewCustomImagesTableMichael Wood2015-12-071-1/+1
| | | | | | | | | | | Correct the field name in the NewCustomImagesTable as it is a Recipe object it's self and not a container. (Bitbake rev: ebd1c493d8b7fb9ee7b3e40c17165dc9c22ca795) 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>
* bitbake: toaster: tables Add default_orderby field where it was missing or unsetMichael Wood2015-12-071-3/+7
| | | | | | | | | | | | | | This value is used to set the default ordering of the model that is used for ToasterTables, it is picked up client side to set the ordering indicator. [YOCTO #8695] (Bitbake rev: f1c91bff810a579b169c46b7710e22f5553b484e) 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>
* bitbake: toaster: CustomImageRecipe add search_allowed_fields to this modelMichael Wood2015-12-071-0/+1
| | | | | | | | | | | In order to search the model from the UI some fields must be nominated as searchable. (Bitbake rev: 2558729b4c248a2fa5a11d877bc42cb05a30602e) 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>
* bitbake: toaster: machines table Fix missing layers information needed for ↵Michael Wood2015-12-072-4/+14
| | | | | | | | | | | | | filter The current layers information wasn't being passed to the template for the Select/Add button for the Compatible machines filter. (Bitbake rev: 559102984d3f62a7675899e058166bdf4d552c46) 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>
* bitbake: toaster: tablejs Make sure click handlers consume click eventMichael Wood2015-12-071-4/+6
| | | | | | | | | | | | | | Avoid the click event from propagating and causing strange side effects in toaster tables. [YOCTO #8527] [YOCTO #8148] (Bitbake rev: f23e54292a673b2fd3f17d317c21984c753727c7) 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>
* bitbake: toaster: projectpage Make sure build targets are space separatedMichael Wood2015-12-071-9/+13
| | | | | | | | | | | | | Make sure the build targets are space separated when building multiple targets. Also fix error path now that YOCTO #7995 is resolved. [YOCTO #8450] (Bitbake rev: e9719eb2e8249f0d10b39bfdd4aef563368b5ffd) 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>
* bitbake: toaster: builds pages Fix the download cooker log linkBelen Barros Pena2015-11-162-6/+13
| | | | | | | | | | | | | | | | The 'all builds' page was missing the download icon next to the outcome icon, which allows you to download a build log from the 'all builds' page. This patch brings it back. It also adds a check in the project builds page to make sure the download icon only appears if the build generates a cooker log, since builds that fail at the build request stage do not generate a cooker log. (Bitbake rev: 50d7ffa697764d84d96f26a3ae58a9dacde7b31e) 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>
* bitbake: toaster: project pages Link to image recipes table in notificationsBelen Barros Pena2015-11-162-2/+2
| | | | | | | | | | | | The project created notifications and the 'Choosea recipe to build' link in the project page are linking to the software recipes table. Changes them to link to the image recipes table instead, which is bound to be more useful. (Bitbake rev: 10e1fbee0d79dbbf15b89ebc155bb2c0092a71f2) 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>
* bitbake: toaster: tests: Re-write some cases to make them more maintainableKe Zou2015-11-161-223/+89
| | | | | | | | (Bitbake rev: c3c7e94cadb3a3a2d8ef33ed456f439c106018c1) Signed-off-by: Ke Zou <ke.zou@windriver.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: data_smart: Only support lowercase OVERRIDESRichard Purdie2015-11-161-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Our current OVERRIDES handling means we end up caching and checking for a lot of possible override combinations which turn out to very unlikely. A typical example is the SRC_URI variable where we have to check if "URI" is an override. Having spent many hours working in this code, I've realised all the actual overrides we use are lower case and our standard variables are mostly uppercase. This means we could gain quite some speed advantage if we write this into the code, that overrides only consist of lowercase characters. This patch shows how simple this is and the resulting speed gains are significant. This is a significant change but tests show we don't appear to have any users of capitals in overrides in any OE-Core metadata. Before "time bitbake -p": real 2m4.224s user 7m32.312s sys 0m7.116s After "time bitbake -p": real 1m26.009s user 5m10.484s sys 0m4.640s This check could also be made conditional however I'm not seeing a need to do that at present. (Bitbake rev: c9b9443faa76ee7366b1400a56f826f3f9dec1be) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: fetch2: Remove crazy code in unpackRichard Purdie2015-11-161-3/+0
| | | | | | | | | | This looks reasonable until you realise self.localpath is a function. Data expansion of something which isn't a string is the original value so this code just wastes CPU cycles and makes no sense. Remove it. (Bitbake rev: 37214ea9bf484998b75dbc1200d53f1afc5257ed) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: parse: Don't try to expand __base_depends/__dependsRichard Purdie2015-11-161-2/+2
| | | | | | | | Trying to expand a variable which isn't a string doesn't make sense. (Bitbake rev: 62367cca1f1793eb9827406bcdd5980fdeb80a60) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: cache: Don't try to expand __inherit_dataRichard Purdie2015-11-161-3/+3
| | | | | | | | Trying to expand a variable which isn't a string doesn't make sense. (Bitbake rev: 54d0ddd166a6707b4f8c8535639e3055b783363b) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: localhostbectrl Pass DATABASE_URL in via the process ↵Elliot Smith2015-11-164-332/+61
| | | | | | | | | | | | | | | | | | | environment Instead of putting the DATABASE_URL as part of the command for launching the bitbake observer process set it as part of environment. This fixes two issues 1. Where the value isn't quoted and therefore will be interpreted in the shell and 2. Anyone being able to see the value of DATABASE_URL in the process tree. [YOCTO #8669] (Bitbake rev: 832a8523067606b180c02f0d1544e8a23219bb08) 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>
* bitbake: toaster: Remove the new-build-input button widgetMichael Wood2015-11-161-0/+81
| | | | | | | | | | | | | | The button required a lot of state maintenance to make sure it showed up when the project was configured properly, showed correctly according to the projects known to Toaster, displayed correctly according to the mode Toaster was in, and was able to be used to change the current project. (Bitbake rev: b644514a96f3947ad3f307a26301c064c8ae18f8) 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>
* bitbake: toaster: projecttopbar Use the project in context to get num buildsMichael Wood2015-11-161-1/+1
| | | | | | | | | | | Use the project in the template context rather than ajax request to get the number of ended builds. (Bitbake rev: 1f6bfa876b17a600fc83c789af8aaa2639a463b2) 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>
* bitbake: toaster: projectpage Disable/Enable build input if we have 0 layersMichael Wood2015-11-161-3/+10
| | | | | | | | | | | If we've removed all the layers in the configuration, disable the build button and build input. (Bitbake rev: 872bd5ccf58236f5146b1640cc1c465b58371e44) 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>
* bitbake: toaster: orm Fix get_number_of_builds to count all apart from ↵Michael Wood2015-11-161-5/+4
| | | | | | | | | | | | | IN_PROGRESS The count of a project's builds should not include those which are currently in progress. (Bitbake rev: a981700701c41c7bbb6a9778e95f691278c5c294) 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>
* bitbake: codeparser: Only load the codeparser cache onceRichard Purdie2015-11-161-0/+4
| | | | | | | | | | The server state gets reset multiple times during startup and currently we reload the codeparser cache each time. This is pointless and causes unnecessary interaction time with bitbake. (Bitbake rev: 4f700316933e8e7b2d27366e5ce6176895b913e7) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toasterui: Create per-build logsElliot Smith2015-10-292-30/+94
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rather than relying on bug 8411, which is conveniently creating separate log files for each of our builds, create our own log file for each build. The log files are created in the same tmp directories that bitbake users, but are timestamped to the millisecond to avoid name collisions. Each log file is opened on a ParseStarted event (for builds triggered by Toaster) or BuildStarted event (for builds on the command line: Toaster doesn't get the ParseStarted event for command-line builds). The log file is closed on the BuildCompleted event, or if the build fails. Because we start logging on ParseStarted for Toaster builds, we're able to capture the "Build Configuration" section which bitbake writes to output. [YOCTO #8373] (Bitbake rev: 7974203cd8bc66dff1fcc55f8723dedefaf72840) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: build/utils: Add BB_TASK_IONICE_LEVEL supportRichard Purdie2015-10-292-0/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Similarly to BB_TASK_NICE_LEVEL, add BB_TASK_IONICE_LEVEL which allows the ioprio of tasks to be adjusted. This is in response to various qemu runtime timeouts which have been witnessed on the autobuilder, seemingly due to IO starvation (we already use NICE_LEVEL to adjust tasks). This has a fairly urgent need to deal with certain 'random' failures we're seeing on the autobuilders in testing. The format of the data in the variable is BB_TASK_IONICE_LEVEL = "<class>.<prio>". For <class>, 2 is best effort (the default), 1 is real time and 3 is idle. You'd need superuser privileges to use realtime. The <prio> value is a default of 4, and can be set between 0 and 7 with 7 being lowest priority and 0 the highest. The user can set this freely with normal privileges Note that in order for this to take effect, you need the cfq scheduler selected for the backing block device. We could use nice wrapper functions for ioprio from modules like psutil however that would complicate bitbake dependencies. This version has some magic numbers but works on the main 32 and 64 bit x86 build architectures and can easily be extended if ever needed. When we move to python 3.x, we can likely replace this with standard calls. (Bitbake rev: b9471ad147b102c45d65f5ffd9521864df7ff9c1) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: cooker: Ensure BB_CONSOLE remains correct over server resetsRichard Purdie2015-10-291-0/+7
| | | | | | | | | | The console log data is written to is created at console initialisation time and does not change over reset events. This ensures the BB_CONSOLELOG value is correct over such resets by preserving it. (Bitbake rev: 335eb2db228f7543a49de71f063ac72b865c947a) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bb/ui: Use getSetVariable command for BB_CONSOLELOGRichard Purdie2015-10-292-2/+2
| | | | | | | | | | | | | | | | | | | | Metadata can define BB_CONSOLELOG as containing ${DATETIME} and this can get expanded to a different value each time the variable is read. In the case of BB_CONSOLELOG, this behaviour is not desireable. The values of DATE/TIME are locked down at build time but this is too late for the purposes of ensuring the system can figure out the real value of BB_CONSOLELOG. The best way to do this is to set the variable into the datastore, thereby preserving its value. [YOCTO #8411] (Bitbake rev: 021f2eb55ab5863b57ed1b3f19f1b329bc1ad477) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: command: Add getSetVariable commandRichard Purdie2015-10-291-0/+10
| | | | | | | | | | There are some use cases where we want to read a variable but also set the variable to the value read, effectively locking in any expansion of it. This adds such a command. (Bitbake rev: 0c0c524691e3d2ffd9953a106fcc06262cbde910) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake-user-manual: Added new description for BB_TASK_IONICE_LEVELScott Rifenbark2015-10-291-0/+50
| | | | | | | | | Added a new variable description here for this variable. (Bitbake rev: 4e0da1ef4a58a7ba4b92d4e07ef79cf7bd90abf0) Signed-off-by: Scott Rifenbark <srifenbark@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: bitbake-user-manual: Added BBTARGETS variable description.Scott Rifenbark2015-10-291-0/+9
| | | | | | | (Bitbake rev: 0f0c205b9d6c24bee334eabb359973e0368ce931) Signed-off-by: Scott Rifenbark <srifenbark@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: templates Add meaningful title tagsBelen Barros Pena2015-10-2928-19/+55
| | | | | | | | | | | Our title tags are all over the place, and have no relation to the page content. This commit adds a meaningful title tag to each Toaster page. (Bitbake rev: 1ab8827d684a19a70f3b788aed2327bf30edffe2) 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>
* bitbake: toaster: orm Fix restrictive LogMessage message lengthMichael Wood2015-10-272-1/+346
| | | | | | | | | | | | | | Log messages can be quite long so use a TextField rather than a char field with max length of 240. mySQL is especially picky about field lengths and will cause an exception if the log is too long. [YOCTO #8475] (Bitbake rev: 349119f44cdad240dda7f4db45992e2539e1416f) Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: brian avery <avery.brian@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: Remove all navigation when not in build modeElliot Smith2015-10-272-4/+14
| | | | | | | | | | | | | | | | | | | | | | The user is redirected to the all builds page or all projects page from the landing page, regardless of mode. In build mode, this makes sense; but in analysis mode, we are restricting the view to just the cli builds project. This means that "all projects" and "all builds" only contains items relating to this one project. Modify the landing page so it redirects to the project builds page for the cli builds project when not in build mode. Also remove navigation elements which are irrelevant when not in build mode. [YOCTO #8514] (Bitbake rev: ae754655fa1bc5168f43e8821773e7b7b9440a5d) 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>
* bitbake: toaster: Run tests in build modeElliot Smith2015-10-271-0/+6
| | | | | | | | | | | | | | Now that the UI content is conditional on whether BUILD_MODE is active, modify the existing tests so that they run in this mode by default. [YOCTO #8514] (Bitbake rev: 991712f3f88759e2d68af5a3fe83c1395c4f67f6) 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>
* bitbake: toaster: Hide builds for non-cli projects in analysis modeElliot Smith2015-10-271-3/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | The "latest builds" sections of the "all builds" page show builds for all projects. This is not appropriate for analysis mode, where we can only affect the command-line builds project. Modify the "latest builds" section to only show builds for the command line builds project if in analysis mode. Also rationalise where we get the queryset of latest builds from: we have a _get_latest_builds() function which was being used to get the latest builds in most places, but not all. Also modify _get_latest_builds() to sort by started_on, rather than primary key, as assuming that a higher primary key value equates with later start time is incorrect. [YOCTO #8514] (Bitbake rev: 52de2c8cd11fa743f8fd7cb0cf776eea622ac474) 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>
* bitbake: toaster: Hide top bar buttons in analysis modeElliot Smith2015-10-271-5/+13
| | | | | | | | | | | | | | | The "new build" and "new project" buttons are irrelevant in analysis mode, as you can't start a build or a project. Hide these buttons if not in BUILD_MODE. [YOCTO #8514] (Bitbake rev: b1858653c22eb6d51fc23f75ccad69b76523eb41) 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>
* bitbake: toaster: Show mode-appropriate landing pageElliot Smith2015-10-271-45/+58
| | | | | | | | | | | | | | | | | | | | The same landing page is shown for both analysis and build modes. This means that users in analysis mode can see options which are not available or broken in that mode. Modify the landing page template to show a simple "run a build" message if the user is in analysis mode and has no builds yet. Also clean up the landing page HTML, because the indentation was a mess and the HTML was invalid. [YOCTO #8514] (Bitbake rev: 86b4a10cc817abb5e3e63360dc8b3c550337f17c) 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>
* bitbake: toaster: Add BUILD_MODE flag to contextElliot Smith2015-10-273-5/+7
| | | | | | | | | | | | | | | | | | | | We set a TOASTER_MANAGED env variable in the startup script, which has a value of "1" if Toaster should run in build mode. Add a BUILD_MODE variable to settings.py which is True if TOASTER_MANAGED is set to "1", False otherwise. Add this to the context for every template, so we can use this information to conditionally alter the content of pages according to the mode we're in. [YOCTO #8514] (Bitbake rev: f9cf4739fc85c9760ce748323dc7c8de3fa7eaec) 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>
* bitbake: toaster: add get_or_create_targets APIEd Bartosh2015-10-271-15/+21
| | | | | | | | | | | | | | | | | Target objects are created before the build if build is started from UI in build mode. However, in analysis mode Target objects don't exist and need to be created using information from bitbake events. Added new API call get_or_create_targets to retrive existing target objects or create them if they don't exist yet. (Bitbake rev: ef69be31d133696bde54605f5a18da660099734c) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> 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>
* bitbake: fetcher: svn: Add support for checkout to a custom pathJens Rehsack2015-10-271-2/+7
| | | | | | | | | | | Add support for the Subversion fetcher to checkout modules to a custom path than the module name to avoid checkout is always module - svn is path based and tag/branch-checkout might break builds because of invaid path specs. (Bitbake rev: af88f538e61afa1b115be4d7afe00d8477f61750) Signed-off-by: Jens Rehsack <sno@netbsd.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: cooker: preserve pre and post configsEd Bartosh2015-10-273-0/+14
| | | | | | | | | | | | | | | | | | | Additional config files passed to bitbake server with --read and --postread options are rewritten by client bitbake even if it doesn't use those options. This is a show stopper for toaster as toaster command line builds are based on the assumption that server is aware of toster configs, provided by --postread option. This behaviour is fixed by preserving values of --read and --postread options when bitbake server starts and restoring them if client bitbake doesn't explicitly specify them. (Bitbake rev: 02c64f7487ca8ec5d32c440f5002c4b8f64b76a6) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake: toaster: Add tests for error message display on the build dashboardElliot Smith2015-10-161-2/+89
| | | | | | | | | | | | | | Add tests to ensure that log messages with CRITICAL level and with EXCEPTION level are shown in the main errors display on the build dashboard. [YOCTO #8320] (Bitbake rev: 7b3ed62800cb7352154897c1c5ad2440a54df198) Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>