summaryrefslogtreecommitdiffstats
path: root/test/D/DMD2_Alt.py
diff options
context:
space:
mode:
authorRussel Winder <russel@winder.org.uk>2014-09-06 15:25:28 (GMT)
committerRussel Winder <russel@winder.org.uk>2014-09-06 15:25:28 (GMT)
commit70a6365e0bcf530819a83edaa3b9d9bbc08b218e (patch)
tree6aa16a6e3f77e01d22fe3af6474d4192d2f8ba77 /test/D/DMD2_Alt.py
parent414cb583cf31b2a8c65704e57dd19cfb865e6582 (diff)
downloadSCons-70a6365e0bcf530819a83edaa3b9d9bbc08b218e.zip
SCons-70a6365e0bcf530819a83edaa3b9d9bbc08b218e.tar.gz
SCons-70a6365e0bcf530819a83edaa3b9d9bbc08b218e.tar.bz2
Deal better with the discovery of a suitable D compiler executable.
Diffstat (limited to 'test/D/DMD2_Alt.py')
-rw-r--r--test/D/DMD2_Alt.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/test/D/DMD2_Alt.py b/test/D/DMD2_Alt.py
index 27b21d0..11c061d 100644
--- a/test/D/DMD2_Alt.py
+++ b/test/D/DMD2_Alt.py
@@ -28,11 +28,16 @@ __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