summaryrefslogtreecommitdiff
path: root/test/MinGW
diff options
context:
space:
mode:
authorGary Oberbrunner <garyo@oberbrunner.com>2012-08-22 04:14:59 +0100
committerGary Oberbrunner <garyo@oberbrunner.com>2012-08-22 04:14:59 +0100
commite735ee1f51599042cf60fccde844e1d16ccfe1ab (patch)
treede7337e1c9310bf5964ba82a2edfd7bced90f19d /test/MinGW
parentff9c18837f526dd2bb5489e15ecd5c09f3ed416f (diff)
downloadscons-e735ee1f51599042cf60fccde844e1d16ccfe1ab.tar.gz
Skip MinGW test on Windows machines without MinGW.
Need to do this, otherwise it fails erroneously.
Diffstat (limited to 'test/MinGW')
-rw-r--r--test/MinGW/MinGWSharedLibrary.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/MinGW/MinGWSharedLibrary.py b/test/MinGW/MinGWSharedLibrary.py
index 896b8b78..dcebd45f 100644
--- a/test/MinGW/MinGWSharedLibrary.py
+++ b/test/MinGW/MinGWSharedLibrary.py
@@ -32,6 +32,9 @@ when using MinGW.
import sys
import TestSCons
+import SCons.Tool.mingw
+import SCons.Defaults
+
_python_ = TestSCons._python_
test = TestSCons.TestSCons()
@@ -39,6 +42,9 @@ test = TestSCons.TestSCons()
if sys.platform not in ('cygwin','win32',):
test.skip_test("Skipping mingw test on non-Windows %s platform."%sys.platform)
+if not SCons.Tool.mingw.find(SCons.Defaults.DefaultEnvironment()):
+ test.skip_test("Skipping mingw test, no MinGW found.\n")
+
test.write('foobar.cc', """
int abc(int a) {