controller: Pass correct cwd to commands.py
TEST=./run_tests
BUG=None
Change-Id: I72b0bd82e71770af6d5f56909d056ea07890960e
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/chromite/+/1555426
Tested-by: Evan Hernandez <evanhernandez@chromium.org>
Reviewed-by: Sean Abraham <seanabraham@chromium.org>
diff --git a/api/controller/artifacts.py b/api/controller/artifacts.py
index 5423bc7..51e2454 100644
--- a/api/controller/artifacts.py
+++ b/api/controller/artifacts.py
@@ -15,21 +15,6 @@
from chromite.lib import osutils
-def _GetTargetWorkingDirectory(build_root, target):
- """Return the working directory for the given build target.
-
- See commands.py functions for more information on what this means.
-
- Args:
- build_root (str): Root CrOS directory being built.
- target (str): Name of the build target in question.
-
- Returns:
- str: Path to the build target's working directory.
- """
- return os.path.join(build_root, 'chroot', 'build', target, 'build')
-
-
def BundleTestUpdatePayloads(input_proto, output_proto):
"""Generate minimal update payloads for the build target for testing.
@@ -84,7 +69,7 @@
target = input_proto.build_target.name
output_dir = input_proto.output_dir
build_root = constants.SOURCE_ROOT
- cwd = _GetTargetWorkingDirectory(build_root, target)
+ cwd = os.path.join(build_root, 'chroot/build', target, 'usr/local/build')
# Note that unlike the functions below, this returns the full path
# to *multiple* tarballs.
@@ -106,7 +91,7 @@
target = input_proto.build_target.name
output_dir = input_proto.output_dir
build_root = constants.SOURCE_ROOT
- cwd = _GetTargetWorkingDirectory(build_root, target)
+ cwd = os.path.join(build_root, 'chroot/build', target, 'build')
# Note that unlike the functions below, this returns the full path
# to the tarball.