Commit d9c8c4b
committed
test: normalize paths in TestDiscoverIntegration for cross-OS matrix
The diagnose-test-failure job uploaded test artifacts and showed the
exact failure on both macOS and Windows is the same:
macOS: Root() = "/private/var/folders/.../001"
want "/var/folders/.../001"
Windows: Root() = "C:/Users/runneradmin/AppData/Local/Temp/.../001"
want "C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\...\\001"
`git rev-parse --show-toplevel` (which Discover() returns verbatim):
- Resolves symlinks on macOS — /var → /private/var
- Returns forward slashes on Windows where Go's filepath uses backslash
- Returns the Windows long-path form (runneradmin) where t.TempDir()
may return the 8.3 short form (RUNNER~1)
These are real OS differences exposed by the new cross-OS test matrix,
not bugs in Discover() itself. Fix the comparison in the test by piping
both sides through filepath.FromSlash + filepath.EvalSymlinks before
the equality check.
Also drop the temporary diagnose-test-failure job — its purpose was to
surface this failure once, and it's no longer needed.
https://claude.ai/code/session_01Sy9fRJ7oL6ghGxJAVvEPLW1 parent 9b41ec7 commit d9c8c4b
2 files changed
Lines changed: 17 additions & 48 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
141 | | - | |
142 | | - | |
143 | | - | |
144 | 98 | | |
145 | 99 | | |
146 | 100 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
603 | 604 | | |
604 | 605 | | |
605 | 606 | | |
606 | | - | |
607 | | - | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
608 | 623 | | |
609 | 624 | | |
610 | 625 | | |
| |||
0 commit comments