summaryrefslogtreecommitdiffstats
path: root/bin
AgeCommit message (Collapse)Author
2016-09-02bitbake-diffsigs/bitbake-layers: Ensure tinfoil is shut down correctlyPaul Eggleton
We should always shut down tinfoil when we're finished with it, either by explicitly calling the shutdown() method or by using it as a context manager ("with ..."). Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2016-08-19bitbake-selftest: enable bitbake logging to stdoutMarkus Lehtonen
Now you get the bb logger output for failed tests. This helps debugging problems. Also, all stdout/stderr data for successful tests is silenced which makes for less cluttered console output. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-08-19bitbake-selftest: introduce BB_TMPDIR_NOCLEANMarkus Lehtonen
Set this env variable to 'yes' to preserve temporary directories used by the fetcher tests. Useful for debugging tests. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-08-19bitbake-selftest: add help text for env variable(s)Markus Lehtonen
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-08-19bitbake-selftest: utilize unittest.main betterMarkus Lehtonen
This simplifies the script, and, gives new features. It is now possible to run single test functions, for example. This is nice when writing new test cases. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-08-18bitbake: Update version to 1.31.1Richard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-08-17bitbake: Initial multi-config supportRichard Purdie
This patch adds the notion of supporting multiple configurations within a single build. To enable it, set a line in local.conf like: BBMULTICONFIG = "configA configB configC" This would tell bitbake that before it parses the base configuration, it should load conf/configA.conf and so on for each different configuration. These would contain lines like: MACHINE = "A" or other variables which can be set which can be built in the same build directory (or change TMPDIR not to conflict). One downside I've already discovered is that if we want to inherit this file right at the start of parsing, the only place you can put the configurations is in "cwd", since BBPATH isn't constructed until the layers are parsed and therefore using it as a preconf file isn't possible unless its located there. Execution of these targets takes the form "bitbake multiconfig:configA:core-image-minimal core-image-sato" so similar to our virtclass approach for native/nativesdk/multilib using BBCLASSEXTEND. Implementation wise, the implication is that instead of tasks being uniquely referenced with "recipename/fn:task" it now needs to be "configuration:recipename:task". We already started using "virtual" filenames for recipes when we implemented BBCLASSEXTEND and this patch adds a new prefix to these, "multiconfig:<configname>:" and hence avoid changes to a large part of the codebase thanks to this. databuilder has an internal array of data stores and uses the right one depending on the supplied virtual filename. That trick allows us to use the existing parsing code including the multithreading mostly unchanged as well as most of the cache code. For recipecache, we end up with a dict of these accessed by multiconfig (mc). taskdata and runqueue can only cope with one recipecache so for taskdata, we pass in each recipecache and have it compute the result and end up with an array of taskdatas. We can only have one runqueue so there extensive changes there. This initial implementation has some drawbacks: a) There are no inter-multi-configuration dependencies as yet b) There are no sstate optimisations. This means if the build uses the same object twice in say two different TMPDIRs, it will either load from an existing sstate cache at the start or build it twice. We can then in due course look at ways in which it would only build it once and then reuse it. This will likely need significant changes to the way sstate currently works to make that possible. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-08-17cache: Build datastores from databuilder objectRichard Purdie
Rather than passing in a datastore to build on top of, use the data builder object in the cache and base the parsed recipe from this. This turns things into proper objects building from one another rather than messy mixes of static and class functions. This sets things up so we can support parsing and building multiple configurations. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-08-11toaster: Remove old toaster config loading mechanismMichael Wood
This has been replaced using django's inbuilt loaddata. Django command documented at: https://docs.djangoproject.com/en/1.8/ref/django-admin/#django-admin-loaddata Signed-off-by: Michael Wood <michael.g.wood@intel.com>
2016-08-11toaster: checksettings call django's loaddata instead of custom commandMichael Wood
Call django's inbuilt loaddata command to load the appropriate fixtures. We also attempt to load a fixture called "custom" and fail silently if we don't have one. This is where initial customisations can be done to load particular settings or data into Toaster (for example layers or default values for variables) Make sure the value for TEMPLATECONF is available to checksettings so that we can have a go a working out which default data to load. Signed-off-by: Michael Wood <michael.g.wood@intel.com>
2016-08-11toaster: --help now returns 0 instead of 1Randy Witt
If the user explicitly passes in "--help" then it should return 0. This is the convention follow by the typical application. This allows the user to check for options without triggering an error. Signed-off-by: Randy Witt <randy.e.witt@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-07-08eventreplay: rewrite the scriptEd Bartosh
Rewritten toaster-eventreplay to make code working as expected, more compact and readable. [YOCTO #9585] Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-07-08eventreplay: reorganize importsEd Bartosh
Cleaned up module imports: - Removed unused imports - Removed import of print_function - Removed duplicated imports - Splitted importing bb.lib to 2 lines Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-07-08eventreplay: replace MockConfigParameters with namedtupleEd Bartosh
class MockConfigParameters has only one attribute and only __init__ method. Replacing it with namedtuple makes code less nested and more readable. [YOCTO #9585] Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-07-08eventreplay: fix event loading codeEd Bartosh
Event objects are represented by base64-encoded strings in the event file and can't be loaded by existing eventreplay code. Fixed the code of loading events from file by decoding base64 strings into the binary form and loading them with pickle.load. [YOCTO #9585] Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-07-08eventprelay: implement setEventMask commandEd Bartosh
Stored event mask list as self.eventmask for future use. Fixed Exception: Command setEventMask not implemented. [YOCTO #9585] Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-07-08eventreplay: add MockConnection.getEventHandle methodEd Bartosh
Fixed AttributeError: 'MockConnection' object has no attribute 'getEventHandle' [YOCTO #9585] Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-07-08bitbake-worker: don't reassign sys.stdoutEd Bartosh
Worker needs input stream in binary mode as it reads binary content from it. Current code does it by detaching a buffer from sys.stdin and assigning it back to sys.stdin. Detached buffer is io.BufferedReader in binary mode. This operation is implicit as its purpose is not easily understandable from the code. Replacing it with fdopen(sys.stdin.fileno(), 'rb') should make the code more understandable. Assigning the buffer to sys.stdin is not needed as worker doesn't use sys.stdin. Moreover, it leads to difficult to debug issues down the stack. For example, devpyshell doesn't work without reopening sys.stdin in text mode. This is not needed anymore after this fix as sys.stdin is not changed in worker code and remains in text mode. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-14toaster: bin Use python 3 for our django modules checkMichael Wood
Explicitly use python3 so that the modules for python3 are checked. Signed-off-by: Michael Wood <michael.g.wood@intel.com>
2016-06-01toaster: use python3 explicitlyEd Bartosh
Explicitly used python3 as default python for oe builds will continue to be python2. [YOCTO #9584] Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-01goggle/image-writer: Drop since bitrotting and no longer usedRichard Purdie
The upgrade to python3 is the final nail in the coffin for image-writer and the goggle UI. Neither seem used or recieve patches and are based on old versions of GTK+ so drop them, and the remaining crumbs support pieces. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-01image-writer/goggle: Disable pygtkcompat problemsRichard Purdie
Disable the problematic gtk usage for use with pygtkcompat. The following commit removes these tools/UIs entirely but we may as well leave this piece in the history in case anyone does want a starting point for reusing them. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-01bitbake: Convert to python 3Richard Purdie
Various misc changes to convert bitbake to python3 which don't warrant separation into separate commits. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-20toaster: Remove DATABASE_URL being passed around as an environment varMichael Wood
We don't need to pass the DATABASE_URL around and read it back if we setup the django framework in the correct way. We make the default sqlite database path a full path so that the database isn't being assumed to be in CWD. Also add some more useful comments on the database settings. This is preparation work to migrate the build tests and be able to trigger builds on differently configured databases. 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>
2016-05-17Implement support for per-task exportsChristopher Larson
Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-17bitbake-layers: convert to plugin-basedChristopher Larson
This uses bb.utils.load_plugins, based on the plugin handling in recipetool and devtool in oe-core. Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-13toaster: use print function in toaster scriptEd Bartosh
Used print() function instead of print statement to make toaster script to work with both python 2 and python 3 [YOCTO #9584] Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-12bin/bitbake-worker: Fix invalid bb.msg.fatal usageRichard Purdie
The logging domain specified to bb.msg.fatal was invalid. Replace with a logger.critical() call instead. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-09bin, toaster: Fix print and exception syntaxRichard Purdie
This updates the print "" syntax to print() and fixes some exception handling syntax such that its compatible with python v2 and v3. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-09bitbake: Update logger.warn() -> logger.warning()Richard Purdie
python deprecated logger.warn() in favour of logger.warning(). This is only used in bitbake code so we may as well just translate everything to avoid warnings under python 3. Its safe for python 2.7. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-29toaster: bin/toaster Fix noweb commandMichael Wood
For the noweb command we don't need to check if a socket is in use or not as we're not starting the django development server. We're just setting up the environment and running the runbuilds scheduler. 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>
2016-04-29toaster: bin/toaster Add ability to specify port and address to bind toMichael Wood
Allow binding to a specified address and port to start the django development server on. Remove the assumption that you want to bind to 0.0.0.0 and set the default to localhost. Add some additional help text after Toaster webserver has started 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>
2016-04-29toaster: bin/toaster Add help text for unrecognised commandMichael Wood
Add help text for unrecognised or missing command for toaster script Remove assumption that no command is 'start' as the default. 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>
2016-04-29bitbake: Switch to post release versionRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-06Update version to 1.30.0Richard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-06toaster: export BBBASEDIR variableEd Bartosh
This variable will be used in localhost controller code to determine correct bitbake location, so it has to be exported. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-06toaster: update conf/local.confEd Bartosh
Added 'INHERIT+="toaster buildhistory"' line to the conf/local conf when Toaster starts. It should make commandline builds to provide all required information to Toaster backend. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-06toaster: set BITBAKE_UI environment variableEd Bartosh
Set BITBAKE_UI variable to 'toastergui' for command line builds to use toasterui as a default ui module for bitbake. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-06toaster: get rid of noui optionEd Bartosh
noui command line option doesn't makes sense anymore as toaster doesn't run bitbake. It should be safe to to remove it. The purpose of this option was to skip running bitbake observer process. This was never used before as it's not possible to run toaster build without running observer. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-04-06toaster: don't start bitbake serverEd Bartosh
>From now on toaster script will not run bitbake server. It will be started by runbuilds and stopped after the build. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-31bitbake: Don't limit traceback lengths to arbitrary valuesRichard Purdie
There appears to have been a lot of copy and pasting of the code which prints tracebacks upon failure and limits the stack trace to 5 entries. This obscures the real error and is very confusing to the user it look me an age to work out why some tracebacks weren't useful. This patch removes the limit, making tracebacks much more useful for debugging. [YOCTO #9230] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-30Bump version to 1.29.1Richard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-02toaster: cleanup of bin/toaster startup codebrian avery
This cleanup fixes a few issues: 1) Removes the superflous code to set toasterconf.json - this isn't used and referenced meta-yocto 2) Changes exit to return so we don't surprise the user by exiting their shell - this is necessary because it is being sourced 3) Removes the last references to the old TOASTER_MANAGED variable - this is historical and no longer used. 4) Adds -t parameter to lsof - This stops it from dying on odd filesystems and is much faster since all we are using are processes anyway 5) Handles start and stop as params - it was easy to confuse the script especially if we were calling it with parameters. - if start/stop isn't specified, it will still toggle 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>
2016-02-12Bump version post release to 1.29.0Richard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-04lib/bb: Add expansion parameter to getVarFlagRichard Purdie
This sets the scene for removing the default False for expansion from getVarFlag. This would later allow True to become the expand default. On the most part this is an automatic translation with: sed -e 's:\(\.getVarFlag([^,()]*, [^,()]*\)):\1, False):g' -i `grep -ril getVar *` There should be no functional change from this patch. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-31cooker, bitbake-worker: Fix spelling of "received"Phil Blundell
I before E, except after C... Signed-off-by: Phil Blundell <pb@pbcl.net> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-29bitbake: Set process names to be meaninfulRichard Purdie
This means that when you view the process tree, the processes have meaningful names, aiding debugging: $ pstree -p 30021 bash(30021)───KnottyUI(115579)───Cooker(115590)─┬─PRServ(115592)───{PRServ Handler}(115593) ├─Worker(115630)───bash:sleep(115631)───run.do_sleep.11(115633)───sleep(115634) └─{ProcessEQueue}(115591) $ pstree -p 30021 bash(30021)───KnottyUI(117319)───Cooker(117330)─┬─Cooker(117335) ├─PRServ(117332)───{PRServ Handler}(117333) ├─Parser-1:2(117336) └─{ProcessEQueue}(117331) Applies to parse threads, PR Server, cooker, the workers and execution threads, working within the 16 character limit as best we can. Needed to tweak the bitbake-worker magic values to tell the workers apart. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-22toaster: run bitbake server with --read optionEd Bartosh
Toaster script run bitbake with --postread conf/toaster.conf. It turned out that variables set this way don't influence the build. Changing --postread to --read makes bitbake to read variables earlier and should fix this issue. [YOCTO #8781] Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-16toaster: increase timeoutEd Bartosh
Sometimes Toaster connection to the bitbake server fails with this error in the log: ERROR: Could not connect to server 0.0.0.0:46572 : Could not register UI event handler It happens more often on slow machines. Increasing timeout after restarting bitbake should fix this issue. [YOCTO #8776] Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-12-18toaster: remove 2 confusing parametersEd Bartosh
Removed nobrowser and brbe script parameters as both are confusing and nobrowser is not used anywhere. brbe parameter usage can only be justified if toaster doesn't work properly and user has to manually connect toaster to running bitbake server. Even in this scenario it's very unlikely to achieve as toaster script is not designed for this kind of usage. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>