On Thu, 4 Jun 2020 at 11:05, Larry Shen larry.shen@nxp.com wrote:
Hi, guys,
I have a job like next:
test:
timeout:
minutes: 10
docker:
image: terceiro/android-platform-tools
definitions:
from: inline
name: smoke-case
path: inline/install-google-fastboot.yaml
repository:
metadata:
format: Lava-Test Test Definition 1.0 name: smoke-case-run description: Run smoke case
run:
steps: - env - sleep 10 - adb devices - adb root - sleep 10 - adb devices - lava-test-case get-release-version --shell adb shell getprop ro.vendor.build.fingerprint
It output as next:
sleep 10
adb devices
daemon not running; starting now at tcp:5037
daemon started successfully
List of devices attached
040c41d4d72d7393 device
adb root
sleep 10
adb devices
List of devices attached
- lava-test-case get-release-version --shell adb shell getprop ro.vendor.build.fingerprint
<LAVA_SIGNAL_STARTTC get-release-version>
Received signal: <STARTTC> get-release-version
error: device '040c41d4d72d7393' not found
<LAVA_SIGNAL_ENDTC get-release-version>
Received signal: <ENDTC> get-release-version
<LAVA_SIGNAL_TESTCASE TEST_CASE_ID=get-release-version RESULT=fail>
Received signal: <TESTCASE> TEST_CASE_ID=get-release-version RESULT=fail
You know “adb root” will make usb bus change during run, so could docker shell handle this? How can I make above work? Thanks.
I don't think you can do that easily. Right now LAVA passes the device path to the container: Starting docker test shell container: docker run --rm --interactive --name=lava-docker-test-shell-2009060-3.4 --hostname=lava --device=/dev/bus/usb/001/086 --mount=type=bind,source=/var/lib/lava/dispatcher/tmp/2009060/lava-create-overlay-cjc83r5v/lava-2009060,destination=/lava-2009060 '--env=PS1=docker-test-shell:$ ' miloszwasilewski/adb-fastboot bash --norc -i So when enumeration changes the device is no longer available in the container.
You can try this: https://validation.linaro.org/scheduler/job/2009070/definition It sort of works. Not pretty but does the trick.
milosz
Lava-users mailing list Lava-users@lists.lavasoftware.org https://lists.lavasoftware.org/mailman/listinfo/lava-users