summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjose.lausuch <jose.lausuch@ericsson.com>2016-01-28 00:49:22 +0100
committerJose Lausuch <jose.lausuch@ericsson.com>2016-01-27 23:50:09 +0000
commit402d87543e7da37c85803238f4d73bcd4511da21 (patch)
tree9b93725c6a2318d0da429304a576b9e2408ae489
parent2f66c60ff09bd1f3505ba276b151eb6f6a2d90b1 (diff)
Fix promise test output
Change-Id: I12bda2e9953228bd0db1810a8a06bfe2e1644ac8 Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com> (cherry picked from commit 9c6eeae44d8e82fb7af2111784474628ec839a46)
-rw-r--r--testcases/features/promise.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/testcases/features/promise.py b/testcases/features/promise.py
index f361d8ba6..0dc755b57 100644
--- a/testcases/features/promise.py
+++ b/testcases/features/promise.py
@@ -181,15 +181,15 @@ def main():
os.environ["OS_TEST_IMAGE"] = image_id
os.environ["OS_TEST_FLAVOR"] = flavor_id
+ os.chdir(PROMISE_REPO)
results_file=open('promise-results.json','w+')
cmd = 'DEBUG=1 npm run -s test -- --reporter json'
start_time_ts = time.time()
logger.info("Running command: %s" % cmd)
- os.chdir(PROMISE_REPO)
ret = subprocess.call(cmd, shell=True, stdout=results_file, \
stderr=subprocess.STDOUT)
-
+ results_file.close()
end_time_ts = time.time()
duration = round(end_time_ts - start_time_ts, 1)
@@ -201,6 +201,7 @@ def main():
test_status = "Failed"
# Print output of file
+ results_file=open('promise-results.json','r')
print results_file.read()
results_file.close()