aboutsummaryrefslogtreecommitdiffstats
path: root/yardstick/benchmark/scenarios/parser/parser.py
diff options
context:
space:
mode:
Diffstat (limited to 'yardstick/benchmark/scenarios/parser/parser.py')
-rw-r--r--yardstick/benchmark/scenarios/parser/parser.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/yardstick/benchmark/scenarios/parser/parser.py b/yardstick/benchmark/scenarios/parser/parser.py
index 006258d05..bb16e7c89 100644
--- a/yardstick/benchmark/scenarios/parser/parser.py
+++ b/yardstick/benchmark/scenarios/parser/parser.py
@@ -58,10 +58,12 @@ class Parser(base.Scenario):
cmd1 = "%s %s %s" % (self.parser_script, yangfile, toscafile)
cmd2 = "chmod 777 %s" % (self.parser_script)
subprocess.call(cmd2, shell=True)
- output = subprocess.call(cmd1, shell=True, stdout=subprocess.PIPE)
+ p = subprocess.Popen(cmd1, shell=True, stdout=subprocess.PIPE,
+ stderr=subprocess.PIPE)
+ p.communicate()
print "yangtotosca finished"
- result['yangtotosca'] = "success" if output == 0 else "fail"
+ result['yangtotosca'] = "success" if p.returncode == 0 else "fail"
def teardown(self):
''' for scenario teardown remove parser and pyang '''