diff options
author | Yongqin Liu <yongqin.liu@linaro.org> | 2012-08-14 11:53:18 +0800 |
---|---|---|
committer | Yongqin Liu <yongqin.liu@linaro.org> | 2012-08-14 11:53:18 +0800 |
commit | 083c746df4da9b31c54a8791855e14f805bfef75 (patch) | |
tree | 500968a066db8ddf392b1755d825e36001a32059 /build-scripts/post-build-lava.py | |
parent | 4e8998eb2a29ee864bc12508459a8253d6a1fd66 (diff) | |
parent | fbfda5beb7449f025eaae6cae8d59898bf215895 (diff) |
merge with trunk
Diffstat (limited to 'build-scripts/post-build-lava.py')
-rwxr-xr-x | build-scripts/post-build-lava.py | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/build-scripts/post-build-lava.py b/build-scripts/post-build-lava.py index 2365d4e..9815215 100755 --- a/build-scripts/post-build-lava.py +++ b/build-scripts/post-build-lava.py @@ -59,7 +59,17 @@ def gen_lava_android_test_actions(tests=[]): actions = [] if len(tests) == 0: return actions - test_actions = [test for test in tests if test != REBOOT_TOKEN] + test_actions = [] + for test in tests: + if test == REBOOT_TOKEN: + continue + ## support for test that specified with option like methanol,methanol(DEFAULT) + if test.find('(') >= 0\ + and test.rfind(')') > test.find('('): + test = test[:test.find('(')].strip() + if not test: + continue + test_actions.append(test) if len(test_actions) > 0: inst_action = { @@ -72,9 +82,20 @@ def gen_lava_android_test_actions(tests=[]): actions.append(inst_action) for test in tests: + + ## support for test that specified with option like methanol,methanol(DEFAULT) + ## for this case, get the option from the test + test_option = '' + if test.find('(') >= 0 and test.rfind(')') > test.find('(') \ + and test[:test.find('(')].strip(): + test_option = test[test.find('(') + 1 : test.rfind(')')] + test = test[:test.find('(')].strip() + parameters = {'test_name': test} - test_option = os.environ.get('%s%s' % (test.upper(), OPTION_SUFFIX)) + if not test_option: + test_option = os.environ.get('%s%s' % (test.upper(), OPTION_SUFFIX)) + if test_option: parameters['option'] = test_option |