From e3e353343c926d288214057d29c2461fbcf4d4f8 Mon Sep 17 00:00:00 2001
From: Gary Oberbrunner <garyo@oberbrunner.com>
Date: Wed, 22 Aug 2012 04:27:31 +0100
Subject: Another MinGW test skip fix.

---
 test/MinGW/WINDOWS_INSERT_DEF.py | 6 ++++++
 1 file changed, 6 insertions(+)

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"); }
-- 
cgit v0.12