summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2016-05-25fetch2: fix unpacking of deb packagespaule/bb-debPaul Eggleton
deb packages in modern Debian versions have the data tarball compressed with xz rather than gzip, and thus explicitly extracting data.tar.gz fails. Unfortunately ar doesn't support wildcards matching items to extract, so we have to find out what the name of the file is first and then extract it, relying on tar to figure out how to unpack it based on the filename rather than doing it with pipes and making that determination ourselves. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2016-05-24classes/base.bbclass: Fix missing getVarFlag parameterRichard Purdie
[YOCTO #9603] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-21cooker: Fix parse progress for python3Richard Purdie
Under python the type conversions can mean there are float values used for triggering the parse progress events which then fails. Add an explict int() conversion to ensure the parse events are generated under python3. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-20toaster: tests builds Add SSTATE_MISS as a valid condition for tc=833Michael Wood
Task.SSTATE_NA and Task.SSTATE_MISS are both valid conditions for the condition that a Task.OUTCOME_COVERED and Task.OUTCOME_PREBUILT. 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-20toaster: tests build Add a test for a build of core-image-minimalMichael Wood
This is a port of the oe self test to the django test framework from oe-core meta/lib/oeqa/selftest/_toaster.py 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-20toaster: tests Add a BuildTest helper classMichael Wood
Add a helper class for running build tests. Subclass this and call the build method to get setup for running tests on the resulting data from a build. 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-20toaster: Add a specific test settings fileMichael Wood
When running certain tests we want a particular database specified. When bitbake toaster ui is being tested pass it these test settings so that it uses the same database as the unit tests running. 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-20toaster: runbuilds move the execution sequence out of the poll loopMichael Wood
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. 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-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-20toaster-tests: tests for project configSujith H
Add basic tests to validate the value user types in the text box for IMAGEFS_TYPES. Added a test case to show the checkbox get automatically selected when user types value available in the check list. Added a test case to verify if the check box is enabled then the text box should also get updated accordingly. [YOCTO #7828] Signed-off-by: Sujith H <sujith.h@gmail.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-20toaster: projectconf Small tweaks to IMAGE_FSTYPES formBelen Barros Pena
Add a label to clarify the purpose of the first input field, replace <p> with <label> for the second set of controls, and give some top margin to the validation message. Signed-off-by: Belen Barros Pena <belen.barros.pena@linux.intel.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-20toaster: handle multiple imagefs typesSujith H
This functionality helps users to add custom image fs types available other than the checkboxes in the UI. User can add imagefs types in the text box and use them in the build. [YOCTO #7828] Signed-off-by: Sujith H <sujith.h@gmail.com> Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-19cooker: Improve taskgraph file handlingRichard Purdie
Use open() instead of file() and close files when finished with them. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-18codeparser: Increase cache version after code parser dependency changesRichard Purdie
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-18bb.codeparser: track variable flag referencesChristopher Larson
Previously we only tracked the flags (minus excluded) of variables we depend on, but not the flags we use explicitly. Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-18Provide LAYERDIR_RE for layer.confChristopher Larson
This variable is a regex-escaped version of LAYERDIR, for safer use in BBFILE_PATTERN, so as to avoid issues with regex special characters in the layer path. [YOCTO #8402] Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-18cache: Increase cache version after task checksum calculation changesRichard Purdie
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-17bb.cooker: show limited traceback for parsing ExpansionErrorChristopher Larson
It's useful to see tracebacks for ExpansionErrors, but only if we skip the leading bitbake-internal elements, otherwise we see elements of the expansion process. As one example: Before: ERROR: ExpansionError during parsing /scratch/yocto-new/external-as-needed/poky/meta/recipes-core/glibc/glibc-locale_2.23.bb: Failure expanding variable PV[:=], expression was ${@get_external_libc_version(d)} which triggered exception AttributeError: 'module' object has no attribute 'external' After: ERROR: ExpansionError during parsing /scratch/yocto-new/external-as-needed/poky/meta/recipes-core/glibc/glibc-locale_2.23.bb Traceback (most recent call last): File "PV[:=]", line 1, in <module> File "/scratch/yocto-new/external-as-needed/meta-sourcery/recipes-external/glibc/glibc-external-version.inc", line 3, in get_external_libc_version(d=<bb.data_smart.DataSmart object at 0x7f05d2566950>): sopattern = os.path.join(d.getVar('base_libdir', True), 'libc-*.so') > found_paths = oe.external.find_sysroot_files([sopattern], d) if found_paths: ExpansionError: Failure expanding variable PV[:=], expression was ${@get_external_libc_version(d)} which triggered exception AttributeError: 'module' object has no attribute 'external' 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-17knotty: Fix output buffering issuesRichard Purdie
We need to flush the footer removal, else it may not be outputted until the buffer is flushed as part of StreamHandler and this would lead to it removing the ERROR output just printed which is extremely confusing. Also ensure the footer is cleared before printing a summary as in some cases it wasn't being removed, also leading to user confusion. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-17siggen: Fixes to handle sigdata/siginfo files only containing basehash dataRichard Purdie
The signature data file comparison functions are meant to be able to handle data files containing just the base hash data. This had regressed in some places so add fixes to allow these comparisons to be made. The runtime components in the data files are optional. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-17toaster: don't show "Rebuild" button for cancelled cli buildsElliot Smith
[YOCTO #8515] Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-17toasterui: capture keyboard interrupts the same way as knottyElliot Smith
knotty captures two levels of keyboard interrupt: a single interrupt or two interrupts in a row. These then trigger stateShutdown and stateForceShutdown respectively. toasterui doesn't have an equivalent way of capturing interrupts and using them to shut down bitbake. Now that we are no longer using knotty + XMLRPCServer for our command line builds (since switching to per-project build directories), we see some odd side effects of this, such as builds continuing after they have been interrupted on the command line. Bring toasterui in line with knotty (copy-paste most of the code in knotty.py which deals with interrupts) so that a keyboard interrupt actually shuts down the bitbake server (if not in observe only mode). Additionally use the cancel_cli_build() method to set the Build status to CANCELLED in Toaster's db when we get keyboard interrupts. This means that builds interrupted on the command line show as cancelled (same as if they'd been cancelled from the Toaster UI), as specified in the UI designs. [YOCTO #8515] Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-17buildinfohelper: add method to set current build as CANCELLEDElliot Smith
This will be used from toasterui to cancel the current command-line build when a keyboard interrupt is captured. [YOCTO #8515] Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-16toaster: toastergui tests Fix toastertable testsMichael Wood
After clean ups remove api assumptions. Our table data often contains html snippets to display certain things such as dependency pop overs or simply links to other parts of the UI. Take these into account when testing the values of the table data. 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-16toaster: toastertables: Clean up and fix up a number of itemsMichael Wood
- Remove the unused 'computation' field - Remove the code to try to make the tables behave like an api - Remove custom JSON encoder in favour of DjangoJSONEncoder - Simplify get_data and add comments - Add exception type instead of using generic Exception - Clean up python style warnings 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-13toaster: use new syntax of except statementEd Bartosh
Used except 'except (<exception1>, <exception2>):' syntax as it's supported by python 2 and pythone 3. Old syntax 'except <exception1>, <exception2>:' is not supported by 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-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-13toaster: use 'in' instead of has_keyEd Bartosh
Dictionary method has_key is deprecated in python 2 and absent in python 3. Used '<key> in <dict>' statement to make the code working on 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-13server/process: Fix missing log messages issueRichard Purdie
Currently if the server dies, its possible that log messages are never displayed which is particularly problematic if one of those messages is the exception and backtrace the server died with. Rather than having the event queue exit as soon as the server disappears, we should pop events from the queue until its empty before exiting. This patch tweaks that code so that even if the server is dead and we're going to exit, we return any events left in the pipe. This makes debugging certain failures much easier. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-13cooker/toasterui: Drop SEND_DEPENDS_TREE UI featureRichard Purdie
Now the event is sent unconditionally we can drop this feature as its no longer needed. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-13runqueue.py: always emit bb.event.DepTreeGeneratedPatrick Ohly
The data included in the event is useful for implementing a pre-build check that warns about unexpected components, for example because of an incorrect configuration or changed dependencies. Such a check can be done in a .bbclass that gets inherited globally. But in contrast to a UI, such a class cannot request that the event shall be emitted, and thus the event has to be emitted whether there is a consumer or not. This was done conditionally earlier out of concerns about the performance impact. But now events are handled more efficiently, so that concern no longer seems valid: in some simple testing (admittedly on a fast build workstation), the two lines (generating the data and emitting the event with it) only took about 0.05 seconds (measured with timeit). That was for a build with roughly 500 recipes (from pn-buildlist aka depgraph['pn']), triggered via the command line. That was even with a consumer of the data active and doing some work, so it should be even faster when there is no consumer. Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-13toaster: fix progress bar in MySQL environmentElliot Smith
When using MySQL, the project builds info delivered by MySQL differs from that delivered by SQLite: the former returns text values from the enumeration for Build outcomes, while the latter returns the integer value. This causes the progress bar JS to break, as it is expecting outcome strings. Modify the recent_build() method to include an outcomeText property for each Build object, then use this in the conditionals in the progress bar JS. [YOCTO #9498] Signed-off-by: Elliot Smith <elliot.smith@intel.com> Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-12main: Ensure exceptions are correctly displayedRichard Purdie
If the cooker fails to start, ensure a correct exception is displayed to the user. After handling any queued events simply re-raise the original exception else the output can be unclear. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-12cookerdata: Fix log messages and ensure we exitRichard Purdie
The string formatting wasn't correct and we should exit if we hit errors here similar to the other exception handlers. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-12event/msg: Pass formatted exceptionsRichard Purdie
python3 can't cope with the previous approach we were using to pass exceptions through the RPC. Avoid this by creating a formatted exception on the sender side. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-12fetch: Use OrderedDict for url parametersRichard Purdie
Without this, the dict can reorder causing sanity test failures. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-12main: Change warn() -> warning()Richard Purdie
This avoids a deprecation warning in python 3. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-12cooker: Fix log message syntaxRichard Purdie
Ensure we pass the string parameter correctly. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-12utils: Force bitbake to en_US.UTF-8 locale setting everywhereRichard Purdie
Under python 3, if we spawn python processes, we need to have a UTF-8 locale, else python's file access methods will use ascii. You can't change that mode once the interpreter is started so we have to ensure a locale is set. Ideally we'd use C.UTF-8 since OE already forces the C locale but not all distros support that and we need to set something. Was tempted to choose en_GB so colour gets spelt correctly :). This is in some ways pretty nasty, forcing it into the environment everywhere however we only have a limited number of ways of making everything work correctly and this beats having to add utf-8 encoding to every file access command. A similar change will be needed to bitbake.conf in OE. 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-12contrib/dump_cache.py, cache: Fix to use python 3 syntaxRichard Purdie
Some tweaks to use python 3 syntax in a python 2 compatible way. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-12knotty: Ensure consolelog file handle is closedRichard Purdie
If we don't close the console log file handle, python prints a warning about unclosed file handles upon exit which is annoying. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-12runqueue: Improve timestamp comparisonsRichard Purdie
python3 cares more about invalid type comparisons. Add break statements and better tests to make the code paths clearer and avoid type issues in python3. No code functionality change. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-12daemonize/prserv/tests/fetch: Convert file() -> open()Richard Purdie
Use python3 compatible functions. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-11toaster: tests browser Add test for creating a projectMichael Wood
Add browser tests for creating a project and test validation of duplicate project names. Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-11toaster: models Add missing import sysMichael Wood
Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-11toaster: ui handles duplicate project name in project pageSujith H
When already existing project name is typed by user, the ui pops up message regarding the existance of the project name. When an existing project is typed the save button will be disabled. Else user can proceed ahead by modifying the project name. [YOCTO #7005] Signed-off-by: Sujith H <sujith.h@gmail.com> Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-11toaster: ui handles duplicate project name in new project pageSujith H
When already existing project name is typed by user, the ui pops up message regarding the existance of the project name. [YOCTO #7005] Signed-off-by: Sujith H <sujith.h@gmail.com> Signed-off-by: Michael Wood <michael.g.wood@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>