summaryrefslogtreecommitdiffstats
path: root/wscript
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2016-07-10 13:53:42 -0400
committerDavid Robillard <d@drobilla.net>2016-07-10 13:53:42 -0400
commit54f33b063642467adfe369fe1abd76c13af95734 (patch)
treeda22cd822f9d8007e0c355d0a923a5d34fbe0b24 /wscript
parentd985a2ee02311a81feb417677d24903c4b97398f (diff)
downloadlilv-54f33b063642467adfe369fe1abd76c13af95734.tar.gz
lilv-54f33b063642467adfe369fe1abd76c13af95734.tar.bz2
lilv-54f33b063642467adfe369fe1abd76c13af95734.zip
Test versioned plugin replacement
Diffstat (limited to 'wscript')
-rw-r--r--wscript24
1 files changed, 16 insertions, 8 deletions
diff --git a/wscript b/wscript
index 4472a9c..b997074 100644
--- a/wscript
+++ b/wscript
@@ -26,7 +26,9 @@ test_plugins = ['missing_descriptor',
'missing_name',
'missing_port_name',
'lib_descriptor',
- 'failed_lib_descriptor']
+ 'failed_lib_descriptor',
+ 'old_version',
+ 'new_version']
def options(opt):
opt.load('compiler_c')
@@ -286,6 +288,9 @@ def build(bld):
uselib = 'LV2')
for p in test_plugins:
+ if not bld.path.find_node('test/%s.lv2/test_%s.c' % (p, p)):
+ continue
+
obj = bld(features = 'c cprogram',
source = 'test/%s.lv2/test_%s.c' % (p, p),
target = 'test/test_%s' % p,
@@ -321,9 +326,10 @@ def build(bld):
autowaf.use_lib(bld, obj, 'SERD SORD SRATOM LV2')
# Unit test program
- blddir = autowaf.build_dir(APPNAME, 'test')
- bpath = os.path.abspath(os.path.join(blddir, 'test.lv2'))
- bpath = bpath.replace('\\', '/')
+ testdir = os.path.abspath(autowaf.build_dir(APPNAME, 'test'))
+ bpath = os.path.join(testdir, 'test.lv2')
+ bpath = bpath.replace('\\', '/')
+ testdir = testdir.replace('\\', '/')
obj = bld(features = 'c cprogram',
source = 'test/lilv_test.c',
includes = ['.', './src'],
@@ -331,7 +337,8 @@ def build(bld):
lib = test_libs,
target = 'test/lilv_test',
install_path = None,
- defines = defines + ['LILV_TEST_BUNDLE=\"%s/\"' % bpath],
+ defines = (defines + ['LILV_TEST_BUNDLE=\"%s/\"' % bpath] +
+ ['LILV_TEST_DIR=\"%s/\"' % testdir]),
cflags = test_cflags)
autowaf.use_lib(bld, obj, 'SERD SORD SRATOM LV2')
@@ -437,9 +444,10 @@ def test(ctx):
autowaf.run_test(ctx, APPNAME, 'lilv_test', dirs=['./src','./test'], name='lilv_test')
for p in test_plugins:
- autowaf.run_test(ctx, APPNAME,
- 'test_' + p + ' ' + ('test/%s.lv2/' % p),
- 0, dirs=['./src','./test','./test/%s.lv2' % p])
+ test_prog = 'test_' + p + ' ' + ('test/%s.lv2/' % p)
+ if os.path.exists('test/test_' + p):
+ autowaf.run_test(ctx, APPNAME, test_prog, 0,
+ dirs=['./src','./test','./test/%s.lv2' % p])
autowaf.post_test(ctx, APPNAME)
try: