test: MoblabVmTest assumes it is outside chroot
TEST=./run_tests
BUG=chromium:954276
Change-Id: I23f6a475343570ecbc2bcb2d5d90571ad082fc29
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/chromite/+/1660745
Tested-by: Evan Hernandez <evanhernandez@chromium.org>
Auto-Submit: Evan Hernandez <evanhernandez@chromium.org>
Reviewed-by: Jason Clinton <jclinton@chromium.org>
diff --git a/api/controller/test.py b/api/controller/test.py
index f81fa9b..d1df6d5 100644
--- a/api/controller/test.py
+++ b/api/controller/test.py
@@ -145,6 +145,7 @@
def MoblabVmTest(input_proto, _output_proto):
"""Run Moblab VM tests."""
+ chroot = controller_util.ParseChroot(input_proto.chroot)
image_payload_dir = input_proto.image_payload.path.path
cache_payload_dirs = [cp.path.path for cp in input_proto.cache_payloads]
@@ -163,8 +164,8 @@
constants.LSB_RELEASE_PATH)
# Now we can run the tests.
- with osutils.TempDir() as workspace_dir, osutils.TempDir() as results_dir:
+ with chroot.tempdir() as workspace_dir, chroot.tempdir() as results_dir:
vms = test.CreateMoblabVm(workspace_dir, image_payload_dir)
cache_dir = test.PrepareMoblabVmImageCache(vms, builder, cache_payload_dirs)
- test.RunMoblabVmTest(vms, builder, cache_dir, results_dir)
+ test.RunMoblabVmTest(chroot, vms, builder, cache_dir, results_dir)
test.ValidateMoblabVmTest(results_dir)