Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 637240

Summary: >=dev-vcs/mercurial-4.3: Fails test test-revset.t due to exported P
Product: Gentoo Linux Reporter: christoperrine
Component: Current packagesAssignee: Lars Wendler (Polynomial-C) (RETIRED) <polynomial-c>
Status: RESOLVED CANTFIX    
Severity: normal CC: kingjon3377
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: Unset environment variable P in test revtest2.t

Description christoperrine 2017-11-12 14:39:05 UTC
The test suite of mercurial fails the tests test-revset.t. The error (if the test does not timeout see #608720) is


# Running sh "/var/tmp/portage/dev-vcs/mercurial-4.3/temp/test/child1/test-revset.t.sh" 

--- /var/tmp/portage/dev-vcs/mercurial-4.3/work/mercurial-4.3/tests/test-revset.t
+++ /var/tmp/portage/dev-vcs/mercurial-4.3/work/mercurial-4.3/tests/test-revset.t.err
@@ -4453,7 +4453,8 @@
   > EOF

   $ hg --config revsetalias.P=1 log -r . -T '\n'
-  P=[1]
+  abort: unknown revision 'mercurial'!
+  [255]
   $ P=3 hg --config revsetalias.P=2 log -r . -T '\n'
   P=[3]

ERROR: test-revset.t output changed


I've tracked the error down. The problem is that the environment variable P exists (set by the ebuild to 'mercurial') but the test expects it to not be defined.

As a workaround putting a

   $ unset P

before calling "$ hg --config revsetalias.P=1 log -r . -T '\n'" solves the problem but there might also be other fixes (e.g. unset P inside the ebuild in src_test()).
Comment 1 christoperrine 2017-11-12 19:00:17 UTC
I'd might add that the same happens for dev-vcs/mercurial-4.4.1.
Comment 2 christoperrine 2019-03-23 07:50:08 UTC
Still present in mercurial-4.9.

What prevents you from fixing this? Either by patching in an "$ unset P" into b/tests/test-revset2.t or by putting an "unset P" into src_test() in the ebuild.

(Note that the test moved in the meanwhile from test-revset.t to test-revset2.t)
Comment 3 christoperrine 2019-03-23 07:52:20 UTC
Created attachment 570344 [details, diff]
Unset environment variable P in test revtest2.t

Patch which inserts "$ unset P" into the mercurial test test-revset2.t
Comment 4 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2019-04-20 21:26:55 UTC
Test are now restricted due to too many failures...