[moblab] Provide default for getting the test args from config.
If a user AU's and does not go through the config wizard again
the wifi test args are missing from the config.
Provide a default value in the get request.
BUG=chromium:752558
TEST=unit tests and locally on moblab.
Change-Id: If1904a289df8effd54b62158f7310a17c0a6fe09
Reviewed-on: https://chromium-review.googlesource.com/602677
Commit-Ready: Keith Haddow <haddowk@chromium.org>
Tested-by: Keith Haddow <haddowk@chromium.org>
Reviewed-by: Keith Haddow <haddowk@chromium.org>
Reviewed-by: Michael Tang <ntang@chromium.org>
(cherry picked from commit b940817305207a493402e72b05601aad0038e8ee)
Reviewed-on: https://chromium-review.googlesource.com/603129
Commit-Queue: Keith Haddow <haddowk@chromium.org>
diff --git a/frontend/afe/moblab_rpc_interface.py b/frontend/afe/moblab_rpc_interface.py
index 8e09b6d..299a93f 100644
--- a/frontend/afe/moblab_rpc_interface.py
+++ b/frontend/afe/moblab_rpc_interface.py
@@ -803,14 +803,13 @@
else:
list_suite_args = None
- test_args = {'ssid': None, 'wifipass': None}
+ test_args = {}
- ap_name =_CONFIG.get_config_value('MOBLAB', _WIFI_AP_NAME)
- if ap_name and ap_name != 'None':
- test_args['ssid'] = ap_name
- ap_pass =_CONFIG.get_config_value('MOBLAB', _WIFI_AP_PASS)
- if ap_pass and ap_pass != 'None':
- test_args['wifipass'] = ap_pass
+ ap_name =_CONFIG.get_config_value('MOBLAB', _WIFI_AP_NAME, default=None)
+ test_args['ssid'] = ap_name
+ ap_pass =_CONFIG.get_config_value('MOBLAB', _WIFI_AP_PASS, default=None)
+ test_args['wifipass'] = ap_pass
+
afe = frontend.AFE(user='moblab')
afe.run('create_suite_job', board=board, builds=builds, name=suite,
pool=pool, run_prod_code=False, test_source_build=build,