aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2011-09-04 10:52:59 -0700
committerAlon Zakai <alonzakai@gmail.com>2011-09-04 10:52:59 -0700
commit391fb94d3f3ceb218bb2a7920ad40ac6e7f70529 (patch)
tree466195b13b4f74ffc646c90e0be2ce8614f33f87 /tests
parentff8ea20b9b60ef0425c82390314608f31927524e (diff)
fix llvm opts for 3.0
Diffstat (limited to 'tests')
-rw-r--r--tests/runner.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/runner.py b/tests/runner.py
index 19e703f1..381bea07 100644
--- a/tests/runner.py
+++ b/tests/runner.py
@@ -79,6 +79,7 @@ class RunnerCore(unittest.TestCase):
if LLVM_OPTS:
shutil.move(filename + '.o', filename + '.o.pre')
output = Popen([LLVM_OPT, filename + '.o.pre'] + LLVM_OPT_OPTS + ['-o=' + filename + '.o'], stdout=PIPE, stderr=STDOUT).communicate()[0]
+ assert os.path.exists(filename + '.o'), 'Failed to run llvm optimizations: ' + output
def do_llvm_dis(self, filename):
# LLVM binary ==> LLVM assembly
@@ -86,8 +87,8 @@ class RunnerCore(unittest.TestCase):
os.remove(filename + '.o.ll')
except:
pass
- Popen([LLVM_DIS, filename + '.o'] + LLVM_DIS_OPTS + ['-o=' + filename + '.o.ll'], stdout=PIPE, stderr=STDOUT).communicate()[0]
- assert os.path.exists(filename + '.o.ll'), 'Could not create .ll file'
+ output = Popen([LLVM_DIS, filename + '.o'] + LLVM_DIS_OPTS + ['-o=' + filename + '.o.ll'], stdout=PIPE, stderr=STDOUT).communicate()[0]
+ assert os.path.exists(filename + '.o.ll'), 'Could not create .ll file: ' + output
def do_llvm_as(self, source, target):
# LLVM assembly ==> LLVM binary
@@ -145,6 +146,7 @@ class RunnerCore(unittest.TestCase):
# C++ => LLVM binary
os.chdir(dirname)
cwd = os.getcwd()
+
for f in [filename] + additional_files:
try:
# Make sure we notice if compilation steps failed