0

I am having a AOSP VTS (version 9) setup which works fine on Linux when one device is connected. However, when two devices are connected to the computer, is there an option that let us choose the device on which the VTS should be run?

I notice that "I/DeviceManager: Detected new device " comes up when the vts-tradefed application is being run.

VTS should be run only on specific device and not on both the devices. We could assume that the other device is performing some other operation and should not be disturbed. Is this possible?

Thanks in advance

AnkT
  • 11
  • 3

1 Answers1

0

VTS help:

vts-tf > help run
r(?:un)? help:
    command <config> [options]        Run the specified command
    <config> [options]                Shortcut for the above: run specified command
    cmdfile <cmdfile.txt>             Run the specified commandfile
    commandAndExit <config> [options] Run the specified command, and run 'exit -c' immediately afterward
    cmdfileAndExit <cmdfile.txt>      Run the specified commandfile, and run 'exit -c' immediately afterward

    ----- Vendor Test Suite specific options ----- 
    <plan> --module/-m <module>       Run a test module
    <plan> --module/-m <module> --test/-t <test_name>    Run a specific test from the module. Test name can be <package>.<class>, <package>.<class>#<method> or <native_binary_name>
        Available Options:
            --serial/-s <device_id>: The device to run the test on
            --abi/-a <abi>         : The ABI to run the test against
            --logcat-on-failure    : Capture logcat when a test fails
            --bugreport-on-failure : Capture a bugreport when a test fails
            --screenshot-on-failure: Capture a screenshot when a test fails
            --shard-count <shards>: Shards a run into the given number of independent chunks, to run on multiple devices in parallel.
     ----- In order to retry a previous run -----
    retry --retry <session id to retry> [--retry-type <FAILED | NOT_EXECUTED>]
        Without --retry-type, retry will run both FAIL and NOT_EXECUTED tests

The device to run the test on can be specified with --serial

Rick Sanchez
  • 4,528
  • 2
  • 27
  • 53
  • Tried this option for specific test case, initially it shows that the test is run for the expected device_id. But, once test starts, it fails at the following : "W/NativeDevice: Did not detect device – AnkT Nov 13 '19 at 01:16
  • The same above test when run with just one device connected, it worked. So what might I be missing? Thanks! – AnkT Nov 13 '19 at 22:39
  • Without checking vts tradefed source code, not idea for now, and I dont have much time at the moment. I have a workaround idea though. Rename adb binary to something like adb1, and then define: function adb () { adb1 -s YOUR_SERIAL $@ } Hopefully this will make the vts_tf always use that one device. You might do this in a script that starts the test, so as not to be a global change – Rick Sanchez Nov 14 '19 at 09:23