Files
pybindgen/tests/wscript
T
Gustavo J. A. M. Carneiro b211d8ec0f Enable more compiler warnings.
2007-06-07 11:55:41 +01:00

33 lines
798 B
Python

## -*- python -*-
import sys
import os.path
import os
import pproc as subprocess
def build(bld):
top_srcdir = bld.m_srcnode.abspath()
gen = bld.create_obj('command-output')
gen.command = 'test-generation.py'
gen.stdout = 'test.cc'
gen.argv = [gen.input_file('test-generation.py'), top_srcdir]
gen.command = 'python'
gen.command_is_external = True
gen.prio = 5
obj = bld.create_obj('cpp', 'objects', 'pyext')
obj.source = 'test.cc'
if os.path.basename(obj.env['CXX']).startswith("g++"):
obj.env.append_value('CXXFLAGS', ['-Werror', '-Wno-unused'])
cwd = os.getcwd()
os.chdir(top_srcdir)
try:
if subprocess.Popen(['python', 'tests/test.py']).wait():
raise SystemExit(1)
finally:
os.chdir(cwd)