diff options
author | Markus Lehtonen <markus.lehtonen@linux.intel.com> | 2016-06-29 20:11:28 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-08-17 10:35:24 +0100 |
commit | 36f58b5172d4e2e182aa447fb3ec4d1ac9f6820d (patch) | |
tree | fc27c752de16598b64e8c61ab7742da0c2bcf51c /scripts | |
parent | 09590ac76a19ee1b1b4a9188f7fce5029f0de52a (diff) | |
download | openembedded-core-36f58b5172d4e2e182aa447fb3ec4d1ac9f6820d.tar.gz openembedded-core-36f58b5172d4e2e182aa447fb3ec4d1ac9f6820d.tar.bz2 openembedded-core-36f58b5172d4e2e182aa447fb3ec4d1ac9f6820d.zip |
oe-build-perf-test: suppress logger output when tests are being run
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>
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/oe-build-perf-test | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/scripts/oe-build-perf-test b/scripts/oe-build-perf-test index 786c715dfc..4e6d738374 100755 --- a/scripts/oe-build-perf-test +++ b/scripts/oe-build-perf-test @@ -133,10 +133,19 @@ def main(argv=None): out_dir = args.out_dir.format(date=datetime.now().strftime('%Y%m%d%H%M%S')) setup_file_logging(os.path.join(out_dir, 'output.log')) - # Run actual tests archive_build_conf(out_dir) runner = BuildPerfTestRunner(out_dir, verbosity=2) + + # Suppress logger output to stderr so that the output from unittest + # is not mixed with occasional logger output + log.handlers[0].setLevel(logging.CRITICAL) + + # Run actual tests result = runner.run(suite) + + # Restore logger output to stderr + log.handlers[0].setLevel(log.level) + if result.wasSuccessful(): if args.globalres_file: result.update_globalres_file(args.globalres_file) |