summaryrefslogtreecommitdiffstats
path: root/scripts/oe-build-perf-test
AgeCommit message (Collapse)Author
2019-12-15scripts/oe-build-perf-test: Use python3 from the environmentRichard Purdie
On test machines we have python3 available at alternative locations. Use these rather from the evnrionment rather than a hardcoded path. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-05-09meta/lib+scripts: Convert to SPDX license headersRichard Purdie
This adds SPDX license headers in place of the wide assortment of things currently in our script headers. We default to GPL-2.0-only except for the oeqa code where it was clearly submitted and marked as MIT on the most part or some scripts which had the "or later" GPL versioning. The patch also drops other obsolete bits of file headers where they were encoountered such as editor modelines, obsolete maintainer information or the phrase "All rights reserved" which is now obsolete and not required in copyright headers (in this case its actually confusing for licensing as all rights were not reserved). More work is needed for OE-Core but this takes care of the bulk of the scripts and meta/lib directories. The top level LICENSE files are tweaked to match the new structure and the SPDX naming. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-26oe-build-perf-test: pack all buildstat in one fileMarkus Lehtonen
Write out all buildstats into one big json file, instead of using multiple per-measurement files. Individual buildstats will be indexed using "<test_name>.<measurement_name>" as the key. Also, changes the per-testcase working directories into temporary directories that will be removed after test execution as there are no more per-testcase data files to store permanently. [YOCTO #10582] Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-02-15oe-build-perf-test: drop --commit-resultsMarkus Lehtonen
Drop support for committing results into Git repository. The functionality was not directly related to testing and feels unnecessary complication of the script. The functionality has been moved into a separate oe-git-archive script. [YOCTO #10582] Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-01-23oe-build-perf-test: remove unused imports and fix indentMarkus Lehtonen
[YOCTO #10590] Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-01-23oe-build-perf-test: save test metadata in a separate fileMarkus Lehtonen
The patch introduces a new metadata (.json or .xml) file in the output directory. All test meta data, e.g. git revision information and tester host information is now stored there. The JSON report format is slightly changed as the metadata is not present in results.json anymore. [YOCTO #10590] Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-01-23oe-build-perf-test: enable xml reportingMarkus Lehtonen
Add --xml command line option to oe-build-perf-test script for producing a test report in JUnit XML format instead of JSON. [YOCTO #10590] Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-09-30oe-build-perf-test: return 2 if some tests failedMarkus Lehtonen
Add a new return value '2' that indicates that some tests failed but there were no fatal errors (i.e. configuration mistakes or bugs in the tests themselves). Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-09-06oe-build-perf-test: fix log file pathMarkus Lehtonen
The --log-file command line argument was slightly broken as {out_dir} string replacement was not working as expected. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-03oe-build-perf-test: rename log file and implement --log-fileMarkus Lehtonen
Rename the (main) log file of the oe-build-perf-test script from 'output.log' to 'oe-build-perf-test.log'. Also, add a new command line option --log-file which makes it possible to use an alternative log file name/path, if needed. Note that the file name/path is relative to the output directory. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-03oe-build-perf-test: update globalres and git even if tests failedMarkus Lehtonen
Write globalres log file and commit results to Git even if some tests failed. Now that tests do not depend on each other there should be no risk of bogus results caused by test failures. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-08-25oe-build-perf-test: add {git_commit_count} keyword for --commit-results-tagMarkus Lehtonen
Makes it possible to create easily sortable tags. Also, the default tag format is updated to use the new keyword. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-08-25oe-build-perf-test: new {tag_num} keyword for --commit-results-tagMarkus Lehtonen
This makes it possible to create numbered tags, where the "basename" of the tag is the same and the only difference is an (automatically) increasing index number. This is useful if you do multiple test runs on the same commit. For example, using: --commit-results-tag {tester_host}/{git_commit}/{tag_num} would give you tags something like: myhost/decb3119dffd3fd38b800bebc1e510f9217a152e/0 myhost/decb3119dffd3fd38b800bebc1e510f9217a152e/1 ... The default tag format is updated to use this new keyword in order to prevent unintentional tag name clashes. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-08-25oe-build-perf-test: tag results committed to GitMarkus Lehtonen
Create a Git tag when committing results to a Git repository. This patch also implements --commit-results-tag command line option for controlling the tag name. The value is a format string where the following fields may be used: - {git_branch} - target branch being tested - {git_commit} - target commit being tested - {tester_host} - hostname of the tester machine Tagging can be disabled by giving an empty string to --commit-results-tag. The option has no effect if --commit-results is not defined. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-08-25oe-build-perf-test: pre-check Git repo when using --commit-resultsMarkus Lehtonen
Do a pre-check on the path that is specified with --commit-results before running any tests. The script will create and/or initialize a fresh Git repository if the given directory does not exist or if it is an empty directory. It fails if it finds a non-empty directory that is not a Git repository. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-08-25oe-build-perf-test: implement --commit-results-branchMarkus Lehtonen
A new command line option for defining the branch where results are commited. The value is actually a format string accepting two field names: - {git_branch} expands to the name of the target branch being tested - {tester_host} expands to the hostname of the tester machine The option has no effect if --commit-results is not used. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-08-25oe-build-perf-test: support committing results data to GitMarkus Lehtonen
Implement a new command line option '--commit-results' which commits the test results data into a Git repository. The given path must be an existing initialized local Git repository. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-08-25oe-build-perf-test: use absolute paths in cmdline argsMarkus Lehtonen
This is safer as the current working directory may change. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-08-25oe-build-perf-test: implement --run-tests optionMarkus Lehtonen
Makes it possible to run only a subset of tests. NOTE: The tests currently have (unwritten) dependencies on each other so use this option with care. Mainly for debugging. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-08-20oe-build-perf-test: align log message format with testrunner outputMarkus Lehtonen
The previous attempt on this was a bit erroneous, dropping time stamps completely although only the timestamp format should've been changed. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-08-17oe-build-perf-test: simplify stderr log formatMarkus Lehtonen
Remove timestamps from the stderr log in order to make the console output more readable, i.e. more in line with the output from unittest runner. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-08-17oe-build-perf-test: set-up file logging as early as possibleMarkus Lehtonen
So that the log file would not miss any records. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-08-17oe-build-perf-test: suppress logger output when tests are being runMarkus Lehtonen
Prevent logger from writing to stderr when the tests are being run by the TestRunner. During this time the logger output is only written to the log file. This way the console output from the script is cleaner and not mixed with possible logger records. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-08-17oe-build-perf-test: use new unittest based frameworkMarkus Lehtonen
Convert scripts/oe-build-perf-test to be compatible with the new Python unittest based buildperf test framework. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2016-08-17oeqa.buildperf: add BuildPerfTestResult classMarkus Lehtonen
The new class is derived from unittest.TextTestResult class. It is actually implemented by modifying the old BuildPerfTestRunner class which, in turn, is replaced by a totally new simple implementation derived from unittest.TestRunner. 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>