diff options
Diffstat (limited to 'test/D/SharedObjects/Common/common.py')
-rw-r--r-- | test/D/SharedObjects/Common/common.py | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/test/D/SharedObjects/Common/common.py b/test/D/SharedObjects/Common/common.py index a5d7b27..e608fdb 100644 --- a/test/D/SharedObjects/Common/common.py +++ b/test/D/SharedObjects/Common/common.py @@ -45,15 +45,10 @@ def testForTool(tool): if not isExecutableOfToolAvailable(test, tool) : test.skip_test("Required executable for tool '{}' not found, skipping test.\n".format(tool)) - test.dir_fixture('Image') - test.write('SConstruct', open('SConstruct_template', 'r').read().format(tool)) - if tool == 'dmd': - # The gdmd executable in Debian Unstable as at 2012-05-12, version 4.6.3 puts out messages on stderr - # that cause inappropriate failure of the tests, so simply ignore them. - test.run(stderr=None) - else: - test.run() + if tool == 'gdc': + test.skip_test('gdc does not, as at version 4.9.1, support shared libraries.\n') + platform = Base()['PLATFORM'] if platform == 'posix': @@ -62,12 +57,25 @@ def testForTool(tool): elif platform == 'darwin': filename = 'code.o' libraryname = 'libanswer.dylib' - elif platform == 'win32' or platform == 'win64': + # As at 2014-09-14, DMD 2.066, LDC master head, and GDC 4.9.1 do not support + # shared libraries on OSX. + test.skip_test('Dynamic libraries not yet supported on OSX.\n') + elif platform == 'win32': filename = 'code.obj' libraryname = 'answer.dll' else: test.fail_test() + test.dir_fixture('Image') + test.write('SConstruct', open('SConstruct_template', 'r').read().format(tool)) + + if tool == 'dmd': + # The gdmd executable in Debian Unstable as at 2012-05-12, version 4.6.3 puts out messages on stderr + # that cause inappropriate failure of the tests, so simply ignore them. + test.run(stderr=None) + else: + test.run() + test.must_exist(test.workpath(filename)) test.must_exist(test.workpath(libraryname)) |