summaryrefslogtreecommitdiff
path: root/tests/common/process.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/common/process.py')
-rw-r--r--tests/common/process.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/common/process.py b/tests/common/process.py
new file mode 100644
index 00000000..e0c61363
--- /dev/null
+++ b/tests/common/process.py
@@ -0,0 +1,7 @@
+from subprocess import Popen, PIPE
+
+def run(command):
+ process = Popen(command, stdout=PIPE, stderr=PIPE)
+ (out, err) = process.communicate()
+ exit_code = process.wait()
+ return (exit_code, out.decode("utf-8"), err.decode("utf-8")) \ No newline at end of file