aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
AgeCommit message (Collapse)Author
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-07-01oe-build-perf-test: add --out-dir command line argumentMarkus Lehtonen
The new option defines the output directory for the test result data. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-07-01oe-build-perf-test: enable lockingMarkus Lehtonen
Makes it possible to guard that multiple tests are not run in parallel. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-07-01oe-build-perf-test: implement --globalres-file optionMarkus Lehtonen
Using this option the script appends test results into a 'global results file'. A CSV-formatted output of the results. This option is to provide compatibility with the old build-perf-test.sh. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-07-01oe-build-perf-test: enable logging into fileMarkus Lehtonen
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-07-01oeqa.buildperf: implement BuildPerfTestRunner classMarkus Lehtonen
The new class is responsible for actually running the tests and processing their results. This commit also adds a decorator function for adding new tests. No automatic test discovery, at least yet. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-07-01oeqa.buildperf: functionality to drop kernel cachesMarkus Lehtonen
Add a new utility class for dropping Linux kernel caches. It uses sudo and tee to write to the drop_caches file. Checking if the user has the permissions to drop caches (without a password) is done by trying to writing an invalid value to the drop_caches file. This way, we will find if writing (with tee) is possible but not really dropping caches, yet. User can avoid giving the password by adding something like: <user> ALL = NOPASSWD: /usr/bin/tee /proc/sys/vm/drop_caches to the system sudoers file. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-07-01oe-build-perf-test: add pre-run sanity checkMarkus Lehtonen
The script will be required to be run in an initialized bitbake build environment. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-07-01scripts: introduce oe-build-perf-testMarkus Lehtonen
Initial wireframe for re-writing build-perf-test.sh in Python. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-07-01recipetool: recognize less common makefile namesNathan Lynch
GNU make looks for "makefile" and "GNUmakefile" in addition to "Makefile", so add these other names to the heuristic for detecting a make-based project. Signed-off-by: Nathan Lynch <nathan_lynch@mentor.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-07-01test-dependencies.sh: Strip also '\.bb; .*' before adding failed recipe to ↵Martin Jansa
list of failed * format of bitbake tasks changed in: 2c88afb taskdata/runqueue: Rewrite without use of ID indirection -ERROR: Task 4 (/OE/build/oe-core/openembedded-core/meta/recipes-devtools/rpm/sftp.bb, do_fetch) failed with exit code '1' +ERROR: Task /OE/build/oe-core/openembedded-core/meta/recipes-devtools/rpm/sftp.bb:do_fetch (/OE/build/oe-core/openembedded-core/meta/recipes-devtools/rpm/sftp.bb:do_fetch) failed with exit code '1' so strip not only '\.bb, .*' used before, but also '\.bb;.*' to drop the task name to get recipe name. * for more details see: http://lists.openembedded.org/pipermail/openembedded-core/2016-June/123132.html * without this change you can see test-dependencies.sh trying to rebuild packages like: Building recipe: fbprogress (6/21) Building recipe: fbprogress.bb:do (7/21) where the later of course doesn't exist as a recipe Signed-off-by: Martin Jansa <Martin.Jansa@gmail.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-14devtool: reset: allow specifying multiple recipesPaul Eggleton
Allow specifying more than one recipe on the devtool reset command line. Also tweak the help text slightly. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-14devtool: tweak README in created workspace layerPaul Eggleton
Clarify slightly the intended usage of the workspace layer. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-12buildhistory-diff: suggest correct version of PythonGitEd Bartosh
If buildhistory-diff can't import git module it throws error message suggesting to install it. Due to the move to Python 3 the suggested package name and version became outdated. Changed package name to python3-git and version to >= 0.3.4 as GitPython supports Python 3 starting from 0.3.4. [YOCTO #9741] Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-06-12oe-pkgdata-util: new option to provide full info for binary package(s)Alexander D. Kanevskiy
New option can be used for displaying full information about binary package(s), including name, full version, recipe name, recipe full version and package size. This information can be useful inside custom buildhistory class to produce detailed image manifest for further analysis. List of packages can be specified as command line arguments or can be read from file (e.g. from existing image manifest). Warning: In case of image manifest is used as input outside of build process, be aware that pkgdata might change since the time image was built. Output format: {PKG} [PKGE:]{PKGV}[-{PKGR}] {PN} [PE:]{PV}[-{PR}] {PKGSIZE} Signed-off-by: Alexander D. Kanevskiy <kad@kad.name> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-06-12runqemu-internal: Update the qemuzynq boot optionsAlistair Francis
The current qemuzynq options were causing QEMU to exit instead of booting as the QEMU Zynq-7000 machine does not have virtio or display devices. Signed-off-by: Alistair Francis <alistair.francis@xilinx.com> Reported-by: Arno <star@gmx.li> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-06-12runqemu: Add suport for qemuzynqmpAlistair Francis
Signed-off-by: Alistair Francis <alistair.francis@xilinx.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-06-07oe-pkgdata-util: fix AttributeErrorEd Bartosh
The default arparse behaviour in Python 2 and early versions of Python 3 was to print usage message if no subcommands provided by user. In Python >= 3.2.3 subparser has to have attribute 'required' set to True to behave similar way. By default subparser.required attribute is set to False, usage message is not printed and code continues to be executed. oe-pkgdata-util code raises AttributeError exception in this case: AttributeError: 'Namespace' object has no attribute 'func' Fixed this by setting subparser.required to True. [YOCTO #9711] Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-06meta: Drop swabberRichard Purdie
swabber hasn't been used in years and never did work well in the first place. Remove its recipes, class and configuration. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-03scripts/pybootchart: Fix print statementRichard Purdie
This was broken with the python3 fixes. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-03send-error-report: encode data to bytesEd Bartosh
Encoded data before sending it through http as urllib expecting bytes. Fixed TypeError: POST data should be bytes or an iterable of bytes. It cannot be of type str. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-03image-live, image-vm, wic: Remove fs size workaroundJussi Kukkonen
Since mtools has been patched to live with filesystems with sizes not divisible by sectors-per-track, we no longer need to try to set the size based on our guess of the sectors-per-track dosfstools is going to use. Signed-off-by: Jussi Kukkonen <jussi.kukkonen@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: decode subprocess outputEd Bartosh
stdeout and stderr content returned by subprocess API has different types in Python 3(bytes) and Python 2(string). Decoding it to 'utf-8' makes it unicode on both pythons. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-02combo-layer: python3: use tempfile.TemporaryFileEd Bartosh
Used tempfile.TemporaryFile() API instead of deprecated os.tmpfile(). Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-02dirsize: python3: fix TypeError: unorderable typesEd Bartosh
Python 3 ignores the __cmp__() method and doesn't have cmp() builtin function. This caused sorted() call to raise TypeError: unorderable types: Record() < Record() Removing __cmp__ method and implementing __lt__ should solve the problem as __lt__ is the only method needed for sort[ed] to work. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-02combo-layer: python3: import reduceEd Bartosh
Reduce is not a builtin function in python3. It has to be imported from functools. 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 metaclass syntaxEd Bartosh
Used metaclass=<metaclass> syntax instead old __metaclass__ = <metaclass> as only new one is supported 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: get rid of __future__ importsEd Bartosh
Removed print_function and with_statement imports from __future__ as they're supported by python 3 by default. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-02scripts: python3: rename raw_input to inputEd Bartosh
Renamed raw_input to input as raw_input does not exist in python 3. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-02ksize.py: python3: get rid of strings.joinEd Bartosh
Used join method instead of strings.join as stings.join doesn't exist 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: 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: python3: convert iterables to listsEd Bartosh
Converted return value of items() keys() and values() to lists when dictionary is modified in the loop and when the result is added to the list. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-02classes/lib: Complete transition to python3Richard Purdie
This patch contains all the other misc pieces of the transition to python3 which didn't make sense to be broken into individual patches. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-02scripts: use python3 in shebangEd Bartosh
As most of oe-test cases work for devtool and recipetool it makes sense to switch both tools to python 3 by explicitly referring to python3 in their shebangs. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
2016-06-02scripts: Fix urlparse imports for python3Ed Bartosh
Used urllib.parse instead of urlparse to make code working in python 3. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
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 encoding errors for python3Ed Bartosh
Moved call of decode('utf-8') as close as possible to call of subprocess API to avoid calling it in a lot of other places. Decoded binary data to utf-8 where appropriate to fix devtool and recipetool tests in python 3 environment. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
2016-06-02scripts: Replace basestring -> str for python3Ed Bartosh
Python 3 doesn't have basestring type as all string are unicode strings. 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-02wic: encode help textEd Bartosh
Encoded help text before sending it to pager.communicate as it expects binary. [YOCTO #9412] Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-02wic: use python3 in shebangEd Bartosh
Switched scripts/wic to use python3 as a default python interpreter. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-02classes/lib: Update xrange -> range for python3Richard Purdie
xrange() no longer exists in python 3, use range() Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-02classes/lib: Update to explictly create lists where neededRichard Purdie
Iterators now return views, not lists in python3. Where we need lists, handle this explicitly. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-02classes/lib: Update to match python3 iter requirementsRichard Purdie
python3 standardises its use of iteration operations. Update the code to match the for python3 requires. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-01oe-buildenv-internal: Update to python3Richard Purdie
Check that 'python' is a python v2 since that is what we assume everywhere and upstream python devs recommend. We can need both python2 and python3 available since we don't control the software we might download and run. Also check that python 3 is >= 3.4.0, our minimum version for bitbake. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-01scripts/lnr: update for python3Allen Wild
Change shebang line to python3 and add parentheses to print Signed-off-by: Allen Wild <allenwild93@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
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>