For some reason os.getcwd() can return either c: or C: depending of which
binary you used on Windows. We normalize this to C: and the like. This fix
test-run-tests.t on windows as the drive letter in "$TESTTMP" was "wrongly"
set to 'c:/' if the test path wasn't explicitly specified.
Details
Details
- Reviewers
Alphare - Group Reviewers
hg-reviewers - Commits
- rHGf0fbe8f4faa6: run-tests: enforce the drive letter from `getcwd` to upper case
Diff Detail
Diff Detail
- Repository
- rHG Mercurial
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
Event Timeline
Comment Actions
Does the issue happen with 3.7? I'm wondering if this is the normalization they started to do in os.path.realpath(). See 3dfebba99ef6
Comment Actions
The same getcwd is called in both case, so, I don't know. I don't have interactive testing on Windows. Can you check ?
(in the mean time, this change does not seems bad in itself, just hacky)
Comment Actions
I eventually got to th ebottom of it. os.getcwd return inconsistent capitalization for the drive letter. So any os.path.join is getting poisoned. Unless the path joined is already absolute and it trumps the os.getcwd one.
So I am adjusting the function to return something proper. Update coming.