Environment to run tests in, changing file permissions on Cygwin
Dr Rainer Woitok
rainer.woitok at gmail.com
Thu Jan 28 14:18:45 UTC 2016
Greetings,
after recently updating my local clone of the Mercurial source reposit-
ory to 3.7-rc+epsilon I ran "make tests" just for the fun of it ... and
received plenty of output. Among other things the output contained
--- /home/Rainer/repo/mercurial/tests/test-run-tests.t
+++ /home/Rainer/repo/mercurial/tests/test-run-tests.t.err
@@ -241,21 +241,21 @@
======================
$ rt --debug 2>&1 | grep -v pwd
- + echo *SALT* 0 0 (glob)
+ Trace: echo SALT1453980545 0 0
*SALT* 0 0 (glob)
- + echo babar
+ Trace: echo babar
babar
which obviously originated in my shell running with environment variable
"PS4" being set to "Trace:". After checking my other environment vari-
ables for additional suspects which might foul the Mercurial test suite,
I ran "make tests" in a slightly reduced environment with much better
results:
$ unset CDPATH PS4
$ export HGPLAINEXCEPT= HGRCPATH= LANG=C LC_ALL=C
$ make tests
Perhaps "run-tests.py" should be a bit more restictive regarding vari-
ables inherited from the environment. Should it inherit more than just
"PATH"?
Still the output produced by "run-tests.py" differs from what is expect-
ed. Many, but as far as I can see not all deviations have to do with
changes to a file's permissions, which are not recognized by my local
Mercurial clone, as in:
--- /home/Rainer/repo/mercurial/tests/test-revert.t
+++ /home/Rainer/repo/mercurial/tests/test-revert.t.err
@@ -169,20 +169,19 @@
#if execbit
$ chmod +x c
$ hg revert --all
- reverting c
Maybe that's a general Cygwin problem, as Cygwin's stock Mercurial pack-
age features the same behaviour, as can be seen in:
$ PS4=' $ ' ksh -x ~/scr/test 2>&1
$ umask 077
$ export 'HGPLAINEXCEPT=' 'HGRCPATH='
$ rm -rf repo
$ /bin/hg init repo
$ cd repo
/home/Rainer/tmp/repo
$ touch x
$ /bin/hg status -A
? x
$ /bin/hg commit -Am 'Add x'
adding x
$ ls -l x
-rw------- 1 Rainer win 0 2016-01-28 13:00 x
$ chmod +x x
$ ls -l x
-rwx------ 1 Rainer win 0 2016-01-28 13:00 x
$ /bin/hg status -A
C x
$ /bin/hg --version
Mercurial Distributed SCM (version 3.5.2)
(see http://mercurial.selenic.com for more information)
Copyright (C) 2005-2015 Matt Mackall and others
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
$
Can this be fixed or is this a Cygwin (or Windows) limitation? Oh, be-
fore I forget: this is a fairly current Cygwin on Windows Vista 32 Bit:
$ uname -srv
CYGWIN_NT-6.0 2.4.1(0.293/5/3) 2016-01-24 11:24
$
Sincerely,
Rainer
More information about the Mercurial
mailing list