automated/android/noninteractive-tradefed/tradefed¶
Description¶
Run tradefed based tests in LAVA.
Maintainer¶
OS¶
- debian
- ubuntu
Scope¶
- functional
Devices¶
- lxc
Steps to reproduce¶
- cd ./automated/android/noninteractive-tradefed
- . ./setup.sh
- echo "after ./setup.sh"
- userdel testuser -r -f || true
- useradd -G plugdev -m testuser && echo "testuser created successfully"
- chown testuser:testuser .
- if echo "${TEST_REBOOT_EXPECTED}" |grep -i "true" ; then ./monitor_fastboot.sh & fi
- ./monitor_adb.sh &
- sudo -u testuser HTTP_CACHE="\({HTTP_CACHE}" ./tradefed.sh -o "\)" -c "\({TEST_URL}" -t "\)" -p "\({TEST_PATH}" -r "\)" -n "\({ANDROID_SERIAL}" -f "\)" -a "\({AP_SSID}" -k "\)" -i "\({INTERNET_ACCESS}" -x "\)"|| if [ $? -eq 100 ]; then error_fatal "The network seems not available, as the ping command failed"; else true; fi
- cp -r ./${TEST_PATH}/results ./output/ || true
- cp -r ./${TEST_PATH}/logs ./output/ || true
- if ls /tmp/tradefed; then cp -r /tmp/tradefed ./output || true; fi
- sudo dmesg > ./output/dmesg-host.txt || true
- if ! tar caf tradefed-output-\((date +%Y%m%d%H%M%S).tar.xz ./output; then error_fatal "tradefed - failed to collect results and log files [\)ANDROID_SERIAL]"; fi
- ATTACHMENT=$(ls tradefed-output-*.tar.xz)
- if [ -n "\({SQUAD_UPLOAD_URL}" ]; then ../../utils/upload-to-squad.sh -a "\)"; fi}" -u "${SQUAD_UPLOAD_URL
- if [ -z "\({SQUAD_UPLOAD_URL}" ]; then ../../utils/upload-to-artifactorial.sh -a "\)" -u "\({URL}" -t "\)"; fi
- ../../utils/send-to-lava.sh ./output/result.txt
- userdel testuser -f -r || true
- if ! adb shell echo ok; then ./debug-fastboot.sh; error_fatal "tradefed - adb device lost[$ANDROID_SERIAL]"; fi
- if echo "${TEST_REBOOT_EXPECTED}" |grep -i "true" ; then killall monitor_fastboot.sh; fi
- killall monitor_adb.sh