MCPcopy Create free account
hub / github.com/apache/httpd / run

Method run

test/pyhttpd/env.py:563–585  ·  view source on GitHub ↗
(self, args, stdout_list=False, intext=None, inbytes=None, debug_log=True)

Source from the content-addressed store, hash-verified

561 return os.makedirs(path)
562
563 def run(self, args, stdout_list=False, intext=None, inbytes=None, debug_log=True):
564 if debug_log:
565 log.debug(f"run: {args}")
566 start = datetime.now()
567 if intext is not None:
568 inbytes = intext.encode()
569 p = subprocess.run(args, stderr=subprocess.PIPE, stdout=subprocess.PIPE,
570 input=inbytes)
571 stdout_as_list = None
572 if stdout_list:
573 try:
574 out = p.stdout.decode()
575 if HttpdTestSetup.CURL_STDOUT_SEPARATOR in out:
576 stdout_as_list = out.split(HttpdTestSetup.CURL_STDOUT_SEPARATOR)
577 if not stdout_as_list[len(stdout_as_list) - 1]:
578 stdout_as_list.pop()
579 p.stdout.replace(HttpdTestSetup.CURL_STDOUT_SEPARATOR.encode(), b'')
580 except:
581 pass
582 return ExecResult(args=args, exit_code=p.returncode,
583 stdout=p.stdout, stderr=p.stderr,
584 stdout_as_list=stdout_as_list,
585 duration=datetime.now() - start)
586
587 def mkurl(self, scheme, hostname, path='/'):
588 port = self.https_port if scheme == 'https' else self.http_port

Callers 9

_run_apachectlMethod · 0.95
curl_rawMethod · 0.95
_add_aptestMethod · 0.45
_build_clientsMethod · 0.45
h2load_is_at_leastMethod · 0.45
curl_is_at_leastMethod · 0.45
curl_is_less_thanMethod · 0.45
has_nghttp_get_assetsMethod · 0.45
get_apxs_varMethod · 0.45

Calls 1

ExecResultClass · 0.85

Tested by

no test coverage detected