summaryrefslogtreecommitdiffstats
path: root/test/MinGW
diff options
context:
space:
mode:
Diffstat (limited to 'test/MinGW')
-rw-r--r--test/MinGW/WINDOWS_INSERT_DEF.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/MinGW/WINDOWS_INSERT_DEF.py b/test/MinGW/WINDOWS_INSERT_DEF.py
index 78aa26e..67d3e9b 100644
--- a/test/MinGW/WINDOWS_INSERT_DEF.py
+++ b/test/MinGW/WINDOWS_INSERT_DEF.py
@@ -31,12 +31,18 @@ Make sure that WINDOWS_INSERT_DEF isn't ignored when using MinGW.
import sys
import TestSCons
+import SCons.Tool.mingw
+import SCons.Defaults
+
test = TestSCons.TestSCons()
if sys.platform not in ('cygwin', 'win32'):
test.skip_test(
"Skipping mingw test on non-Windows platform: %s" % sys.platform)
+if not SCons.Tool.mingw.find(SCons.Defaults.DefaultEnvironment()):
+ test.skip_test("Skipping mingw test, no MinGW found.\n")
+
test.write('hello.c', r"""
#include <stdio.h>
int hello_world(void) { return printf("Orbis, te saluto!\n"); }