diff options
author | Russel Winder <russel@winder.org.uk> | 2012-08-22 08:30:36 (GMT) |
---|---|---|
committer | Russel Winder <russel@winder.org.uk> | 2012-08-22 08:30:36 (GMT) |
commit | 86ad443acfa0e3b3588fb3bc30770b3ed58c10fb (patch) | |
tree | 8adbd10385c24a51f295d0d295f995a4585fe7bc | |
parent | 3fc1398a12bc0211fd56cdb4f43948b7883cf808 (diff) | |
parent | e3e353343c926d288214057d29c2461fbcf4d4f8 (diff) | |
download | SCons-86ad443acfa0e3b3588fb3bc30770b3ed58c10fb.zip SCons-86ad443acfa0e3b3588fb3bc30770b3ed58c10fb.tar.gz SCons-86ad443acfa0e3b3588fb3bc30770b3ed58c10fb.tar.bz2 |
Merge from mainline.
-rw-r--r-- | test/IDL/midl.py | 23 | ||||
-rw-r--r-- | test/MSVS/CPPPATH-Dirs.py | 4 | ||||
-rw-r--r-- | test/MinGW/MinGWSharedLibrary.py | 6 | ||||
-rw-r--r-- | test/MinGW/WINDOWS_INSERT_DEF.py | 6 |
4 files changed, 27 insertions, 12 deletions
diff --git a/test/IDL/midl.py b/test/IDL/midl.py index 08b604e..f5c864f 100644 --- a/test/IDL/midl.py +++ b/test/IDL/midl.py @@ -61,6 +61,7 @@ local = env.Clone(WINDOWS_INSERT_DEF = 1) barsrc = [ 'BarObject.cpp', + 'BarPCH.obj', 'bar.cpp', local.RES('bar.rc', RCFLAGS= '/I${SOURCE.srcdir}'), ] @@ -71,7 +72,7 @@ local.SharedLibrary(target = 'bar.dll', source = barsrc, PCH=local.PCH('BarPCH.cpp', CXXFLAGS='/nologo')[0], PCHSTOP = 'BarPCH.h', - register=1) + register=0) # can't test registration, Win7 requires elevation for that. """) test.write('src/BarObject.cpp',''' @@ -143,12 +144,12 @@ HKCR test.write('src/BarPCH.cpp',''' #include "BarPCH.h" -#ifdef _ATL_STATIC_REGISTRY -#include <statreg.h> -#include <statreg.cpp> -#endif +// #ifdef _ATL_STATIC_REGISTRY +// #include <statreg.h> +// #include <statreg.cpp> +// #endif -#include <atlimpl.cpp> +// #include <atlimpl.cpp> ''') test.write('src/BarPCH.h',''' @@ -161,7 +162,7 @@ test.write('src/BarPCH.h',''' #define STRICT #ifndef _WIN32_WINNT -#define _WIN32_WINNT 0x0400 +#define _WIN32_WINNT 0x0501 #endif #define _ATL_APARTMENT_THREADED @@ -228,10 +229,10 @@ test.write('src/bar.def',''' LIBRARY "bar.DLL" EXPORTS - DllCanUnloadNow @1 PRIVATE - DllGetClassObject @2 PRIVATE - DllRegisterServer @3 PRIVATE - DllUnregisterServer @4 PRIVATE + DllCanUnloadNow PRIVATE + DllGetClassObject PRIVATE + DllRegisterServer PRIVATE + DllUnregisterServer PRIVATE ''') test.write('src/bar.idl',''' diff --git a/test/MSVS/CPPPATH-Dirs.py b/test/MSVS/CPPPATH-Dirs.py index d1c24e3..fad2507 100644 --- a/test/MSVS/CPPPATH-Dirs.py +++ b/test/MSVS/CPPPATH-Dirs.py @@ -71,7 +71,9 @@ int main() { test.run()
-test.must_exist(test.workpath('Hello.vcproj'))
+if not os.path.exists(test.workpath('Hello.vcproj')) and \
+ not os.path.exists(test.workpath('Hello.vcxproj')):
+ test.fail_test("Failed to create Visual Studio project Hello.vcproj or Hello.vcxproj")
test.must_exist(test.workpath('Hello.sln'))
# vcproj = test.read('Test.vcproj', 'r')
diff --git a/test/MinGW/MinGWSharedLibrary.py b/test/MinGW/MinGWSharedLibrary.py index 896b8b7..dcebd45 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) { 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"); } |