summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2023-07-02 20:01:29 +0300
committerLars Wirzenius <liw@liw.fi>2023-07-02 20:01:29 +0300
commit029a27e11d73c6dc76b934662e5f53fc9e818446 (patch)
tree9526207e36663cc8952aab3980a5adae91469c35
parent620e293cfed88960db559e931006ad4ddcfcf8f2 (diff)
downloadambient-ci-029a27e11d73c6dc76b934662e5f53fc9e818446.tar.gz
feat: --dependencies specifies directory, not tar
The dir will be tarred up. This is meant to be convenient. Sponsored-by: author
-rwxr-xr-xambient-run10
-rwxr-xr-xtest-project/.ambient-script6
2 files changed, 11 insertions, 5 deletions
diff --git a/ambient-run b/ambient-run
index e0e2ce8..d812232 100755
--- a/ambient-run
+++ b/ambient-run
@@ -114,13 +114,15 @@ def main():
"cache drive {cache_drive} is larger than max allowed, oh well"
)
+ deps_drive = os.path.join(tmp, "deps.tar")
+ logging.info(f"using {deps_drive} as the dependencies drive")
+ tar = tarfile.open(name=deps_drive, mode="w:")
if args.dependencies is None:
- deps_drive = os.path.join(tmp, "deps.tar")
- tar = tarfile.open(name=deps_drive, mode="w:")
tar.close()
else:
- deps.drive = args.dependencies
- logging.info(f"using {deps_drive} as cache drive")
+ # Tar up the dependencies directory.
+ tar.add(args.dependencies, arcname=".")
+ tar.close()
logging.info("run build in VM")
argv = [
diff --git a/test-project/.ambient-script b/test-project/.ambient-script
index d226b2f..9a945bd 100755
--- a/test-project/.ambient-script
+++ b/test-project/.ambient-script
@@ -6,7 +6,11 @@ echo "hello from test-project's ambient script: $*"
cat /proc/cmdline
ls -l /dev/vd?
-ls -l /workspace
+
+echo "------------------------------------------"
+echo "Workspace contents"
+find /workspace -type f -ls
+echo "------------------------------------------"
output="$1"