aboutsummaryrefslogtreecommitdiff
path: root/build-scripts/post-build-lava.py
diff options
context:
space:
mode:
authorYongqin Liu <yongqin.liu@linaro.org>2013-03-27 15:41:55 +0800
committerYongqin Liu <yongqin.liu@linaro.org>2013-03-27 15:41:55 +0800
commit8706cc5bf79a2c556d4746d6e776c8beec287229 (patch)
tree458e3886f98a547b8edf28d88f2a608ed62b64ad /build-scripts/post-build-lava.py
parentc4ccddc5224fdc0ec3970a680f5b5fcc576fea03 (diff)
add support for specifying the adb_check option for system-reboot action
Diffstat (limited to 'build-scripts/post-build-lava.py')
-rwxr-xr-xbuild-scripts/post-build-lava.py34
1 files changed, 30 insertions, 4 deletions
diff --git a/build-scripts/post-build-lava.py b/build-scripts/post-build-lava.py
index e33fa27..f5778df 100755
--- a/build-scripts/post-build-lava.py
+++ b/build-scripts/post-build-lava.py
@@ -95,6 +95,28 @@ def gen_lava_test_shell_action(test_name=None, test_para=None):
return action
+def gen_reboot_action(test_para=None):
+ action = {"command": "boot_linaro_android_image"}
+ if not test_para:
+ return action
+ key_value_ary = test_para.split()
+ key_value_hash = {}
+ for pair_line in key_value_ary:
+ pair = pair_line.split('=', 1)
+ if len(pair) != 2:
+ continue
+ if pair[0]:
+ key_value_hash[pair[0]] = pair[1]
+
+ parameters = {}
+ adb_check_val = key_value_hash.get('adb_check')
+ if adb_check_val and adb_check_val.lower() == 'true':
+ parameters['adb_check'] = True
+ action['parameters'] = parameters
+
+ return action
+
+
def gen_lava_android_test_actions(tests=[]):
actions = []
if len(tests) == 0:
@@ -110,7 +132,7 @@ def gen_lava_android_test_actions(tests=[]):
if test.startswith("lava-test-shell"):
continue
- if test == REBOOT_TOKEN:
+ if test.startswith(REBOOT_TOKEN):
continue
## support for test that specified with option like methanol,methanol(DEFAULT)
if test.find('(') >= 0\
@@ -147,6 +169,12 @@ def gen_lava_android_test_actions(tests=[]):
actions.append(run_action)
continue
+ if test.startswith(REBOOT_TOKEN):
+ run_action = gen_reboot_action(test_para=test_option)
+ if run_action:
+ actions.append(run_action)
+ continue
+
parameters = {}
if not test_option:
test_option = os.environ.get('%s%s' % (test.upper(), OPTION_SUFFIX))
@@ -188,15 +216,13 @@ def gen_lava_android_test_actions(tests=[]):
}
actions.append(run_action)
actions.append({"command": "boot_linaro_android_image"})
- elif test != REBOOT_TOKEN:
+ else:
parameters['test_name'] = test
run_action = {
"command": "lava_android_test_run",
"parameters": parameters
}
actions.append(run_action)
- else:
- actions.append({"command": "boot_linaro_android_image"})
return actions