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

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

parent b1bef0ae
......@@ -172,7 +172,9 @@ def unpack_source_tree(tree_file, dir=None):
header = []
cur_file = None
f = open(tree_file)
try:
lines = f.readlines()
finally:
f.close()
f = None
for line in lines:
......@@ -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,6 +376,7 @@ class TestBuilder(object):
mode = 'pyregr'
if ext == '.srctree':
if 'cpp' not in tags['tag'] or 'cpp' in self.languages:
suite.addTest(EndToEndTest(filepath, workdir, self.cleanup_workdir))
continue
......
# 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