Skip to content

Commit 1c866a7

Browse files
committed
[RISCV][lit-on-qemu] Use relative path for llvm_img exclusion
Also improve some debug printing.
1 parent bc1b63c commit 1c866a7

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

buildbot/riscv-rise/lit-on-qemu

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ current_path = pathlib.Path.cwd()
5050
print(f"Initial working directory: {current_path}. Found build_dir: {build_dir}")
5151

5252
llvm_img = build_dir / "llvm-project.img"
53+
print(f"Allocating file for filesystem image at: {llvm_img}")
5354
subprocess.run(["fallocate", "-l", "50GiB", llvm_img], check=True)
5455

5556
os.chdir(build_dir)
@@ -73,7 +74,7 @@ elif (build_dir.parent / "llvm" / ".git").is_dir():
7374
print("Note: 'CI style' layout detected (llvm checkout and build_dir as siblings)")
7475
extra_tar_args = [
7576
"--exclude=llvm/.git",
76-
f"--exclude={llvm_img}"
77+
f"--exclude={llvm_img.relative_to(build_dir.parent)}"
7778
]
7879
paths_to_tar = f"llvm {build_dir_name}"
7980
change_to_dir = ".."
@@ -108,7 +109,7 @@ mount -t ext4 /dev/vdb "{base_mount_path}" || error "Mount failed"
108109
if [ -f "{build_dir}/tools/clang/test/lit.site.cfg.py" ]; then
109110
# Workaround llvm_external_lit being re-invoked by update_cc_test_checks
110111
# tests.
111-
sed -i 's/^config\.llvm_external_lit.*$/config.llvm_external_lit = path(r"")/' "{build_dir}/tools/clang/test/lit.site.cfg.py"
112+
sed -i 's/^config\\.llvm_external_lit.*$/config.llvm_external_lit = path(r"")/' "{build_dir}/tools/clang/test/lit.site.cfg.py"
112113
fi
113114
cd "{current_path}"
114115
su user -c "/usr/bin/python3 {build_dir}/bin/llvm-lit {args_string}"

0 commit comments

Comments
 (0)