Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[microTVM][RVM] Always destroy the VM if all tests pass (apache#8739)
Currently base-box-tool 'test' command will skip destroying the test VM if a single provider is specified (i.e. --provider virtualbox) even if all tests pass. This is confusing (no warning is displayed to the user) and that will leave host resources (like USB devices necessary to run the test) locked by the VM. So if the user tries to run a program that uses the locked resource (e.g. openocd) cryptic failures might happen. Moreoever, even if all tests pass and more than one provider is specified but the option '--skip-build' is set a VM will be left running without notice. This commit changes that behavior by: 1. Always destroying the VM if the release test pass 2. Always keeping the VM up and running if a test fails 1. guarantees no resource remains locked by the VM without necessity. A new flag '--skip-destroy' is introduced in case the user still wants to keep a VM up and running if the release tests pass. 2. guarantees the VM where the test failed is left running for further inspection of the test that failed. Finally, for both 1. and 2. cases a proper message is displayed to the user to inform if a VM was left running or not and about what actions the user can take next accordingly to the test result in the VM. Signed-off-by: Gustavo Romero <gustavo.romero@linaro.org>
- Loading branch information