That pesky windows run-tests failure on the buildbot
Matt Harbison
mharbison72 at gmail.com
Wed Dec 13 19:02:59 EST 2017
On Wed, Dec 13, 2017 at 9:31 AM, Augie Fackler <raf at durin42.com> wrote:
>
> > 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
>
> The only hits were in the twistd log, and correspond to the environment
variables in the stdio link for run-tests.py (like '_', PATH, etc). I
checked PATH on the Windows side, and G: is uppercased everywhere
%SYSTEMROOT% isn't used.
It seems like a difference between cmd.exe and MSYS:
G:\Users\test>cd projects\hg-default-x86_64
G:\Users\test\projects\hg-default-x86_64>python -c "import os; print
os.path.abspath('.')"
G:\Users\test\projects\hg-default-x86_64
$ cd "G:\Users\test\projects\hg-default-x86_64"
$ python -c "import os; print os.path.abspath('.')"
g:\Users\test\projects\hg-default-x86_64
$ df -h
Filesystem Size Used Avail Use% Mounted on
G:\Users\test\AppData\Local\Temp
62G 48G 14G 79% /tmp
C:\MinGW\msys\1.0 30G 27G 2.8G 91% /usr
C:\MinGW\msys\1.0 30G 27G 2.8G 91% /
C:\MinGW 30G 27G 2.8G 91% /mingw
c: 30G 27G 2.8G 91% /c
d: 15G 8.1G 6.6G 56% /d
e: 15G 7.9G 6.9G 54% /e
f: 30G 16G 15G 52% /f
g: 62G 48G 14G 79% /g
df: `/i': no medium
No how to change that, or if it is even possible. But I just re-ran
test-run-test.t, and it works in this same directory. I wonder if an upper
case path is leaking through buildbot somehow. I lowercased the driver
letter 'basedir' in buildbot.tac, and we'll see what that does.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.mercurial-scm.org/pipermail/mercurial-devel/attachments/20171213/46f6ac4c/attachment.html>
More information about the Mercurial-devel
mailing list