Commit 13cb0af
committed
[lld][test] Fix file cleanup in aarch64-build-attributes.s
This test made the foolish decision to take the lit documentation
at its word:
https://llvm.org/docs/CommandGuide/lit.html#substitutions
"%t temporary file name unique to the test"
%t is in fact the **path** of a file. As suggested by the line
below that describing %basename_t.
This test assumed it was just the filename itself and so left a
layout of:
$ tree tools/lld/test/
tools/lld/test/
├── CMakeFiles
├── ELF
│ └── Output
│ ├── aarch64-build-attributes.s.tmp
│ │ ├── pauth-bti-gcs.s
│ │ └── pauth-bti-pac.s
│ ├── aarch64-build-attributes.s.tmp.merged.o
│ ├── aarch64-build-attributes.s.tmp1.o
│ ├── aarch64-build-attributes.s.tmp2.o
│ └── aarch64-build-attributes.s.tmp3.o
├── Unit
│ └── lit.site.cfg.py
├── cmake_install.cmake
└── lit.site.cfg.py
Note how the 2 .s files are in the temp dir but the .o files
are not.
To fix this, remove %t from all the temp file names so they
are created in the temp dir, which is cleaned before each run.
New layout:
$ tree tools/lld/test/
tools/lld/test/
├── CMakeFiles
├── ELF
│ └── Output
│ └── aarch64-build-attributes.s.tmp
│ ├── 1.o
│ ├── 2.o
│ ├── 3.o
│ ├── merged.o
│ ├── pauth-bti-gcs.s
│ └── pauth-bti-pac.s
├── Unit
│ └── lit.site.cfg.py
├── cmake_install.cmake
└── lit.site.cfg.py1 parent c06ae43 commit 13cb0af
1 file changed
+5
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| |||
0 commit comments