That pesky windows run-tests failure on the buildbot
Augie Fackler
raf at durin42.com
Wed Dec 13 09:31:44 EST 2017
> On Dec 13, 2017, at 08:14, Feld Boris <lothiraldan at gmail.com> wrote:
>
> On Wed, 2017-12-13 at 21:29 +0900, Yuya Nishihara wrote:
>> On Tue, 12 Dec 2017 18:13:24 -0500, Matt Harbison wrote:
>>>> On Dec 12, 2017, at 5:57 PM, Augie Fackler <raf at durin42.com>
>>>> wrote:
>>>> Finally, some useful output:
>>>>
>>>> + --- $TESTTMP/anothertests/test-runtestdir.t
>>>> + +++ $TESTTMP/anothertests/test-runtestdir.t.err
>>>> + @@ -10,6 +10,7 @@
>>>> + If this prints a path, that means RUNTESTDIR didn't equal
>>>> + TESTDIR as it should have.
>>>> + $ test "$RUNTESTDIR" = "G:\Users\test\projects\hg-default-
>>>> x86_64\Win7_x86_64_hg_tests\build\tests" || echo "$RUNTESTDIR"
>>>> + + g:\Users\test\projects\hg-default-
>>>> x86_64\Win7_x86_64_hg_tests\build\tests
>>>>
>>>> Basically, it's failing because one of os.path.{abspath,dirname}
>>>> is deciding to lowercase the drive letter. I suspect it's
>>>> abspath, but I don't have a Windows machine handy to test
>>>> against. Anyone got a clever idea on how to fix this?
>>>
>>> The odd thing is, this runs fine on this machine from this
>>> directory when not under buildbot. Nothing in the environment
>>> looked out or place, so idk why that happens.
>>
>> Maybe it depends on the current drive, g: vs G:.
>
> I have quickly tested locally on a Windows 10 enterprise, it seems that
> you can go either on the c: drive or the C: drive and it respect the
> case of the drive you typed.
>
> Here is some lines from my tests:
>
> C:\Users\Octobus\mercurial\test>hg log
> ('PATH', 'C:\\Users\\Octobus\\mercurial\\test',
> 'C:\\Users\\Octobus\\mercurial')
>
> C:\Users\Octobus\mercurial\test>cd c:\
>
> c:\>cd Users\Octobus\mercurial\test
>
> c:\Users\Octobus\mercurial\test>hg log
> ('PATH', 'c:\\Users\\Octobus\\mercurial\\test',
> 'c:\\Users\\Octobus\\mercurial')
>
> Where the printed line comes from:
>
> print("PATH", os.getcwd(), os.path.dirname(os.getcwd()))
>
> Hope it helps
Fascinating. Matt, could you grep for "g:" in the buildbot's configuration on your end? I wonder if something got configured with a lowercase G instead of uppercase.
Another workaround would be that if we have a case-insensitive filesystem, we could have the test only verify that lower(RUNTESTDIR) is what we expect. Gross, but it'd avoid this kind of problem...
>
>> _______________________________________________
>> Mercurial-devel mailing list
>> Mercurial-devel at mercurial-scm.org
>> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
More information about the Mercurial-devel
mailing list