##// END OF EJS Templates
tests: add hghave rule 'setprocname' to check if osutil.setprocname and use it...
Pulkit Goyal -
r45514:e4d2efb7 default draft
parent child Browse files
Show More
@@ -683,6 +683,17 b' def has_serve():'
683 683 return True
684 684
685 685
686 @check("setprocname", "whether osutil.setprocname is available or not")
687 def has_setprocname():
688 try:
689 from mercurial.utils import procutil
690
691 procutil.setprocname
692 return True
693 except AttributeError:
694 return False
695
696
686 697 @check("test-repo", "running tests from repository")
687 698 def has_test_repo():
688 699 t = os.environ["TESTDIR"]
@@ -229,13 +229,13 b' check that server events are recorded:'
229 229 server.log.1
230 230
231 231 print only the last 10 lines, since we aren't sure how many records are
232 preserved (since setprocname isn't available on py3, the 10th-most-recent line
233 is different when using py3):
232 preserved (since setprocname isn't available on py3 and pure version,
233 the 10th-most-recent line is different when using py3):
234 234
235 235 $ cat log/server.log.1 log/server.log | tail -10 | filterlog
236 YYYY/MM/DD HH:MM:SS (PID)> confighash = ... mtimehash = ... (py3 !)
236 YYYY/MM/DD HH:MM:SS (PID)> confighash = ... mtimehash = ... (no-setprocname !)
237 237 YYYY/MM/DD HH:MM:SS (PID)> forked worker process (pid=...)
238 YYYY/MM/DD HH:MM:SS (PID)> setprocname: ... (no-py3 !)
238 YYYY/MM/DD HH:MM:SS (PID)> setprocname: ... (setprocname !)
239 239 YYYY/MM/DD HH:MM:SS (PID)> received fds: ...
240 240 YYYY/MM/DD HH:MM:SS (PID)> chdir to '$TESTTMP/extreload'
241 241 YYYY/MM/DD HH:MM:SS (PID)> setumask 18
General Comments 0
You need to be logged in to leave comments. Login now