winetest: Refuse to run if the mount manager isn't running.
This usually indicates that the Wine prefix isn't valid.
This commit is contained in:
parent
0d16965832
commit
ee0f4b0da3
|
@ -132,6 +132,18 @@ static int running_under_wine (void)
|
|||
return (GetProcAddress(module, "wine_server_call") != NULL);
|
||||
}
|
||||
|
||||
static int check_mount_mgr(void)
|
||||
{
|
||||
if (running_under_wine())
|
||||
{
|
||||
HANDLE handle = CreateFileA( "\\\\.\\MountPointManager", GENERIC_READ,
|
||||
FILE_SHARE_READ|FILE_SHARE_WRITE, NULL, OPEN_EXISTING, 0, 0 );
|
||||
if (handle == INVALID_HANDLE_VALUE) return FALSE;
|
||||
CloseHandle( handle );
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
static int running_on_visible_desktop (void)
|
||||
{
|
||||
HWND desktop;
|
||||
|
@ -1021,6 +1033,9 @@ int main( int argc, char *argv[] )
|
|||
if (!running_on_visible_desktop ())
|
||||
report (R_FATAL, "Tests must be run on a visible desktop");
|
||||
|
||||
if (!check_mount_mgr())
|
||||
report (R_FATAL, "Mount manager not running, most likely your WINEPREFIX wasn't created correctly");
|
||||
|
||||
SetConsoleCtrlHandler(ctrl_handler, TRUE);
|
||||
|
||||
if (reset_env)
|
||||
|
|
Loading…
Reference in New Issue