diff options
author | David Robillard <d@drobilla.net> | 2018-01-21 00:41:34 +0100 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2018-01-21 00:41:34 +0100 |
commit | f77283d735d202e5c15d072e195325b1f876e461 (patch) | |
tree | 1682264a2b5fa5098b493ffffe4c42af076b5b98 /wscript | |
parent | af3e1e78558c7b0917c6bf2f838bc90452ab514e (diff) | |
download | ingen-f77283d735d202e5c15d072e195325b1f876e461.tar.gz ingen-f77283d735d202e5c15d072e195325b1f876e461.tar.bz2 ingen-f77283d735d202e5c15d072e195325b1f876e461.zip |
Use new autowaf scoped test syntax
Diffstat (limited to 'wscript')
-rw-r--r-- | wscript | 41 |
1 files changed, 20 insertions, 21 deletions
@@ -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*']) |