oeqa.buildperf: add BuildPerfTestResult class

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.

(From OE-Core rev: 89eb37ef1ef8d5deb87fd55c9ea7b2cfa2681b07)

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Markus Lehtonen
2016-06-29 19:28:31 +03:00
committed by Richard Purdie
parent 3acf648f58
commit 09b9a4aeee
3 changed files with 86 additions and 70 deletions

View File

@@ -19,6 +19,7 @@ import errno
import fcntl
import logging
import os
import shutil
import sys
from datetime import datetime
@@ -78,6 +79,14 @@ def setup_file_logging(log_file):
log.addHandler(handler)
def archive_build_conf(out_dir):
"""Archive build/conf to test results"""
src_dir = os.path.join(os.environ['BUILDDIR'], 'conf')
tgt_dir = os.path.join(out_dir, 'build', 'conf')
os.makedirs(os.path.dirname(tgt_dir))
shutil.copytree(src_dir, tgt_dir)
def parse_args(argv):
"""Parse command line arguments"""
parser = argparse.ArgumentParser(
@@ -120,6 +129,7 @@ def main(argv=None):
# Run actual tests
runner = BuildPerfTestRunner(out_dir)
archive_build_conf(out_dir)
ret = runner.run_tests()
if not ret:
if args.globalres_file: