summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRussel Winder <russel@winder.org.uk>2014-12-21 17:47:01 (GMT)
committerRussel Winder <russel@winder.org.uk>2014-12-21 17:47:01 (GMT)
commitcf37fe92d43ccb0d2ec715fc603ca439588ee566 (patch)
tree581f06d779d715f78d577bbcce940a4be9ed81a3
parent975776d32d0f78b3a9d03a0c3ce29a3af2f1b872 (diff)
downloadSCons-cf37fe92d43ccb0d2ec715fc603ca439588ee566.zip
SCons-cf37fe92d43ccb0d2ec715fc603ca439588ee566.tar.gz
SCons-cf37fe92d43ccb0d2ec715fc603ca439588ee566.tar.bz2
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 768c885..d519d8d 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 fc5f79f..84ceb51 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 11c061d..3bd58b4 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 81f81f5..b17847a 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 26b477b..4716f1c 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 7031f5c..1489624 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 a4aa795..2c53b54 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 55f02aa..c78ba96 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 55f02aa..c78ba96 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 cb1e71b..83b5162 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 213de7e..cae8713 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')