summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2018-01-21 00:41:34 +0100
committerDavid Robillard <d@drobilla.net>2018-01-21 00:41:34 +0100
commitf77283d735d202e5c15d072e195325b1f876e461 (patch)
tree1682264a2b5fa5098b493ffffe4c42af076b5b98
parentaf3e1e78558c7b0917c6bf2f838bc90452ab514e (diff)
downloadingen-f77283d735d202e5c15d072e195325b1f876e461.tar.gz
ingen-f77283d735d202e5c15d072e195325b1f876e461.tar.bz2
ingen-f77283d735d202e5c15d072e195325b1f876e461.zip
Use new autowaf scoped test syntax
-rw-r--r--wscript41
1 files changed, 20 insertions, 21 deletions
diff --git a/wscript b/wscript
index aa6cd7e6..f62ba46f 100644
--- a/wscript
+++ b/wscript
@@ -344,26 +344,25 @@ def test(ctx):
os.path.join('src', 'server')])
autowaf.pre_test(ctx, APPNAME, dirs=['.', 'src', 'tests'])
- autowaf.begin_tests(ctx, APPNAME)
-
- empty = ctx.path.find_node('tests/empty.ingen')
- empty_path = os.path.join(empty.abspath(), 'main.ttl')
- for i in ctx.path.ant_glob('tests/*.ttl'):
- # Run test
- autowaf.run_test(ctx, APPNAME,
- 'ingen_test --load %s --execute %s' % (empty.abspath(), i.abspath()),
- dirs=['.', 'src', 'tests'])
-
- # Check undo output for changes
- base = os.path.basename(i.abspath().replace('.ttl', ''))
- undone_path = base + '.undo.ingen/main.ttl'
- test_file_equals(empty_path, os.path.abspath(undone_path))
-
- # Check redo output for changes
- out_path = base + '.out.ingen/main.ttl'
- redone_path = base + '.redo.ingen/main.ttl'
- test_file_equals(out_path, os.path.abspath(redone_path))
-
- autowaf.end_tests(ctx, APPNAME)
+
+ with autowaf.begin_tests(ctx, APPNAME, 'system'):
+ empty = ctx.path.find_node('tests/empty.ingen')
+ empty_path = os.path.join(empty.abspath(), 'main.ttl')
+ for i in ctx.path.ant_glob('tests/*.ttl'):
+ # Run test
+ autowaf.run_test(ctx, APPNAME,
+ 'ingen_test --load %s --execute %s' % (empty.abspath(), i.abspath()),
+ dirs=['.', 'src', 'tests'])
+
+ # Check undo output for changes
+ base = os.path.basename(i.abspath().replace('.ttl', ''))
+ undone_path = base + '.undo.ingen/main.ttl'
+ test_file_equals(empty_path, os.path.abspath(undone_path))
+
+ # Check redo output for changes
+ out_path = base + '.out.ingen/main.ttl'
+ redone_path = base + '.redo.ingen/main.ttl'
+ test_file_equals(out_path, os.path.abspath(redone_path))
+
autowaf.post_test(ctx, APPNAME, dirs=['.', 'src', 'tests'],
remove=['/usr*'])