summaryrefslogtreecommitdiffstats
path: root/test/D/SharedObjects
diff options
context:
space:
mode:
authorRussel Winder <russel@winder.org.uk>2014-09-14 16:27:51 (GMT)
committerRussel Winder <russel@winder.org.uk>2014-09-14 16:27:51 (GMT)
commita7cd008ff19d54fc63f8a22cbec00d12e743c800 (patch)
treebd0759c497b84500377ecc5a4035d9c62b2915ca /test/D/SharedObjects
parentb4a7c2ef597d5659c67468cdac7705554f08e94c (diff)
downloadSCons-a7cd008ff19d54fc63f8a22cbec00d12e743c800.zip
SCons-a7cd008ff19d54fc63f8a22cbec00d12e743c800.tar.gz
SCons-a7cd008ff19d54fc63f8a22cbec00d12e743c800.tar.bz2
Refactoring and amendment to ensure correct behaviour of D tool shared library tests on OSX.
Diffstat (limited to 'test/D/SharedObjects')
-rw-r--r--test/D/SharedObjects/Common/common.py26
-rw-r--r--test/D/SharedObjects/sconstest-gdc.py3
2 files changed, 17 insertions, 12 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))
diff --git a/test/D/SharedObjects/sconstest-gdc.py b/test/D/SharedObjects/sconstest-gdc.py
index 7d0f28c..43bb8eb 100644
--- a/test/D/SharedObjects/sconstest-gdc.py
+++ b/test/D/SharedObjects/sconstest-gdc.py
@@ -27,9 +27,6 @@ Test compiling and executing using the gcd tool.
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
-import TestSCons
-TestSCons.TestSCons().skip_test('SKIPPED... gdc does not, as at version 4.9.1, support shared libraries.\n')
-
from Common.common import testForTool
testForTool('gdc')