[llvm] 29c830c - [test][DebugInfo] Fix location of test build artifacts (#165349)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 28 06:50:55 PDT 2025
Author: Jordan Rupprecht
Date: 2025-10-28T08:50:51-05:00
New Revision: 29c830cbf8c65fcab7f96f92c8466cbcc9924dd1
URL: https://github.com/llvm/llvm-project/commit/29c830cbf8c65fcab7f96f92c8466cbcc9924dd1
DIFF: https://github.com/llvm/llvm-project/commit/29c830cbf8c65fcab7f96f92c8466cbcc9924dd1.diff
LOG: [test][DebugInfo] Fix location of test build artifacts (#165349)
The test added in #161067 writes artifacts to the current dir, i.e.
`test.o` / `test.dwo` / `test.dwp`, which might not be writeable. Tests
should use `%t` for test artifact location, i.e. `%t.o` / `%t.dwo` /
`%t.dwp` However, since `"test.dwo"` is part of the assembly source file
used as a test input, and that's not something lit will substitute, that
typical approach doesn't work. We can instead ensure the output is in a
good location by running `cd %t` (after setting it up).
Added:
Modified:
llvm/test/tools/llvm-dwarfdump/X86/type_units_split_dwp_v4.s
Removed:
################################################################################
diff --git a/llvm/test/tools/llvm-dwarfdump/X86/type_units_split_dwp_v4.s b/llvm/test/tools/llvm-dwarfdump/X86/type_units_split_dwp_v4.s
index becd9d1b55693..519edf043be5d 100644
--- a/llvm/test/tools/llvm-dwarfdump/X86/type_units_split_dwp_v4.s
+++ b/llvm/test/tools/llvm-dwarfdump/X86/type_units_split_dwp_v4.s
@@ -1,6 +1,12 @@
## This test uses TU index for type parsing in dwp and makes sure the DWARF4 type is
## successfully retrieved.
+## cd to a unique dir so we can refer to the file as just "test.dwo" in the
+## assembly test input below.
+# RUN: rm -rf %t
+# RUN: mkdir %t
+# RUN: cd %t
+
# RUN: llvm-mc %s --split-dwarf-file=test.dwo -filetype obj -triple x86_64 -o test.o
# RUN: llvm-dwp -e test.o -o test.dwp
# RUN: llvm-dwarfdump test.dwp | FileCheck %s
More information about the llvm-commits
mailing list