Support for running unittests on chromeos VM |
|||
Issue description
cros_run_vm_tests should take the following options:
{ "files": [ "out/Release/base_unittests", "base/test/testfile.txt"], "command": ["out/Release/base_unittests"], "cwd": "."}
It would need to scp "files", change directory to "cwd", and run "command".
,
Nov 3 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/chromite/+/2a39adf2e293b64d1e167110e8286d2138685abc commit 2a39adf2e293b64d1e167110e8286d2138685abc Author: Achuith Bhandarkar <achuith@chromium.org> Date: Fri Nov 03 13:34:59 2017 [cros_vm]: --output in cros_run_vm_test * --output to write output to a file from cros_run_vm_test * cros_vm --cmd implemention consistent with other cros scripts * Function ProcessResult() to deal with return code. * Pass through args from cros_run_vm_test to cros_vm. * Don't wait for chrome with KVM enabled. BUG= chromium:775485 TEST=manual Change-Id: I691dd40e6427b0a1e230844b554b9399305c2efb Reviewed-on: https://chromium-review.googlesource.com/743364 Commit-Ready: Achuith Bhandarkar <achuith@chromium.org> Tested-by: Achuith Bhandarkar <achuith@chromium.org> Reviewed-by: Steven Bennetts <stevenjb@chromium.org> [modify] https://crrev.com/2a39adf2e293b64d1e167110e8286d2138685abc/scripts/cros_run_vm_test.py [modify] https://crrev.com/2a39adf2e293b64d1e167110e8286d2138685abc/scripts/cros_vm.py
,
Nov 6 2017
,
Nov 29 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/chromite/+/cff742bb19cb2c804fe35c2ccac5d45289988a30 commit cff742bb19cb2c804fe35c2ccac5d45289988a30 Author: Achuith Bhandarkar <achuith@chromium.org> Date: Wed Nov 29 04:17:09 2017 [remote_access] Do not convert string to array when shell=True. cros_build_lib.RunCommand requires shell=True when cmd is of type string, otherwise the following exception is thrown: line 556, in RunCommand raise Exception('Cannot run a string command without a shell') So ssh_cmd must be of type string when cmd is of type string and shell=True. Otherwise the following exception is thrown: line 560, in RunCommand raise Exception('Cannot run an array command with a shell') BUG= chromium:775485 TEST=manual Change-Id: I2fa248e531b57b3e432a6bc1a07d844935c4b659 Reviewed-on: https://chromium-review.googlesource.com/756844 Commit-Ready: Achuith Bhandarkar <achuith@chromium.org> Tested-by: Achuith Bhandarkar <achuith@chromium.org> Reviewed-by: Achuith Bhandarkar <achuith@chromium.org> Reviewed-by: Mike Frysinger <vapier@chromium.org> [modify] https://crrev.com/cff742bb19cb2c804fe35c2ccac5d45289988a30/lib/remote_access.py
,
Dec 9 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/chromite/+/c3259072e9f3aded80daed2caf0dbfddd8521207 commit c3259072e9f3aded80daed2caf0dbfddd8521207 Author: Achuith Bhandarkar <achuith@chromium.org> Date: Sat Dec 09 21:28:44 2017 [cros_vm]: Options to run unittests on cros VM. Support new options: --cmd: Run a command instead of a test. --cwd: working directory. --files: list of files to copy over to VM. --files-from: list of files specified in a text file to copy over. Use case looks something like this: Build unittests in out/Release/ To run unittests in the VM, use this command: cros_run_vm_test --no-display --files out/Release --cwd out/Release --cmd -- ./unittest --unittest_args --no-display correctly gets routed to VM, and opts.args contains ['--', './unittest', '--unittest_args']. We verify that: 1. --cmd always has at least 2 args ('--', and something else), 2. whenever args has something, --cmd has been specified, and, 3. that '--' is always the first arg. BUG= chromium:775485 TEST=manual CQ-DEPEND=CL:756844 Change-Id: Iac2742096457ba4bc72cb21f9105848cb257276c Reviewed-on: https://chromium-review.googlesource.com/756845 Commit-Ready: Achuith Bhandarkar <achuith@chromium.org> Tested-by: Achuith Bhandarkar <achuith@chromium.org> Reviewed-by: Steven Bennetts <stevenjb@chromium.org> [modify] https://crrev.com/c3259072e9f3aded80daed2caf0dbfddd8521207/scripts/cros_run_vm_test.py
,
Jan 18 2018
Everything is landed for this feature. |
|||
►
Sign in to add a comment |
|||
Comment 1 by achuith@chromium.org
, Oct 18 2017