diff options
author | Vishal Bhoj <vishal.bhoj@linaro.org> | 2018-01-18 23:02:45 +0530 |
---|---|---|
committer | Milosz Wasilewski <milosz.wasilewski@linaro.org> | 2018-01-22 11:40:04 +0000 |
commit | 897ba055c98ec5a510753a2b11096e60ea33e554 (patch) | |
tree | cff55b15c2d94ed899686634d1347ad25d26a65f | |
parent | 39f08c9391559f283e1f06de2840fc2be36e2754 (diff) |
android: tradefed: connect to wifi network
Change-Id: I758322c5f3511a7091555cf6052527b824b48478
Signed-off-by: Vishal Bhoj <vishal.bhoj@linaro.org>
-rwxr-xr-x | automated/android/tradefed/setup.sh | 12 | ||||
-rw-r--r-- | automated/android/tradefed/tradefed.yaml | 2 |
2 files changed, 14 insertions, 0 deletions
diff --git a/automated/android/tradefed/setup.sh b/automated/android/tradefed/setup.sh index e0f38d3..78716db 100755 --- a/automated/android/tradefed/setup.sh +++ b/automated/android/tradefed/setup.sh @@ -26,3 +26,15 @@ esac install_latest_adb initialize_adb adb_root + +lava_test_dir="$(find /lava-* -maxdepth 0 -type d -regex '/lava-[0-9]+' 2>/dev/null | sort | tail -1)" +if test -f "${lava_test_dir}/secrets"; then + # shellcheck disable=SC1090 + . "${lava_test_dir}/secrets" +fi + +if [ -z "${AP_SSID}" ] && [ -z "${AP_KEY}" ]; then + wget http://testdata.validation.linaro.org/apks/wifi/wifi.apk + adb install wifi.apk + adb shell am start -n com.steinwurf.adbjoinwifi/.MainActivity -e ssid "${AP_SSID}" -e password_type WPA -e password "${AP_KEY}" +fi diff --git a/automated/android/tradefed/tradefed.yaml b/automated/android/tradefed/tradefed.yaml index f9d4f9c..4b35a8a 100644 --- a/automated/android/tradefed/tradefed.yaml +++ b/automated/android/tradefed/tradefed.yaml @@ -29,6 +29,8 @@ params: # Specify url and token for file uploading. URL: "https://archive.validation.linaro.org/artifacts/team/qa/" TOKEN: "" + AP_SSID: "" + AP_KEY: "" run: steps: |