Check for a properly exit if the tests failed

This commit is contained in:
Mario de Frutos 2015-12-09 13:13:24 +01:00
parent bdde91b660
commit 298a893ec5

View File

@ -3,6 +3,7 @@ import sys
import time
import subprocess
import os
import re
from helpers.import_helper import ImportHelper
@ -46,8 +47,16 @@ def usage():
def execute_tests():
process = subprocess.Popen(["nosetests", "--where=integration/"])
process.wait()
process = subprocess.Popen(
["nosetests", "--where=integration/"],
stdout=subprocess.PIPE,
stderr=subprocess.PIPE
)
out, err = process.communicate()
print err
regexp = re.compile(r'FAILED \(.*\)')
if regexp.search(err) is not None:
sys.exit(1)
def set_environment_variables(username, api_key, table_name, host):