summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRussel Winder <russel@winder.org.uk>2017-08-23 11:03:04 +0100
committerRussel Winder <russel@winder.org.uk>2017-08-23 11:03:04 +0100
commit5c05b2bdc19a672a0707b3630cb57c26b1a55af5 (patch)
tree21098224aeecb24a9ac92ee7d158401843cc28a5
parent56961ca1f08d05cbd1d26a2b8169b5e6cd5e2c12 (diff)
downloadscons-5c05b2bdc19a672a0707b3630cb57c26b1a55af5.tar.gz
For consistency with another test.
-rw-r--r--test/D/SharedObjects/Common/common.py22
-rw-r--r--test/D/SharedObjects/Image/SConstruct_template3
2 files changed, 17 insertions, 8 deletions
diff --git a/test/D/SharedObjects/Common/common.py b/test/D/SharedObjects/Common/common.py
index a46ea7e4..bae376d8 100644
--- a/test/D/SharedObjects/Common/common.py
+++ b/test/D/SharedObjects/Common/common.py
@@ -56,16 +56,22 @@ def testForTool(tool):
if tool == 'dmd' and Base()['DC'] == 'gdmd':
test.skip_test('gdmd does not recognize the -shared option so cannot support linking of shared objects.\n')
+ code_root = 'code'
+ library_root = 'answer'
+
platform = Base()['PLATFORM']
if platform == 'posix':
- filename = 'code.o'
- libraryname = 'libanswer.so'
+ code_name = code_root + '.o'
+ library_name = 'lib' + library_root + '.so'
elif platform == 'darwin':
- filename = 'code.o'
- libraryname = 'libanswer.dylib'
+ code_name = code_root + '.o'
+ library_name = 'lib' + library_root + '.dylib'
+ # As at 2017-08-22, DMD 2.075.1, LDC 1.2.0 (D 2.072.2), and GDC 7.2.0 (D 2.068.2)
+ # it is not clear if shared libraries are supported on macOS.
+ # test.skip_test('Dynamic libraries not yet supported on macOS.\n')
elif platform == 'win32':
- filename = 'code.obj'
- libraryname = 'answer.dll'
+ code_name = code_root + '.obj'
+ library_name = library_root + '.dll'
else:
test.fail_test()
@@ -79,8 +85,8 @@ def testForTool(tool):
else:
test.run()
- test.must_exist(test.workpath(filename))
- test.must_exist(test.workpath(libraryname))
+ test.must_exist(test.workpath(code_name))
+ test.must_exist(test.workpath(library_name))
test.pass_test()
diff --git a/test/D/SharedObjects/Image/SConstruct_template b/test/D/SharedObjects/Image/SConstruct_template
index d263e63d..f731a335 100644
--- a/test/D/SharedObjects/Image/SConstruct_template
+++ b/test/D/SharedObjects/Image/SConstruct_template
@@ -1,5 +1,8 @@
# -*- mode:python; coding:utf-8; -*-
+# The core difference between this test and the one of SharedObjectSuffixIssue
+# is that here we explicitly use the relevant D tool and things work.
+
environment = Environment(
tools=['{0}', 'link']
)