aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/contrib
AgeCommit message (Collapse)Author
2016-09-03scripts: 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> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-03scripts/contrib: update scripts for changes to internal APIPaul Eggleton
The multiconfig changes altered some of the functions being called here, so update the calls. Make use of the new Tinfoil.parse_recipe_file() function to make parsing easier. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-08-25build-perf-test-wrapper.sh: make workdir configurableMarkus Lehtonen
New command line argument '-w' may be used to specify work dir other than the default <GIT_DIR>/build-perf-test. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-08-25build-perf-test-wrapper.sh: make archive dir configurableMarkus Lehtonen
Add new command line argument '-a' that can be used to define the directory where results (tarballs) are archived. Giving an empty string disables archiving which makes sense if you store results in Git. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-08-25build-perf-test-wrapper.sh: allow saving results in GitMarkus Lehtonen
Add new command line argument '-C' that allows saving results in a Git repository. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-08-25build-perf-test-wrapper.sh: parse args with getoptsMarkus Lehtonen
Use getopts for parsing the command line. This changes the usage so that if a commit (to-be-tested) is defined it must be given by using '-c', instead of a positional argument. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-08-25python-3.5-manifest: Add argparse moduleFabio Berton
Adding argparse module from Python's standard library. This allow use argparse without installing all python-misc modules. For compatibility, add python3-argparse as RDEPENDS to python3-misc. Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-08-25python-3.5-manifest: Rename Queue module to queueFabio Berton
The Queue module has been renamed to queue in Python 3. Signed-off-by: Fabio Berton <fabio.berton@ossystems.com.br> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-08-23python-3.5-manifest.inc: the signal module RDEPENDS on enumRobert Yang
Fixed: $ python3 >>> import signal Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/path/to/sdk/sysroots/x86_64-pokysdk-linux/usr/lib/python3.5/signal.py", line 4, in <module> from enum import IntEnum as _IntEnum ImportError: No module named 'enum' Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-08-17python3.5-manifest: Fixes several dependencies on the newest python3Alejandro Hernandez
This patch adds the following packages: python3-enum (needed by python3-git), python3-selectors (needed by python3-subprocess), python3-signal (needed by python3-subprocess), and it also fixes the following ones with missing dependencies: python3-subprocess, python3-compression, python3-datetime [YOCTO #10127] [YOCTO #10124] [YOCTO #10122] Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-08-17graph-tool: update to new networkx API, be iterativeRoss Burton
Update the dot parser to the new networkx API (using pydotplus to parse). Also, switch the path display to output the paths as they are found instead of collecting them into a list, so output appears sooner. Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-08-17python-3.5-manifest: Add some missing RDEPENDSKyle Russell
ctype's util.py needs subprocess lang's inspect.py needs importlib.machinery math's random.py needs crypt's hashlib subprocess imports threading Signed-off-by: Kyle Russell <bkylerussell@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-08-01uncovered: list uncovered python modulesEd Bartosh
This bash script prints list of modules uncovered by oe-selftest or any other test that produces coverage report. It expects coverage report on its stdin and a directory to look for python modules as a command line parameter, e.g. coverage report --rcfile=build/.coveragerc | ./scripts/contrib/uncovered bitbake/ should print list of uncovered python modules from bitbake/ directory tree to stdout. [YOCTO #9809] Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-07-20python3: update manifest RDEPENDS for importlib and compression packagesDerek Straka
zipfile.py has dependencies on importlib, threading, and shell importlib has a dependency on lang operator and contextlib added to the lang package instead of falling into misc Signed-off-by: Derek Straka <derek@asterius.io>
2016-07-12python3: Add compression to python3-shell dependenciesJussi Kukkonen
python3-shell needs python3-compression for tarfile. Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-07-12graph-tool: convert to python3Maxin B. John
move graph-tool to python3 Signed-off-by: Maxin B. John <maxin.john@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-07-12scripts/contrib/devtool-stress: exclude more recipes by defaultPaul Eggleton
These recipes can't be used with devtool because they can't be unpacked in the normal way. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-07-12scripts/contrib/devtool-stress: skip incompatible recipesPaul Eggleton
If devtool returns exit code 4 then record the recipes as "skipped" rather than "failed" - these are recipes we know cannot work (usually because they don't provide any source). Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-07-01scripts/contrib: introduce build-perf-test-wrapper.shMarkus Lehtonen
A shell script wrapper around oe-build-perf-test script. The purpose of this wrapper is to act as a executor script, making it possible to run the tests with a single command. The wrapper script initializes the build environment, runs oe-build-perf-test and archives the results. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-06-14scripts: ensure not specifying subcommand shows help textPaul Eggleton
With Python 2, argparse subparsers behaviour in Python 2 was to print the usage information if the subparsers argument wasn't specified. However, with Python 3.2.3 and later a subparsers argument is not required by default, leading to errors when no arguments are specified: AttributeError: 'Namespace' object has no attribute 'func' Restore the previous desired behaviour of showing the help text for devtool, recipetool and the devtool-stress script by setting subparsers.required to True. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-02scripts: python3: change python to python3 in shebangEd Bartosh
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-02scripts: python3: fix urllib importsEd Bartosh
Some functions and classes have been moved from urllib[2] to urllib.request and urllib.error in python 3. Used new imports to make the code working in python 3. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-02scripts: python3: use new style except statementEd Bartosh
Changed old syle except statements 'except <exception>, var' to new style 'except <exception> as var' as old style is not supported in python3. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-02scripts: Rename ConfigParser -> configparser for python3Ed Bartosh
The ConfigParser API was renamed to configparser in python 3. Renamed ConfigParser -> configparser in scripts/ to make the code working in python 3. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
2016-06-02scripts: Fix deprecated dict methods for python3Ed Bartosh
Replaced iteritems -> items, itervalues -> values, iterkeys -> keys or 'in' Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
2016-06-01scripts: python3: Use print functionEd Bartosh
Used print function instead of print statement to make the code work in python 3. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-21meta/scripts: python3: rename file -> openRichard Purdie
file() API doesn't exist in python 3, convert to open(). Also handle some cases where files aren't closed. Compatible with python 2.7. [Contributions from Ed and Richard] Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-19mkefidisk.sh: mount images as read-onlyRaymond Tan
Mount the hddimg and rootfs.img as read-only when creating the bootable image on the medium. Otherwise, the md5 checksum values of the hddimg will be altered. As this changed checksum value might cause issue for users whom would reuse the hddimg. Signed-off-by: Raymond Tan <raymond.tan@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-06ddimage: if 'pv' is installed, use itChristopher Larson
This gives us a progress bar for the image write, which is quite helpful. See https://www.ivarch.com/programs/pv.shtml. Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-04-08build-perf-test: add eSDK installed size to metricsRoss Burton
Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-03-12python: move ast module into python-coreRoss Burton
The compile() method returns objects that inherit from ast.AST so it's best that python-core contains this class. [YOCTO #8684] Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-02-11python: merge python-elementtree into python-xmlRoss Burton
python-xml depends on python-elementtree as the latter just contains a C library used by the former. However there's no point to this split apart from increasing the number of packages, so merge -elementtree into python-xml. Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-02-04python-distutils: add missing dependency on python-emailDominique Hunziker
Signed-off-by: Dominique Hunziker <dominique.hunziker@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-01-24build-perf-test.sh: add eSDK testingMarkus Lehtonen
Add simple initial eSDK test. Currently, only download size and installation time of eSDK is measured. The eSDK to be tested is generated from the same image that the other tests are run for. This patch will add two new fields to the global results log and that needs to be taken into account when examining the results. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-24build-perf-test.sh: more generic timing functionMarkus Lehtonen
Make it possible to time also other than bitbake commands. The name of the log file is changed from bitbake.log to commands.log. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-19python-setuptools: Upgrade to 19.2Alejandro Hernandez
Upgrades python-setuptools to 19.2, easy_install works out of the box adds the package python-plistlib to the manifest as it is needed by setuptools now, and also updates runtime dependencies Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-01-07mkefidisk.sh: add boot log on consoleTrevor Woerner
Hooking up a serial console is a "developer mode", the chances are pretty good developers are interested in watching the kernel boot log on the console so they can spot any problems or diagnose any failed boots (e.g. can't find root fs). Signed-off-by: Trevor Woerner <twoerner@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-01-07mkefidisk.sh: add startup script for automated bootTrevor Woerner
Regardless of which image is built using which layers, try to ensure the image on the SD device being prepared is the one that is booted automatically when the board is powered. Signed-off-by: Trevor Woerner <twoerner@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-12-22scripts: print usage in argparse-using scripts when a command-line error occursPaul Eggleton
For scripts that use Python's standard argparse module to parse command-line arguments, create a subclass which will show the usage the usage information when a command-line parsing error occurs. The most common case would be when the script is run with no arguments; at least then the user immediately gets to see what arguments they might need to pass instead of just an error message. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-12-01python3: Upgrade from 3.4.3 to 3.5Alejandro Hernandez
python3-native_3.4.3.bb -> python3-native_3.5.0.bb: - changed version - changed cheksum - no license change, just dates python3_3.4.3.bb -> python3_3.5.0.bb: - changed version - changed cheksum - no license change, just dates New: - use_packed_importlib.patch: Fixes importlib on cross-compile environments Rebased: - Manifest - 000-cross-compile.patch - 020-dont-compile-python-files.patch - 04-default-is-optimized.patch - python-3.3-multilib.patch - distutils3-base.bbclass - distutils3-native-base.bbclass - python3native.bbclass Upstream: - makerace.patch Misc: - pip2 is handled as default on major distros, modified python3-pip to leave /usr/bin/pip available for pip2 - Fixed importing pip3 from python3 interpreter Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-11-16verify-homepage: fix recipe file selectionPaul Eggleton
* We need to check all recipe files, not just the preferred ones (i.e. we have multiple recipes for different versions of the same piece of software). Print the recipe file name (without path) so we can tell the difference between them. * We can skip BBCLASSEXTENDed variants of recipes Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-11-16verify-homepage: tidy up output and commentsPaul Eggleton
* Set up and use a proper logger * Tweak output messages and comments Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-11-16verify-homepage: get expanded HOMEPAGE valuePaul Eggleton
We tend not to use any variables in HOMEPAGE values, but that doesn't mean we would never do so. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-11-16verify-homepage: use scriptpath to find bitbake pathPaul Eggleton
We have shared code for this, let's use it. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-09-22scripts/contrib: add devtool stress testerPaul Eggleton
Add a script to run "devtool modify" followed by a build on every target recipe in the environment (with the option to skip/resume from/only include specific recipes). This takes far too long to run as an oe-selftest test but is still something that is useful to be able to run. There's also a slightly quicker mode that just runs "devtool extract" on each recipe. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-21python3-debugger: Adds pkgutils dependency to pdbAlejandro Hernandez
python3-debugger fails to be invoked to debug other scripts complaining about not being able to import pkutil, this patch adds pkgutil as a dependency for python3-debugger fixing the issue. [YOCTO #8334] Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-09-21python3-debugger: fix importlib dependencyAlejandro Hernandez
python3-debugger (pdb) needs importlib as a dependency, if not included it produces an error when importing pdb, making pdb unusable, this patch adds importlib dependency fixing the issue. {YOCT0 #8333] Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-09-16mkefidisk: Create interactive menu for the scriptBruno Bottazzini
If it is passed only the image parameter, it will show some interactive options to help to conclude the script. With this patch it will detect devices available in the machine, asking to choose what it is wanted to be flashed. it will suggest the target device. If it is a SD card the suggestion is /dev/mmcblk0. If it is a pendrive it will suggest to use /dev/sda. Signed-off-by: Bruno Bottazzini <bruno.bottazzini@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-09-12buildstats: Outputs 'task recipe elapsed-time' from each buildstats' recipeLeonardo Sandoval
Given a 'buildstats' path (created by bitbake when setting USER_CLASSES ?= "buildstats" on local.conf) and task names, outputs '<task> <recipe> <elapsed time>' for all recipes. Elapsed times are in seconds, and task should be given without the 'do_' prefix. Some useful pipelines 1. Tasks with largest elapsed times $ buildstats.sh -b <buildstats> | sort -k3 -n -r | head do_compile perl-5.20.0-r1 221.82 do_configure gettext-native-0.19.4-r0 140.34 do_compile openssl-native-1.0.2a-r0 107.48 do_compile openssl-1.0.2a-r0 102.10 do_configure perl-native-5.20.0-r0 90.70 do_configure gettext-0.19.4-r0 88.17 do_compile gcc-cross-i586-4.9.2-r0 83.98 do_configure m4-native-1.4.17-r0 83.44 do_compile qemu-native-2.2.0-r1 71.69 do_compile glibc-2.21-r0 60.88 2. Min, max, sum per task $ buildstats.sh | datamash -t' ' -g1 min 3 max 3 sum 3 | sort -k4 -n -r do_configure 0.03 140.34 1968.66 do_compile 0.01 221.82 1664.44 do_install 0.03 40.31 330.45 do_populate_sysroot 0.11 34.45 229.23 do_unpack 0.01 36.1 193.54 do_patch 0.01 9.2 62.07 do_fetch 0.01 6.66 32.13 do_populate_lic 0.09 1.65 30.7 Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-08-01python3: remove 2to3 symlink from package python3-2to3Dominic Sacré
The 2to3 symlink conflicts with its Python 2 equivalent in package python-2to3. The Python 3 version of the tool is still available as 2to3-3.4. Signed-off-by: Dominic Sacré <dominic.sacre@gmx.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>