summaryrefslogtreecommitdiff
path: root/wscript
diff options
context:
space:
mode:
Diffstat (limited to 'wscript')
-rw-r--r--wscript16
1 files changed, 13 insertions, 3 deletions
diff --git a/wscript b/wscript
index 2a577eaf90..63a8203d32 100644
--- a/wscript
+++ b/wscript
@@ -164,8 +164,9 @@ def set_compiler_flags (conf,opt):
conf.define("_DARWIN_C_SOURCE", 1)
if conf.options.asan:
- conf.check_cxx(cxxflags=["-fsanitize=address"], linkflags=["-fsanitize=address"])
+ conf.check_cxx(cxxflags=["-fsanitize=address", "-fno-omit-frame-pointer"], linkflags=["-fsanitize=address"])
cxx_flags.append('-fsanitize=address')
+ cxx_flags.append('-fno-omit-frame-pointer')
linker_flags.append('-fsanitize=address')
if is_clang and platform == "darwin":
@@ -483,6 +484,8 @@ def options(opt):
help='Raise a floating point exception if a denormal is detected')
opt.add_option('--test', action='store_true', default=False, dest='build_tests',
help="Build unit tests")
+ opt.add_option('--run-tests', action='store_true', default=False, dest='run_tests',
+ help="Run tests after build")
opt.add_option('--single-tests', action='store_true', default=False, dest='single_tests',
help="Build a single executable for each unit test")
#opt.add_option('--tranzport', action='store_true', default=False, dest='tranzport',
@@ -511,7 +514,7 @@ def options(opt):
opt.add_option('--cxx11', action='store_true', default=False, dest='cxx11',
help='Turn on c++11 compiler flags (-std=c++11)')
opt.add_option('--address-sanitizer', action='store_true', default=False, dest='asan',
- help='Turn on AddressSanitizer (requires GCC >= 4.8 or clang)')
+ help='Turn on AddressSanitizer (requires GCC >= 4.8 or clang >= 3.1)')
for i in children:
opt.recurse(i)
@@ -683,7 +686,8 @@ def configure(conf):
conf.define('ENABLE_NLS', 1)
conf.env['ENABLE_NLS'] = True
if opts.build_tests:
- conf.env['BUILD_TESTS'] = opts.build_tests
+ conf.env['BUILD_TESTS'] = True
+ conf.env['RUN_TESTS'] = opts.run_tests
if opts.single_tests:
conf.env['SINGLE_TESTS'] = opts.single_tests
#if opts.tranzport:
@@ -803,6 +807,9 @@ def build(bld):
bld.install_files (os.path.join(bld.env['SYSCONFDIR'], 'ardour3', ), 'ardour_system.rc')
+ if bld.env['RUN_TESTS']:
+ bld.add_post_fun(test)
+
def i18n(bld):
bld.recurse (i18n_children)
@@ -817,3 +824,6 @@ def i18n_mo(bld):
def tarball(bld):
create_stored_revision()
+
+def test(bld):
+ subprocess.call("gtk2_ardour/artest")