Skip to content

Commit

Permalink
Merge PR ceph#42431 into master
Browse files Browse the repository at this point in the history
* refs/pull/42431/head:
	cmake: add "mypy" back to tox envlist of "qa""
	qa/tasks/vstart_runner: add optional "sudo" param to _run_python()

Reviewed-by: Sebastian Wagner <[email protected]>
Reviewed-by: Patrick Donnelly <[email protected]>
  • Loading branch information
batrick committed Jul 22, 2021
2 parents e30663a + ffbc316 commit 4ee6317
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion qa/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ endif()

if(WITH_TESTS)
include(AddCephTest)
add_tox_test(qa TOX_ENVS py3 flake8)
add_tox_test(qa TOX_ENVS py3 flake8 mypy)
endif()
8 changes: 6 additions & 2 deletions qa/tasks/vstart_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -659,12 +659,16 @@ def _asok_path(self):
path = "{0}/client.{1}.*.asok".format(d, self.client_id)
return path

def _run_python(self, pyscript, py_version='python'):
def _run_python(self, pyscript, py_version='python', sudo=False):
"""
Override this to remove the daemon-helper prefix that is used otherwise
to make the process killable.
"""
return self.client_remote.run(args=[py_version, '-c', pyscript],
args = []
if sudo:
args.append('sudo')
args += [py_version, '-c', pyscript]
return self.client_remote.run(args=args,
wait=False, stdout=StringIO())

def setup_netns(self):
Expand Down

0 comments on commit 4ee6317

Please sign in to comment.