2.4.2 make tests fails on debian squeeze and wheezy

Bendtsen, Jon Jon.Bendtsen at laerdal.dk
Tue Jan 8 16:42:02 UTC 2013


On 08/01/2013, at 17.27, Mads Kiilerich <mads at kiilerich.com> wrote:

> On 01/08/2013 05:13 PM, Bendtsen, Jon wrote:
>> On 08/01/2013, at 17.04, Mads Kiilerich <mads at kiilerich.com>
>>  wrote:
>>> You are running the tests as root, and the tests that validates that Mercurial works as expected even with insufficient permissions will thus fail to fail. I guess we could make the test suite handle that somehow, but running the test as root is such a bad idea that nobody cares. 
>> But I needs to run it as root to install it.
> 
> That would only be needed for the 'install' step, and it is not a good idea to install files in /usr anyway. It might be better to set PREFIX or use 'make install-home'.

I think they are installed in /usr/local by default, at least that is where mine are installed.


> I prefer to use 'make local' and symlink 'hg' to somewhere in $PATH.
> 
> (And the test suite is mainly intended for developers. There is rarely a good reason to run it when installing a released version on a 'normal' platform.)

okay, but here is a patch anyway, because I always run make tests when installing from source.

root at dkhg:/usr/local/src/mercurial-2.4.2/tests# diff -u original.run-tests.py jons.run-tests.py 
--- original.run-tests.py	2013-01-08 16:33:42.740586667 +0000
+++ jons.run-tests.py	2013-01-08 16:39:40.907579581 +0000
@@ -1176,6 +1176,11 @@
 
     tests = args
 
+    uid=os.geteuid()
+    if 0 == uid:
+	print "\nYou should not run the tests as root because some of the tests will fail.\n"
+	sys.exit(1)
+
     # Reset some environment variables to well-known values so that
     # the tests produce repeatable output.
     os.environ['LANG'] = os.environ['LC_ALL'] = os.environ['LANGUAGE'] = 'C'




JonB



More information about the Mercurial mailing list