summaryrefslogtreecommitdiff
path: root/vtep
diff options
context:
space:
mode:
authorAlin Balutoiu <abalutoiu@cloudbasesolutions.com>2017-01-03 20:10:53 +0000
committerGurucharan Shetty <guru@ovn.org>2017-01-03 12:50:17 -0800
commitaaea91813933c339a1c96ab5d6b29d7b4a18c06a (patch)
tree761d9cb9ceda0d7b1f817644a353b827b7710e33 /vtep
parent9e03d7344ca9a9437dcfda068edc32e475527e63 (diff)
downloadopenvswitch-aaea91813933c339a1c96ab5d6b29d7b4a18c06a.tar.gz
Python tests: Set CREATE_NO_WINDOW flag for Popen
On Windows if the flag CREATE_NO_WINDOW is not specified when using subprocess.Popen, a new window will appear with the new process. The window is not necessary for the tests. This patch addresses this issue by adding the flag CREATE_NO_WINDOW for all subprocess.Popen calls if the machine is running Windows. Signed-off-by: Alin Balutoiu <abalutoiu@cloudbasesolutions.com> Acked-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions> Tested-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions> Signed-off-by: Gurucharan Shetty <guru@ovn.org>
Diffstat (limited to 'vtep')
-rwxr-xr-xvtep/ovs-vtep6
1 files changed, 5 insertions, 1 deletions
diff --git a/vtep/ovs-vtep b/vtep/ovs-vtep
index 9a5aa3d68..fd652d424 100755
--- a/vtep/ovs-vtep
+++ b/vtep/ovs-vtep
@@ -53,7 +53,11 @@ bfd_ref = {}
def call_prog(prog, args_list):
cmd = [prog, "-vconsole:off"] + args_list
- output = subprocess.Popen(cmd, stdout=subprocess.PIPE).communicate()
+ creationFlags = 0
+ if sys.platform == 'win32':
+ creationFlags = 0x08000000 # CREATE_NO_WINDOW
+ output = subprocess.Popen(cmd, stdout=subprocess.PIPE,
+ creationflags=creationFlags).communicate()
if len(output) == 0 or output[0] is None:
output = ""
else: