Commit 1a0ff5e2 authored by Stefan Behnel's avatar Stefan Behnel

handle 'cpp' tag in end-to-end srctree tests

parent b1bef0ae
......@@ -172,8 +172,10 @@ def unpack_source_tree(tree_file, dir=None):
header = []
cur_file = None
f = open(tree_file)
lines = f.readlines()
f.close()
try:
lines = f.readlines()
finally:
f.close()
f = None
for line in lines:
if line[:5] == '#####':
......@@ -186,7 +188,7 @@ def unpack_source_tree(tree_file, dir=None):
cur_file = open(path, 'w')
elif cur_file is not None:
cur_file.write(line)
else:
elif line.strip() and not line.lstrip().startswith('#'):
header.append(line)
if cur_file is not None:
cur_file.close()
......
......@@ -376,7 +376,8 @@ class TestBuilder(object):
mode = 'pyregr'
if ext == '.srctree':
suite.addTest(EndToEndTest(filepath, workdir, self.cleanup_workdir))
if 'cpp' not in tags['tag'] or 'cpp' in self.languages:
suite.addTest(EndToEndTest(filepath, workdir, self.cleanup_workdir))
continue
# Choose the test suite.
......
# tag: cpp
PYTHON setup.py build_ext --inplace
PYTHON -c "import a; a.use_vector([1,2,3])"
......
# tag: cpp
PYTHON setup.py build_ext --inplace
PYTHON -c "import a"
......
# tag: cpp
PYTHON setup.py build_ext --inplace
PYTHON test.py
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment