diff options
author | David Robillard <d@drobilla.net> | 2020-06-28 19:46:47 +0200 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2020-10-27 13:13:59 +0100 |
commit | ba2dc6b53c8dd840651fc9e2c10790989b9cee9f (patch) | |
tree | a824e5de81d054097cd8b2021d3d3f7340f096d4 /wscript | |
parent | 834ca36d4cbbfd63789f7894ab2d5d370347d76f (diff) | |
download | serd-ba2dc6b53c8dd840651fc9e2c10790989b9cee9f.tar.gz serd-ba2dc6b53c8dd840651fc9e2c10790989b9cee9f.tar.bz2 serd-ba2dc6b53c8dd840651fc9e2c10790989b9cee9f.zip |
WIP: Make Writer always write to a ByteSink
Diffstat (limited to 'wscript')
-rw-r--r-- | wscript | 16 |
1 files changed, 10 insertions, 6 deletions
@@ -625,8 +625,7 @@ def test_suite(ctx, if expected_return == 0: # Run model test for positive test (must succeed) out_path = action + '.model.out' - check([command[0]] + ['-m'] + command[1:], - stdout=out_path, + check([command[0]] + ['-w', out_path, '-m'] + command[1:], name=action + ' model') if result and ((mf + 'result') in model[test]): @@ -723,8 +722,9 @@ def test(tst): out_path = in_path + '.io' check_path = '%s/tests/good/%s' % (srcdir, check_name) - check([serdi, '-o', lang, '-I', in_path, '%s/%s' % (srcdir, in_path)], - stdout=out_path, name=in_name) + check([serdi, '-o', lang, '-I', in_path, '-w', out_path, + '%s/%s' % (srcdir, in_path)], + name=in_name) check.file_equals(check_path, out_path) @@ -751,8 +751,8 @@ def test(tst): with tst.group('MultiFile') as check: path = '%s/tests/multifile' % srcdir - check([serdi, '%s/input1.ttl' % path, '%s/input2.trig' % path], - stdout='tests/multifile/output.out.nq') + check([serdi, '-w', 'tests/multifile/output.out.nq', + '%s/input1.ttl' % path, '%s/input2.trig' % path]) check.file_equals('%s/tests/multifile/output.nq' % srcdir, 'tests/multifile/output.out.nq') @@ -802,6 +802,10 @@ def test(tst): stdout='/dev/full', name='Short write error') check([serdi, 'file://%s/tests/good/manifest.ttl' % srcdir], stdout='/dev/full', name='Long write error') + if os.path.exists('/proc/cpuinfo'): + check([serdi, '-w', '/proc/cpuinfo', + 'file://%s/tests/good/base.ttl' % srcdir], + name='Read-only write error') if sys.version_info.major >= 3: from waflib.extras import autoship |