make Honeynode and tox scripts BSD compatible
[transportpce.git] / tests / transportpce_tests / 2.2.1 / test_utils.py
index e91353003ed2f4cf1803e3fab142c2687224ed7c..ec577ad0743090969f50aeac59158157f419d398 100644 (file)
@@ -8,7 +8,7 @@ def start_xpdra_honeynode():
         with open('honeynode1.log', 'w') as outfile:
             return subprocess.Popen(
                 [executable, "17840", "sample_configs/openroadm/2.2.1/oper-XPDRA.xml"],
-                stdout=outfile)
+                stdout=outfile, stderr=outfile)
 
 def start_roadma_honeynode():
     executable = ("./honeynode/2.2.1/honeynode-distribution/target/honeynode-distribution-1.19.04-hc"
@@ -17,7 +17,7 @@ def start_roadma_honeynode():
         with open('honeynode2.log', 'w') as outfile:
             return subprocess.Popen(
                 [executable, "17841", "sample_configs/openroadm/2.2.1/oper-ROADMA.xml"],
-                stdout=outfile)
+                stdout=outfile, stderr=outfile)
 
 def start_roadmb_honeynode():
     executable = ("./honeynode/2.2.1/honeynode-distribution/target/honeynode-distribution-1.19.04-hc"
@@ -26,7 +26,7 @@ def start_roadmb_honeynode():
         with open('honeynode5.log', 'w') as outfile:
             return subprocess.Popen(
                 [executable, "17842", "sample_configs/openroadm/2.2.1/oper-ROADMB.xml"],
-                stdout=outfile)
+                stdout=outfile, stderr=outfile)
 
 def start_roadmc_honeynode():
     executable = ("./honeynode/2.2.1/honeynode-distribution/target/honeynode-distribution-1.19.04-hc"
@@ -35,7 +35,7 @@ def start_roadmc_honeynode():
         with open('honeynode3.log', 'w') as outfile:
             return subprocess.Popen(
                 [executable, "17843", "sample_configs/openroadm/2.2.1/oper-ROADMC.xml"],
-                stdout=outfile)
+                stdout=outfile, stderr=outfile)
 
 def start_xpdrc_honeynode():
     executable = ("./honeynode/2.2.1/honeynode-distribution/target/honeynode-distribution-1.19.04-hc"
@@ -44,7 +44,7 @@ def start_xpdrc_honeynode():
         with open('honeynode4.log', 'w') as outfile:
             return subprocess.Popen(
                 [executable, "17844", "sample_configs/openroadm/2.2.1/oper-XPDRC.xml"],
-                stdout=outfile)
+                stdout=outfile, stderr=outfile)
 
 def start_spdra_honeynode():
     executable = ("./honeynode/2.2.1/honeynode-distribution/target/honeynode-distribution-1.19.04-hc"
@@ -53,7 +53,7 @@ def start_spdra_honeynode():
         with open('honeynode6.log', 'w') as outfile:
             return subprocess.Popen(
                 [executable, "17845", "sample_configs/openroadm/2.2.1/oper-SPDRAv2.xml"],
-                stdout=outfile)
+                stdout=outfile, stderr=outfile)
 
 def start_tpce():
     if "USE_LIGHTY" in os.environ and os.environ['USE_LIGHTY'] == 'True':
@@ -61,12 +61,12 @@ def start_tpce():
         executable = "../lighty/target/lighty-transportpce-12.0.0-SNAPSHOT/clean-start-controller.sh"
         with open('odl.log', 'w') as outfile:
             return subprocess.Popen(
-                ["bash", executable], stdout=outfile,
+                ["sh", executable], stdout=outfile, stderr=outfile,
                 stdin=open(os.devnull))
     else:
         print ("starting KARAF TransportPCE build...")
         executable = "../karaf/target/assembly/bin/karaf"
         with open('odl.log', 'w') as outfile:
             return subprocess.Popen(
-                ["bash", executable, "server"], stdout=outfile,
+                ["sh", executable, "server"], stdout=outfile, stderr=outfile,
                 stdin=open(os.devnull))