aboutsummaryrefslogtreecommitdiff
path: root/build-scripts/post-build-lava.py
diff options
context:
space:
mode:
authorPaul Sokolovsky <paul.sokolovsky@linaro.org>2012-08-13 14:08:43 +0300
committerPaul Sokolovsky <paul.sokolovsky@linaro.org>2012-08-13 14:08:43 +0300
commitfbfda5beb7449f025eaae6cae8d59898bf215895 (patch)
tree74f39a774fa590c8d0628073f9ca54f2d6973852 /build-scripts/post-build-lava.py
parent6c8986250469e22974ed4639381363a218c2b22a (diff)
parent269294e9ab7bcb2ccab1fa25a960e6218b090028 (diff)
[merge] Support to run more than two instances of the same test with different options
Diffstat (limited to 'build-scripts/post-build-lava.py')
-rwxr-xr-xbuild-scripts/post-build-lava.py25
1 files changed, 23 insertions, 2 deletions
diff --git a/build-scripts/post-build-lava.py b/build-scripts/post-build-lava.py
index b7acb12..972088f 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