diff options
author | Markus Lehtonen <markus.lehtonen@linux.intel.com> | 2016-08-26 10:33:09 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-09-03 09:58:29 +0100 |
commit | 69b3c63e32d09ea4a41b21daacdff6bf1fc447c1 (patch) | |
tree | a744b1d9cfd216fcc4eee561b89e795da16b2f78 /meta/lib/oeqa/buildperf/base.py | |
parent | 3efbd49fd80d2b349a8fd44dbcd509168dbc1061 (diff) | |
download | openembedded-core-69b3c63e32d09ea4a41b21daacdff6bf1fc447c1.tar.gz openembedded-core-69b3c63e32d09ea4a41b21daacdff6bf1fc447c1.tar.bz2 openembedded-core-69b3c63e32d09ea4a41b21daacdff6bf1fc447c1.zip |
oeqa.buildperf: make tests independent
Add test set-up functionality so that the individual tests do not depend
on each other. This should make sure that a failure in one test does not
affect the results of another test. The patch also makes it reasonable
to run only a subset of the tests by using the --run-tests option.
The increase in total execution time of the full suite - caused by the
additional set-up steps - is insignificant because normally no
additional tasks need to be run. The previous test has already done all
set-up work.
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa/buildperf/base.py')
-rw-r--r-- | meta/lib/oeqa/buildperf/base.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/meta/lib/oeqa/buildperf/base.py b/meta/lib/oeqa/buildperf/base.py index e4a79486f2..83439f1bdb 100644 --- a/meta/lib/oeqa/buildperf/base.py +++ b/meta/lib/oeqa/buildperf/base.py @@ -257,6 +257,7 @@ class BuildPerfTestCase(unittest.TestCase): """Base class for build performance tests""" SYSRES = 'sysres' DISKUSAGE = 'diskusage' + build_target = None def __init__(self, *args, **kwargs): super(BuildPerfTestCase, self).__init__(*args, **kwargs) @@ -271,6 +272,12 @@ class BuildPerfTestCase(unittest.TestCase): self.times = [] self.sizes = [] + def setUp(self): + """Set-up fixture for each test""" + if self.build_target: + self.log_cmd_output(['bitbake', self.build_target, + '-c', 'fetchall']) + def run(self, *args, **kwargs): """Run test""" self.start_time = datetime.now() |