Skip to content

Commit

Permalink
[dvs] Re-add runcmd_async command (sonic-net#1508)
Browse files Browse the repository at this point in the history
Signed-off-by: Danny Allen <daall@microsoft.com>
  • Loading branch information
daall authored Nov 18, 2020
1 parent 86e1171 commit 5ba548c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,10 @@ def runcmd(self, cmd: str) -> int:

return 0

# used in buildimage tests, do not delete
def runcmd_async(self, cmd: str) -> subprocess.Popen:
return subprocess.Popen(f"ip netns exec {self.nsname} {cmd}", shell=True)

def runcmd_output(self, cmd: str) -> str:
return subprocess.check_output(f"ip netns exec {self.nsname} {cmd}", shell=True).decode("utf-8")

Expand Down

0 comments on commit 5ba548c

Please sign in to comment.