f20 fix full path for container-prep
BUG=None
TEST=chromite.api.TestService/BuildTestServiceContainers
Change-Id: I6c16a48a5ba1e92cd913cc3eec4c8644626ccedd
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/dev-util/+/3144237
Reviewed-by: Sean McAllister <smcallis@google.com>
Reviewed-by: Jesse McGuire <jessemcguire@google.com>
Reviewed-by: Seewai Fu <seewaifu@google.com>
Reviewed-by: Congbin Guo <guocb@chromium.org>
Commit-Queue: Sean McAllister <smcallis@google.com>
Tested-by: Sean McAllister <smcallis@google.com>
diff --git a/test/container/utils/container_prep.py b/test/container/utils/container_prep.py
index 0490e2a..05ca7f5 100644
--- a/test/container/utils/container_prep.py
+++ b/test/container/utils/container_prep.py
@@ -51,11 +51,13 @@
self.chroot_bin = ""
self.chroot = self.args.chroot
self.src_root = self.args.src
+ self.sysroot = self.args.sysroot
+ if self.sysroot.startswith('/'):
+ self.sysroot = self.sysroot[1:]
def config_paths(self):
"""Build up the paths needed in local mem."""
- self.build_path = os.path.join(self.chroot, self.args.sysroot)
-
+ self.build_path = os.path.join(self.chroot, self.sysroot)
self.full_autotest = os.path.join(
self.build_path, 'usr/local/build/autotest')
self.chroot_bin = os.path.join(self.chroot, 'usr/bin')