tests on windows

j w jwdevel at gmail.com
Tue Feb 19 18:41:05 CST 2008


Sorry for the slow response - been busy lately

I suspect I have something wrong with my pysh installation.
When trying to run the pysh tests, I get this output all the time:

   yacc: Generating LALR parsing table...
   yacc: 153 shift/reduce conflicts
   yacc: 1 reduce/reduce conflict

and 33/36 failures, ultimately.

I'm using bison 1.875, and 'bison -y' to emulate yacc. Could that be a
problem? What version do you use?

Might be a path problem on my side. Depending on what directory I run
pysh from, sometimes it tries to call yacc, sometimes it doesn't. Very
strange.

I thought I had this problem before and fixed it, but apparently
something is still wrong since the pysh tests fail.

I'm working on figuring out why the hghave checks are failing.
Possibly related to the above...

-John


On Feb 11, 2008 2:49 PM, Patrick Mézard <pmezard at gmail.com> wrote:
> Hello,
>
> j w a écrit :
> > On Jan 21, 2008 1:38 AM, Patrick Mézard <pmezard at gmail.com> wrote:
> >> Thank you for trying this, please keep posting about other issues you may have.
> >>
> >
> > Ok, I finally got to try again (my monitor had died in the interim).
> >
> > I got the patch queue to apply cleanly, and ran the tests. Now to deal
> > with all the ones that fail (:
> >
> > I guess my first question is: how can I best help improve the windows
> > test situation? Just try to fix the errors one at a time, confirm they
> > still work on a unix machine, churn churn churn?
>
> That's what I do. Let me take a look at what you have first, it's sometimes easier or more correct to fix pysh.
>
> > Here are the results from my first attempt.
> > Keep in mind, I'm trying to do this using GnuWin32 tools instead of
> > installing cygwin (which the WindowsTestingPlan lists as a
> > requirement), so that may explain some of the failures.
> >
> > Some recurring issues:
> >   - complains about spawnvp not being present (doesn't exist on
> > Windows since there's no fork)
>
> It's my fault, "hg-serve-daemon-win32" is guarded with +test in the crew-stable queue. Try with "hg qsel test". I will remove that next time I update the queue, it's already gone in the crew one.
>
> >   - 'connection refused' urlopen errors
>
> Probably related to the "hg serve" issue above.
>
> >   - symbolic link complaints (should be skipped, no? maybe use NTFS
> > junction points if available?)
>
> Junction points are hardlinks, and are not specially handled by Mercurial. Symbolic links are something I cannot fake on Windows so I work around these by:
> - Skipping the tests completely by calling "hghave symlinks" at the test beginning. This is done when the test looks irrelevant to Windows.
> - Creating test bundles containing symlinks and pushing them in test repo. This was done recently in test-keyword. It works but is clumsy and requires more maintainance.
> - Fake the reference output using a custom HGTESTOS environment variable. Useful when the symlink test makes 1% of the whole test case.
> - Let the test broken when I don't know what to do.
>
> The same applies to executable bit tests.
>
> >   - various NotImplemented errors from pysh
>
> Strange again. I just pushed an updated version of the crew (crew-stable will follow soon) patch queue. If you look at the test report:
>
> http://hg.intevation.org/mercurial/pmezard/crew-w32.mq/file/0effa7a16d29/test.log
>
> There is no NotImplemented error. Missing commands, broken scripts yes, but not this one.
>
> >   - tries to run various commands that aren't present, such as darcs and git
>
> This should be handled by hghave. Take a look at test-convert-* tests, all of them should begin with a hghave call to be skipped if relevant tools are missing.
>
> >   - various unixisms ('Unknown interpreter "#!/usr/bin/perl -w"
> > referenced in shebang', 'Unknown command: "umask"', etc.)
>
> "umask" is still missing in test-flags. But "perl" !? Where do you get that ?
>
> >         - Those are probably ones that would be fixed under cygwin
> >         - in fact I *do* have perl installed, and it would be nice if
> > that could be detected and used.
>
> Sure, that would be great, if perl was used somewhere :-)
>
> >   - I got a few popup dialogs yell at me as I was running the tests
> > (screenshots attached)
>
> Screenshots probably lost their way on the internets. Are these some "ntvdm segfaults" or something like that ? I remember having these, a long time ago but it should be fixed (cannot remember exactly where it came from, some broken gzip call I think).
>
> >
> > At the end it seemed to be hanging, so I killed it. Just before that
> > point, Windows Firewall asked me if I wanted to unblock python from
> > connecting to the internet. I chose 'unblock' but then it seemed to
> > get hung anyway...
> >
> > Here's the gory details:
> >
> > E:\Dev\projects\external\Mercurial\crew-stable\tests>run-tests.py
> > WARNING: cannot run tests with timeouts
> > ........
> > ERROR: test-archive output changed
> > --- Expected output
> > +++ Test output
> > @@ -1,20 +1,102 @@
> > +hghave: unknown feature: failure
>
> This is wrong, the script should have exited there. Following errors are expected with crew-stable.
>
> > .
> > ERROR: test-archive-symlinks output changed
> > --- Expected output
> > +++ Test output
> > @@ -1,6 +1,20 @@
> > +hghave: missing feature: symbolic links
> > +hghave: missing feature: symbolic links
>
> Should bail out there
>
> [...]
>
> > ERROR: test-audit-path output changed
> > --- Expected output
> > +++ Test output
> > @@ -2,7 +2,8 @@
> >  abort: path contains illegal component: .hg/00changelog.i
> >  adding a/a
> >  % should fail
> > -abort: path 'b/b' traverses symbolic link 'b'
> > +b/b: The system cannot find the path specified
> >  % should succeed
> > +b: The system cannot find the file specified
> >  % should still fail - maybe
> > -abort: path 'b/b' traverses symbolic link 'b'
> > +b/b: The system cannot find the path specified
>
> This output is faked by a "if "$TESTDIR/hghave" -q symlink; then".
>
> > ..
> > ERROR: test-backwards-remove output changed
> > --- Expected output
> > +++ Test output
> > @@ -1,3 +1,23 @@
> > -a
> > + Volume in drive C is C (windows)
> > + Volume Serial Number is D44B-EC2C
>
> Looks you "ls" makes a "dir", probably fixed with cygwin.
>
> > ...........
> > ERROR: test-changelog-exec output changed
> > --- Expected output
> > +++ Test output
> > @@ -1,3 +1,4 @@
> > +hghave: missing feature: executable bit
>
> hghave again.
>
> [...]
>
> > ERROR: test-clone-failure output changed
> > --- Expected output
> > +++ Test output
> > @@ -6,7 +6,34 @@
> >  255
> >  abort: destination '../a' already exists
> >  255
> > -abort: repository a not found!
>
> [...]
>
> > +    raise NotImplementedError('%s utility is not implemented' % name)
> > +NotImplementedError: mkfifo utility is not implemented
> >
> > ERROR: test-clone-failure failed with error code 1
>
> The fifo test output is faked.
>
> > ...
> > ERROR: test-command-template output changed
> > --- Expected output
> > +++ Test output
> > @@ -79,13 +79,12 @@
> >    line 1
> >
> >  # error if style not readable
> > -abort: Permission denied: ./q
> > +abort: ./q: no key named 'changeset'
> >  # error if no style
> >  abort: No such file or directory: notexist
> >  # error if style missing key
> >  abort: ./t: no key named 'changeset'
> >  # error if include fails
> > -abort: template file ./q: Permission denied
> >  # include works
> >  7
> >  6
>
> This one is a mystery.
>
> > ..........
> > ERROR: test-convert-cvs output changed
> > --- Expected output
> > +++ Test output
> > @@ -1,4 +1,6 @@
> > +hghave: missing feature: cvsps utility
> >
> > ERROR: test-convert-darcs output changed
> > --- Expected output
> > +++ Test output
> > @@ -1,29 +1,23 @@
> > +hghave: missing feature: darcs client
> >
> > ERROR: test-convert-git output changed
> > --- Expected output
> > +++ Test output
> > @@ -1,90 +1,72 @@
> > -rm 'd/b'
> > +hghave: missing feature: git command line client
> >
> > ERROR: test-convert-svn output changed
> > --- Expected output
> > +++ Test output
> > @@ -1,3 +1,4 @@
> > +hghave: missing feature: subversion python bindings
>
> hghave again.
>
> > ERROR: test-copy output changed
> > --- Expected output
> > +++ Test output
> > @@ -39,8 +39,7 @@
> >     rev    offset  length   base linkrev nodeid       p1           p2
> >       0         0      65      0       1 9a263dd772e0 000000000000 000000000000
> >  this should show the rename information in the metadata
> > -copyrev: b789fdd96dc2f3bd229c1dd8eedf0fc60e2b68e3
> > -copy: a
> > +Unknown interpreter "#!/usr/bin/perl -w" referenced in shebang
>
> head or tail is implemented with perl. pysh is very restrictive with shebangs, this one could be supported if you need it.
>
> > ..............
> > ERROR: test-dispatch output changed
> > --- Expected output
> > +++ Test output
> > @@ -29,4 +29,44 @@
> >  a
> >  a
> >  % no repo
> > -abort: There is no Mercurial repository here (.hg not found)!
> > +hg cat: invalid arguments
>
> Mysterious.
>
> > ...........
> > ERROR: test-execute-bit output changed
> > --- Expected output
> > +++ Test output
> > @@ -1,5 +1,7 @@
> > +hghave: missing feature: executable bit
>
> hghave... again.
>
> > ...
> > ERROR: test-extension output changed
> > --- Expected output
> > +++ Test output
> > @@ -4,14 +4,14 @@
> >  ui == repo.ui
> >  Foo
> >  uisetup called
> > -ui.parentui is None
> > +ui.parentui isnot None
> >  reposetup called for a
> >  ui == repo.ui
> >  reposetup called for b
> >  ui == repo.ui
> >  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
> >  uisetup called
> > -ui.parentui is None
> > +ui.parentui isnot None
> >  Bar
> >  % module/__init__.py-style
> >  uisetup called
>
> Unexpected.
>
> > ..
> > ERROR: test-fetch output changed
> > --- Expected output
> > +++ Test output
> > @@ -22,6 +22,16 @@
> >  merging with new head 2:97d72e5f12c7
> >  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
> >  new changeset 3:cd3a41621cf0 merges remote changes with local
> > -a
> > -b
> > -c
> > + Volume in drive C is C (windows)
>
> Need a better "ls"
>
> > ERROR: test-flags output changed
> > --- Expected output
> > +++ Test output
> > @@ -1,3 +1,4 @@
> > +Unknown command: "umask"
>
> This one is officially failing.
>
> > .
> > ERROR: test-git-export output changed
>
> This one too.
>
> > ERROR: test-git-import output changed
> > --- Expected output
> > +++ Test output
> > @@ -7,6 +7,7 @@
> >  applying patch from stdin
> >  % copy
> >  applying patch from stdin
> > +failed
>
> Output is faked with hghave.
>
> > ...
> > ERROR: test-grep output changed
> > --- Expected output
> > +++ Test output
> > @@ -1,10 +1,15 @@
> > +Unknown interpreter "#!/usr/bin/perl -w" referenced in shebang
>
> Same perl problem again.
>
> > ....
> > ERROR: test-hgweb output changed
>
> Stupid +test guard.
>
>
> So there are 2 big issues:
> - You must active the "test" guard
> - There is something wrong with hghave, many tests should be skipped of fixed by this. Could you write a simple test script calling hghave before an "echo" call and try to see why hghave does not work as expected. You can edit "run-tests.py" to add trace information to pysh by adding options like "--debug-utility" or "--debug-cmd". It may be a $PATH issue.
>
> Please ask if you need more details, we should deal with gnuwin32 problems later.
>
> --
> Patrick Mézard
>



More information about the Mercurial-devel mailing list