mscoree/tests: Fix failures when .NET 4 but not 1 or 2 is installed.
Vincent Povirk
madewokherd at gmail.com
Wed Feb 5 16:37:11 CST 2014
-------------- next part --------------
From 3330b333bdae52e088acc6044dec3580cc4331bd Mon Sep 17 00:00:00 2001
From: Vincent Povirk <vincent at codeweavers.com>
Date: Wed, 5 Feb 2014 16:33:39 -0600
Subject: [PATCH] mscoree/tests: Fix failures when .NET 4 but not 1 or 2 is
installed.
---
dlls/mscoree/tests/mscoree.c | 19 ++++++++++++++++---
1 file changed, 16 insertions(+), 3 deletions(-)
diff --git a/dlls/mscoree/tests/mscoree.c b/dlls/mscoree/tests/mscoree.c
index 19e8fdd..852944f 100644
--- a/dlls/mscoree/tests/mscoree.c
+++ b/dlls/mscoree/tests/mscoree.c
@@ -34,6 +34,8 @@ static HRESULT (WINAPI *pLoadLibraryShim)(LPCWSTR, LPCWSTR, LPVOID, HMODULE*);
static HRESULT (WINAPI *pCreateConfigStream)(LPCWSTR, IStream**);
static HRESULT (WINAPI *pCreateInterface)(REFCLSID, REFIID, VOID**);
+static int no_legacy_runtimes;
+
static BOOL init_functionpointers(void)
{
hmscoree = LoadLibraryA("mscoree.dll");
@@ -85,9 +87,8 @@ static void test_versioninfo(void)
hr = pGetCORVersion(version, 1, &size);
if (hr == CLR_E_SHIM_RUNTIME)
{
- /* FIXME: Get Mono packaged properly so we can fail here. */
- todo_wine ok(hr == HRESULT_FROM_WIN32(ERROR_INSUFFICIENT_BUFFER),"GetCORVersion returned %08x\n", hr);
- skip("No .NET runtimes are installed\n");
+ no_legacy_runtimes = 1;
+ win_skip("No legacy .NET runtimes are installed\n");
return;
}
@@ -208,6 +209,12 @@ static void test_loadlibraryshim(void)
HMODULE hdll;
CHAR dllpath[MAX_PATH];
+ if (no_legacy_runtimes)
+ {
+ win_skip("No legacy .NET runtimes are installed\n");
+ return;
+ }
+
hr = pLoadLibraryShim(fusion, v1_1, NULL, &hdll);
ok(hr == S_OK || hr == E_HANDLE, "LoadLibraryShim failed, hr=%x\n", hr);
if (SUCCEEDED(hr))
@@ -395,6 +402,12 @@ static void test_createinstance(void)
HRESULT hr;
ICLRMetaHost *host;
+ if (no_legacy_runtimes)
+ {
+ /* If we don't have 1.x or 2.0 runtimes, we should at least have .NET 4. */
+ ok(pCreateInterface != NULL, "no legacy runtimes or .NET 4 interfaces available\n");
+ }
+
if(!pCreateInterface)
{
win_skip("Function CreateInterface not found.\n");
--
1.8.3.2
More information about the wine-patches
mailing list