summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRussel Winder <russel@winder.org.uk>2014-12-21 17:47:01 +0000
committerRussel Winder <russel@winder.org.uk>2014-12-21 17:47:01 +0000
commit2b6c7f046a56f4848c9727c0b437401f79aac6e3 (patch)
tree581f06d779d715f78d577bbcce940a4be9ed81a3
parent7e45ea050a520aea0fcb3f9ef3ddc2105869ceaa (diff)
downloadscons-2b6c7f046a56f4848c9727c0b437401f79aac6e3.tar.gz
Hack the tests (in an agreed quasi-acceptable way) to avoid CI fails.
-rw-r--r--src/engine/SCons/Tool/ldc.py2
-rw-r--r--test/D/DMD2.py1
-rw-r--r--test/D/DMD2_Alt.py1
-rw-r--r--test/D/HSTeoh/ArLibIssue/SConstruct_template3
-rw-r--r--test/D/HSTeoh/Common/singleStringCannotBeMultipleOptions.py4
-rw-r--r--test/D/HSTeoh/LibCompileOptions/SConstruct_template3
-rw-r--r--test/D/HSTeoh/LinkingProblem/SConstruct_template2
-rw-r--r--test/D/Issues/2939_Ariovistus/Project/SConstruct_template3
-rw-r--r--test/D/Issues/2940_Ariovistus/Project/SConstruct_template3
-rw-r--r--test/D/SharedObjects/Common/common.py3
-rw-r--r--test/D/SharedObjects/Image/SConstruct_template2
11 files changed, 26 insertions, 1 deletions
diff --git a/src/engine/SCons/Tool/ldc.py b/src/engine/SCons/Tool/ldc.py
index 768c8859..d519d8db 100644
--- a/src/engine/SCons/Tool/ldc.py
+++ b/src/engine/SCons/Tool/ldc.py
@@ -101,7 +101,7 @@ def generate(env):
env['DLINKCOM'] = '$DLINK -of=$TARGET $DLINKFLAGS $__DRPATH $SOURCES $_DLIBDIRFLAGS $_DLIBFLAGS'
env['DSHLINK'] = '$DC'
- env['DSHLINKFLAGS'] = SCons.Util.CLVar('$DLINKFLAGS -shared -defaultlib=phobos-ldc')
+ env['DSHLINKFLAGS'] = SCons.Util.CLVar('$DLINKFLAGS -shared -defaultlib=phobos2-ldc')
env['SHDLINKCOM'] = '$DLINK -of=$TARGET $DSHLINKFLAGS $__DRPATH $SOURCES $_DLIBDIRFLAGS $_DLIBFLAGS'
env['DLIBLINKPREFIX'] = '' if env['PLATFORM'] == 'win32' else '-L-l'
diff --git a/test/D/DMD2.py b/test/D/DMD2.py
index fc5f79f7..84ceb513 100644
--- a/test/D/DMD2.py
+++ b/test/D/DMD2.py
@@ -42,6 +42,7 @@ if not isExecutableOfToolAvailable(test, 'dmd'):
test.write('SConstruct', """\
import os
env = Environment(tools=['link', 'dmd'])
+env['ENV']['HOME'] = os.environ['HOME'] # Hack for gdmd
if env['PLATFORM'] == 'cygwin': env['OBJSUFFIX'] = '.obj' # trick DMD
env.Program('foo', 'foo.d')
""")
diff --git a/test/D/DMD2_Alt.py b/test/D/DMD2_Alt.py
index 11c061d5..3bd58b43 100644
--- a/test/D/DMD2_Alt.py
+++ b/test/D/DMD2_Alt.py
@@ -42,6 +42,7 @@ if not isExecutableOfToolAvailable(test, 'dmd'):
test.write('SConstruct', """\
import os
env = Environment(tools=['dmd', 'link'])
+env['ENV']['HOME'] = os.environ['HOME'] # Hack for gdmd
if env['PLATFORM'] == 'cygwin': env['OBJSUFFIX'] = '.obj' # trick DMD
env.Program('foo', 'foo.d')
""")
diff --git a/test/D/HSTeoh/ArLibIssue/SConstruct_template b/test/D/HSTeoh/ArLibIssue/SConstruct_template
index 81f81f55..b17847a0 100644
--- a/test/D/HSTeoh/ArLibIssue/SConstruct_template
+++ b/test/D/HSTeoh/ArLibIssue/SConstruct_template
@@ -1,3 +1,6 @@
env = Environment({})
+import os
+env['ENV']['HOME'] = os.environ['HOME'] # Hack for gdmd
+
env.StaticLibrary('mylib', ['a.d', 'b.d'])
diff --git a/test/D/HSTeoh/Common/singleStringCannotBeMultipleOptions.py b/test/D/HSTeoh/Common/singleStringCannotBeMultipleOptions.py
index 26b477b6..4716f1c3 100644
--- a/test/D/HSTeoh/Common/singleStringCannotBeMultipleOptions.py
+++ b/test/D/HSTeoh/Common/singleStringCannotBeMultipleOptions.py
@@ -55,6 +55,10 @@ def testForTool(tool):
'ldc': ".*Unknown command line argument '-m64 -O'.*",
}[tool]
+ from SCons.Environment import Base
+ if tool == 'dmd' and Base()['DC'] == 'gdmd':
+ result = ".*unrecognized command line option '-m64 -O'.*"
+
test.fail_test(not test.match_re_dotall(test.stderr(), result))
test.pass_test()
diff --git a/test/D/HSTeoh/LibCompileOptions/SConstruct_template b/test/D/HSTeoh/LibCompileOptions/SConstruct_template
index 7031f5c4..1489624f 100644
--- a/test/D/HSTeoh/LibCompileOptions/SConstruct_template
+++ b/test/D/HSTeoh/LibCompileOptions/SConstruct_template
@@ -1,5 +1,8 @@
env = Environment({})
+import os
+env['ENV']['HOME'] = os.environ['HOME'] # Hack for gdmd
+
env.Library('mylib', 'mylib.d')
prog_env = env.Clone(
diff --git a/test/D/HSTeoh/LinkingProblem/SConstruct_template b/test/D/HSTeoh/LinkingProblem/SConstruct_template
index a4aa7956..2c53b54b 100644
--- a/test/D/HSTeoh/LinkingProblem/SConstruct_template
+++ b/test/D/HSTeoh/LinkingProblem/SConstruct_template
@@ -6,6 +6,8 @@ environment = Environment(
tools = ['cc', '{}', 'link'],
LIBS = ['ncurses'])
+environment['ENV']['HOME'] = os.environ['HOME'] # Hack for gdmd
+
environment.Object('ncurs_impl.o', 'ncurs_impl.c')
environment.Program('prog', Split("""
diff --git a/test/D/Issues/2939_Ariovistus/Project/SConstruct_template b/test/D/Issues/2939_Ariovistus/Project/SConstruct_template
index 55f02aa0..c78ba968 100644
--- a/test/D/Issues/2939_Ariovistus/Project/SConstruct_template
+++ b/test/D/Issues/2939_Ariovistus/Project/SConstruct_template
@@ -2,6 +2,9 @@ from os.path import join
environment = Environment({})
+import os
+environment['ENV']['HOME'] = os.environ['HOME'] # Hack for gdmd
+
Export('environment')
environment.SConscript([
diff --git a/test/D/Issues/2940_Ariovistus/Project/SConstruct_template b/test/D/Issues/2940_Ariovistus/Project/SConstruct_template
index 55f02aa0..c78ba968 100644
--- a/test/D/Issues/2940_Ariovistus/Project/SConstruct_template
+++ b/test/D/Issues/2940_Ariovistus/Project/SConstruct_template
@@ -2,6 +2,9 @@ from os.path import join
environment = Environment({})
+import os
+environment['ENV']['HOME'] = os.environ['HOME'] # Hack for gdmd
+
Export('environment')
environment.SConscript([
diff --git a/test/D/SharedObjects/Common/common.py b/test/D/SharedObjects/Common/common.py
index cb1e71bd..83b5162e 100644
--- a/test/D/SharedObjects/Common/common.py
+++ b/test/D/SharedObjects/Common/common.py
@@ -49,6 +49,9 @@ def testForTool(tool):
if tool == 'gdc':
test.skip_test('gdc does not, as at version 4.9.1, support shared libraries.\n')
+ 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')
+
platform = Base()['PLATFORM']
if platform == 'posix':
diff --git a/test/D/SharedObjects/Image/SConstruct_template b/test/D/SharedObjects/Image/SConstruct_template
index 213de7e9..cae87139 100644
--- a/test/D/SharedObjects/Image/SConstruct_template
+++ b/test/D/SharedObjects/Image/SConstruct_template
@@ -5,4 +5,6 @@ import os
environment = Environment(
tools=['{}', 'link'])
+environment['ENV']['HOME'] = os.environ['HOME'] # Hack for gdmd
+
environment.SharedLibrary('answer', 'code.d')