diff tests/hghave.py @ 44990:62bdb288c449

tests: add hghave rule 'setprocname' to check if osutil.setprocname and use it setprocname is not present when we build a pure version. This leads to output changes in test-chg.t This should make test suite green on Python 2 pure build with chg. Differential Revision: https://phab.mercurial-scm.org/D8638
author Pulkit Goyal <7895pulkit@gmail.com>
date Wed, 17 Jun 2020 17:46:30 +0530
parents 89f83e47e9c9
children 3a6ec080b521
line wrap: on
line diff
--- a/tests/hghave.py	Fri Jun 19 20:42:14 2020 +0530
+++ b/tests/hghave.py	Wed Jun 17 17:46:30 2020 +0530
@@ -683,6 +683,17 @@
     return True
 
 
+@check("setprocname", "whether osutil.setprocname is available or not")
+def has_setprocname():
+    try:
+        from mercurial.utils import procutil
+
+        procutil.setprocname
+        return True
+    except AttributeError:
+        return False
+
+
 @check("test-repo", "running tests from repository")
 def has_test_repo():
     t = os.environ["TESTDIR"]