summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilliam Deegan <bill@baddogconsulting.com>2021-01-15 19:58:15 (GMT)
committerWilliam Deegan <bill@baddogconsulting.com>2021-01-15 19:58:15 (GMT)
commit48ea8aad37fc9c0196bb95b299809e6c53d4a012 (patch)
treee56349c5b867870136d3870d2542226add4bd771
parenta4efe5deb3c5522ee89b79b6a34465f5946233f2 (diff)
downloadSCons-48ea8aad37fc9c0196bb95b299809e6c53d4a012.zip
SCons-48ea8aad37fc9c0196bb95b299809e6c53d4a012.tar.gz
SCons-48ea8aad37fc9c0196bb95b299809e6c53d4a012.tar.bz2
Add generating versioned shared library to D SharedObject tests (in addition to existing plain shared library test.
-rw-r--r--test/D/SharedObjects/Common/common.py7
-rw-r--r--test/D/SharedObjects/Image/SConstruct_template7
-rw-r--r--test/LINK/VersionedLib.py8
3 files changed, 13 insertions, 9 deletions
diff --git a/test/D/SharedObjects/Common/common.py b/test/D/SharedObjects/Common/common.py
index d5588be..d026658 100644
--- a/test/D/SharedObjects/Common/common.py
+++ b/test/D/SharedObjects/Common/common.py
@@ -1,6 +1,3 @@
-"""
-Support functions for all the tests.
-"""
# MIT License
#
# Copyright The SCons Foundation
@@ -23,6 +20,10 @@ Support functions for all the tests.
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+"""
+Support functions for all the tests.
+"""
+
import TestSCons
diff --git a/test/D/SharedObjects/Image/SConstruct_template b/test/D/SharedObjects/Image/SConstruct_template
index f731a33..96b44ca 100644
--- a/test/D/SharedObjects/Image/SConstruct_template
+++ b/test/D/SharedObjects/Image/SConstruct_template
@@ -3,8 +3,11 @@
# 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(
+DefaultEnvironment(tools=[])
+env = Environment(
tools=['{0}', 'link']
)
-environment.SharedLibrary('answer', 'code.d')
+shobj = env.SharedObject('code.d')
+env.SharedLibrary('answer', shobj)
+env.SharedLibrary('answer_versioned', shobj, SHLIBVERSION='1.1.1', SONAME='1')
diff --git a/test/LINK/VersionedLib.py b/test/LINK/VersionedLib.py
index 5f74f92..44cd0ee 100644
--- a/test/LINK/VersionedLib.py
+++ b/test/LINK/VersionedLib.py
@@ -1,6 +1,8 @@
#!/usr/bin/env python
#
-# __COPYRIGHT__
+# MIT License
+#
+# Copyright The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
@@ -21,8 +23,6 @@
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
-
import os
import TestSCons
@@ -218,7 +218,7 @@ for t in test_plan:
instfiles = t['instfiles']
test.write('SConstruct', """\
-import os
+DefaultEnvironment(tools=[])
env = Environment()
objs = env.SharedObject('test.c')
mylib = env.SharedLibrary('test', objs, SHLIBVERSION = '%s')