From e7e0313b423a37f71a4d2cf7db7b26dfd6131140 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Mon, 19 Sep 2016 18:56:25 -0400 Subject: Avoid write error test unless /dev/full is present --- wscript | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/wscript b/wscript index 8c62e1a..28d92db 100644 --- a/wscript +++ b/wscript @@ -289,13 +289,15 @@ def test(ctx): 'sordi_static %s > %s' % (nul, nul)], 0, name='sordi-cmd-good') - autowaf.run_tests(ctx, APPNAME, [ - # Test read error by reading a directory - 'sordi_static "file://%s/"' % srcdir, - - # Test write error by writing to /dev/full - 'sordi_static "file://%s/tests/manifest.ttl" > /dev/full' % srcdir - ], 1, name='io_errors') + # Test read error by reading a directory + autowaf.run_test(ctx, APPNAME, 'sordi_static "file://%s/"' % srcdir, + 1, name='read_error') + + # Test write error by writing to /dev/full + if os.path.exists('/dev/full'): + autowaf.run_test(ctx, APPNAME, + 'sordi_static "file://%s/tests/good/manifest.ttl" > /dev/full' % srcdir, + 1, name='write_error') autowaf.run_tests(ctx, APPNAME, [ 'sordi_static > %s' % nul, -- cgit v1.2.1