Commit 72099f2
committed
[Utils] Sanitize
This adds sanitizing of the expansion of the `%t` temp dir to
PathSanitizingFileCheck. Because the expansion of this path is different
for each test case, lit.cfg cannot use the expanded version. Instead it
relies on lit expanding the `%t` substring. This requires path
normalization to occur in PathSanitizingFileCheck instead of lit.cfg.
All strings matching the expansion of `%t` are now replaced with
`TMP_DIR`. This is especially useful when source files are created in
`%t` using `split-file`.
Also sorts the patterns to sanitize based on length, to guarantee that
patterns that are substrings of some other pattern are always tested
after the longer patterns has already been tested. Otherwise the longer
pattern may never match.%t with PathSanitizingFileCheck1 parent 919e090 commit 72099f2
2 files changed
+20
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3114 | 3114 | | |
3115 | 3115 | | |
3116 | 3116 | | |
3117 | | - | |
| 3117 | + | |
3118 | 3118 | | |
3119 | 3119 | | |
3120 | | - | |
3121 | | - | |
3122 | | - | |
3123 | | - | |
3124 | | - | |
3125 | | - | |
3126 | | - | |
3127 | | - | |
| 3120 | + | |
| 3121 | + | |
| 3122 | + | |
3128 | 3123 | | |
3129 | 3124 | | |
3130 | 3125 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
| 15 | + | |
14 | 16 | | |
15 | 17 | | |
16 | 18 | | |
17 | 19 | | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
18 | 32 | | |
19 | 33 | | |
20 | 34 | | |
| |||
78 | 92 | | |
79 | 93 | | |
80 | 94 | | |
81 | | - | |
| 95 | + | |
82 | 96 | | |
83 | 97 | | |
84 | 98 | | |
85 | 99 | | |
86 | 100 | | |
87 | | - | |
| 101 | + | |
88 | 102 | | |
89 | 103 | | |
90 | 104 | | |
| |||
0 commit comments