summaryrefslogtreecommitdiffstats
path: root/test/D/DMD2_Alt.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/D/DMD2_Alt.py')
-rw-r--r--test/D/DMD2_Alt.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/test/D/DMD2_Alt.py b/test/D/DMD2_Alt.py
index fbe2f2b..11c061d 100644
--- a/test/D/DMD2_Alt.py
+++ b/test/D/DMD2_Alt.py
@@ -28,15 +28,20 @@ __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
import TestSCons
+import sys
+from os.path import abspath, dirname, join
+sys.path.append(join(dirname(abspath(__file__)), 'Support'))
+from executablesSearch import isExecutableOfToolAvailable
+
_exe = TestSCons._exe
test = TestSCons.TestSCons()
-if not test.where_is('dmd') and not test.where_is('gdmd'):
- test.skip_test("Could not find 'dmd' or 'gdmd', skipping test.\n")
+if not isExecutableOfToolAvailable(test, 'dmd'):
+ test.skip_test("Could not find 'dmd'; skipping test.\n")
test.write('SConstruct', """\
import os
-env = Environment(tools=['dmd', 'link'], ENV=os.environ)
+env = Environment(tools=['dmd', 'link'])
if env['PLATFORM'] == 'cygwin': env['OBJSUFFIX'] = '.obj' # trick DMD
env.Program('foo', 'foo.d')
""")