test controller: Fix moblab vm test result path.

The path is a tempdir in the chroot, but was being passed in as
the absolute path outside the chroot. Fix to be a chroot-absolute
path.

BUG=chromium:998155
TEST=run_tests

Change-Id: I5167ba724a8ce7bfb852e96832099fb409d5f6bb
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/chromite/+/1914507
Tested-by: Alex Klein <saklein@chromium.org>
Auto-Submit: Alex Klein <saklein@chromium.org>
Reviewed-by: Michael Mortensen <mmortensen@google.com>
Commit-Queue: Alex Klein <saklein@chromium.org>
diff --git a/api/controller/test.py b/api/controller/test.py
index 2e8892c..2f26f35 100644
--- a/api/controller/test.py
+++ b/api/controller/test.py
@@ -203,9 +203,11 @@
 
   # Now we can run the tests.
   with chroot.tempdir() as workspace_dir, chroot.tempdir() as results_dir:
+    # Convert the results directory to an absolute chroot directory.
+    chroot_results_dir = '/%s' % os.path.relpath(results_dir, chroot.path)
     vms = test.CreateMoblabVm(workspace_dir, chroot.path, image_payload_dir)
     cache_dir = test.PrepareMoblabVmImageCache(vms, builder, cache_payload_dirs)
-    test.RunMoblabVmTest(chroot, vms, builder, cache_dir, results_dir)
+    test.RunMoblabVmTest(chroot, vms, builder, cache_dir, chroot_results_dir)
     test.ValidateMoblabVmTest(results_dir)