diff options
author | David Robillard <d@drobilla.net> | 2018-09-17 00:20:53 +0200 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2018-09-17 00:20:53 +0200 |
commit | 29764eef1401dac32bc968f1ffdf55257e8bb4dd (patch) | |
tree | 0ce8cd40ad2b61cf6c3366a7091dd211b7decebc /wscript | |
parent | 62b184c18d90e2d973c7c4df0b712a03f4c2bbee (diff) | |
download | raul-29764eef1401dac32bc968f1ffdf55257e8bb4dd.tar.gz raul-29764eef1401dac32bc968f1ffdf55257e8bb4dd.tar.bz2 raul-29764eef1401dac32bc968f1ffdf55257e8bb4dd.zip |
Fix Windows build
Diffstat (limited to 'wscript')
-rw-r--r-- | wscript | 43 |
1 files changed, 24 insertions, 19 deletions
@@ -2,6 +2,7 @@ import os import subprocess +import sys from waflib import Options from waflib.extras import autowaf @@ -60,19 +61,19 @@ def configure(conf): autowaf.display_summary(conf, {'Unit tests': bool(conf.env.BUILD_TESTS)}) -tests = ''' - test/array_test - test/build_test - test/double_buffer_test - test/maid_test - test/path_test - test/ringbuffer_test - test/sem_test - test/socket_test - test/symbol_test - test/thread_test - test/time_test -''' +tests = ['array_test', + 'build_test', + 'double_buffer_test', + 'maid_test', + 'path_test', + 'ringbuffer_test', + 'sem_test', + 'symbol_test', + 'thread_test', + 'time_test'] + +if sys.platform != 'win32': + tests += ['socket_test'] def build(bld): # Headers @@ -104,15 +105,15 @@ def build(bld): test_linkflags += ['--coverage'] # Unit tests - for i in tests.split(): + for i in tests: obj = bld(features = 'cxx cxxprogram', - source = i + '.cpp', + source = os.path.join('test', i + '.cpp'), includes = ['.', './src'], lib = test_libs, use = 'libraul_static', uselib = 'GLIB GTHREAD', framework = framework, - target = i, + target = os.path.join('test', i), install_path = '', cxxflags = test_cxxflags, linkflags = test_linkflags, @@ -122,9 +123,13 @@ def build(bld): autowaf.build_dox(bld, 'RAUL', RAUL_VERSION, top, out) def test(ctx): - autowaf.pre_test(ctx, APPNAME, dirs=['.', 'src', 'test']) - autowaf.run_tests(ctx, APPNAME, tests.split(), dirs=['.', 'src', 'test']) - autowaf.post_test(ctx, APPNAME, dirs=['.', 'src', 'test']) + dirs = ['.', 'src', 'test'] + autowaf.pre_test(ctx, APPNAME, dirs=dirs) + autowaf.run_tests( + ctx, APPNAME, + map(lambda x: os.path.join('test', x), tests), + dirs=dirs) + autowaf.post_test(ctx, APPNAME, dirs=dirs) def lint(ctx): "checks code for style issues" |