[Updated] D8638: tests: update output in test-chg.t as setprocname missing in pure build
pulkit (Pulkit Goyal)
phabricator at mercurial-scm.org
Sat Jun 20 11:20:35 UTC 2020
Closed by commit rHGe4d2efb76c94: tests: add hghave rule 'setprocname' to check if osutil.setprocname and use it (authored by pulkit).
This revision was automatically updated to reflect the committed changes.
This revision was not accepted when it landed; it landed in state "Needs Review".
CHANGED PRIOR TO COMMIT
https://phab.mercurial-scm.org/D8638?vs=21659&id=21671#toc
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D8638?vs=21659&id=21671
CHANGES SINCE LAST ACTION
https://phab.mercurial-scm.org/D8638/new/
REVISION DETAIL
https://phab.mercurial-scm.org/D8638
AFFECTED FILES
tests/hghave.py
tests/test-chg.t
CHANGE DETAILS
diff --git a/tests/test-chg.t b/tests/test-chg.t
--- a/tests/test-chg.t
+++ b/tests/test-chg.t
@@ -229,13 +229,13 @@
server.log.1
print only the last 10 lines, since we aren't sure how many records are
-preserved (since setprocname isn't available on py3, the 10th-most-recent line
-is different when using py3):
+preserved (since setprocname isn't available on py3 and pure version,
+the 10th-most-recent line is different when using py3):
$ cat log/server.log.1 log/server.log | tail -10 | filterlog
- YYYY/MM/DD HH:MM:SS (PID)> confighash = ... mtimehash = ... (py3 !)
+ YYYY/MM/DD HH:MM:SS (PID)> confighash = ... mtimehash = ... (no-setprocname !)
YYYY/MM/DD HH:MM:SS (PID)> forked worker process (pid=...)
- YYYY/MM/DD HH:MM:SS (PID)> setprocname: ... (no-py3 !)
+ YYYY/MM/DD HH:MM:SS (PID)> setprocname: ... (setprocname !)
YYYY/MM/DD HH:MM:SS (PID)> received fds: ...
YYYY/MM/DD HH:MM:SS (PID)> chdir to '$TESTTMP/extreload'
YYYY/MM/DD HH:MM:SS (PID)> setumask 18
diff --git a/tests/hghave.py b/tests/hghave.py
--- a/tests/hghave.py
+++ b/tests/hghave.py
@@ -683,6 +683,17 @@
return True
+ at 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"]
To: pulkit, #hg-reviewers
Cc: mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20200620/c227b3ff/attachment-0002.html>
More information about the Mercurial-patches
mailing list