diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2016-10-13 15:44:18 -0700 |
---|---|---|
committer | Dylan Baker <dylan@pnwbakers.com> | 2016-11-10 10:50:31 -0800 |
commit | 22f31b6419cedfd80fb43eac8462303791ada9b3 (patch) | |
tree | f3bb037c5000561c1c32ba50cf62fc50de5b4302 /unittests | |
parent | 3d887afe4762c78f1b280789339c4e73c71bc2dd (diff) |
framework/profile: Don't merge profiles
Because we can copy profiles, we don't need to merge them to run more
than one of them. Instead we can simply have a list of profiles, and run
them one by one. One side effect of this is that tests will be run one
profile at a time, so if running with out the -1/--no-concurrency or
-c/--all-concurrent options tests will run in a sort of zipper pattern:
<p1 concurrent>, <p1 non-concurrent>, <p2 concurrent>, etc.
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
Diffstat (limited to 'unittests')
-rw-r--r-- | unittests/framework/summary/test_feature.py | 19 | ||||
-rw-r--r-- | unittests/framework/test_profile.py | 17 |
2 files changed, 9 insertions, 27 deletions
diff --git a/unittests/framework/summary/test_feature.py b/unittests/framework/summary/test_feature.py index 370b3602e..fc05941b6 100644 --- a/unittests/framework/summary/test_feature.py +++ b/unittests/framework/summary/test_feature.py @@ -65,16 +65,15 @@ def _maketest(res): PROFILE = profile.TestProfile() -PROFILE.test_list = { - 'spec@gl-1.0@a': _maketest('pass'), - 'spec@gl-1.0@b': _maketest('warn'), - 'spec@gl-1.0@c': _maketest('pass'), - 'spec@gl-1.0@d': _maketest('fail'), - 'spec@gl-2.0@a': _maketest('fail'), - 'spec@gl-2.0@b': _maketest('crash'), - 'spec@gl-2.0@c': _maketest('pass'), - 'spec@gl-2.0@d': _maketest('fail'), -} +PROFILE.test_list = profile.TestDict() +PROFILE.test_list['spec@gl-1.0@a'] = _maketest('pass') +PROFILE.test_list['spec@gl-1.0@b'] = _maketest('warn') +PROFILE.test_list['spec@gl-1.0@c'] = _maketest('pass') +PROFILE.test_list['spec@gl-1.0@d'] = _maketest('fail') +PROFILE.test_list['spec@gl-2.0@a'] = _maketest('fail') +PROFILE.test_list['spec@gl-2.0@b'] = _maketest('crash') +PROFILE.test_list['spec@gl-2.0@c'] = _maketest('pass') +PROFILE.test_list['spec@gl-2.0@d'] = _maketest('fail') class TestFeatResult(object): diff --git a/unittests/framework/test_profile.py b/unittests/framework/test_profile.py index 5ef95e4c3..4ffabfad5 100644 --- a/unittests/framework/test_profile.py +++ b/unittests/framework/test_profile.py @@ -101,23 +101,6 @@ class TestTestProfile(object): profile_.dmesg = False assert isinstance(profile_.dmesg, dmesg.DummyDmesg) - def test_update_test_list(self): - """profile.TestProfile.update(): updates TestProfile.test_list""" - profile1 = profile.TestProfile() - group1 = grouptools.join('group1', 'test1') - group2 = grouptools.join('group1', 'test2') - - profile1.test_list[group1] = utils.Test(['test1']) - - profile2 = profile.TestProfile() - profile2.test_list[group1] = utils.Test(['test3']) - profile2.test_list[group2] = utils.Test(['test2']) - - with profile1.allow_reassignment: - profile1.update(profile2) - - assert dict(profile1.test_list) == dict(profile2.test_list) - class TestPrepareTestList(object): """Create tests for TestProfile.prepare_test_list filtering.""" |