mirror of
https://github.com/reactos/reactos.git
synced 2025-01-06 06:20:13 +00:00
Revert 50381 and 50382. Altough it reduces number of reboots in the test server, it somehow reveals a registry corruption and cripples completely automated testing
svn path=/trunk/; revision=50386
This commit is contained in:
parent
3d2338dcfb
commit
ce53947b29
6 changed files with 0 additions and 118 deletions
|
@ -1,97 +0,0 @@
|
||||||
/*
|
|
||||||
* PROJECT: ReactOS Automatic Testing Utility
|
|
||||||
* LICENSE: GNU GPLv2 or any later version as published by the Free Software Foundation
|
|
||||||
* PURPOSE: Class for managing all the configuration parameters
|
|
||||||
* COPYRIGHT: Copyright 2011
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include "precomp.h"
|
|
||||||
|
|
||||||
BOOL CALLBACK PrintWindow(HWND hwnd, LPARAM lParam)
|
|
||||||
{
|
|
||||||
CHAR WindowTitle[100];
|
|
||||||
int lenght;
|
|
||||||
|
|
||||||
lenght = GetWindowTextA(hwnd, WindowTitle, 100);
|
|
||||||
if(lenght == 0)
|
|
||||||
return TRUE;
|
|
||||||
|
|
||||||
StringOut( string(WindowTitle) + "\n" );
|
|
||||||
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void CALLBACK WinEventProc(HWINEVENTHOOK hWinEventHook,
|
|
||||||
DWORD event,
|
|
||||||
HWND hwnd,
|
|
||||||
LONG idObject,
|
|
||||||
LONG idChild,
|
|
||||||
DWORD dwEventThread,
|
|
||||||
DWORD dwmsEventTime)
|
|
||||||
{
|
|
||||||
/* make sure we got the correct event */
|
|
||||||
if(event == EVENT_SYSTEM_DIALOGSTART)
|
|
||||||
{
|
|
||||||
/* wait for some time to make sure that the dialog is hung */
|
|
||||||
Sleep(30 * 1000);
|
|
||||||
|
|
||||||
/* Check if it is still open */
|
|
||||||
if(IsWindow(hwnd))
|
|
||||||
{
|
|
||||||
/* Print an error message */
|
|
||||||
StringOut("Closing following dialog box:\n");
|
|
||||||
PrintWindow(hwnd, NULL);
|
|
||||||
EnumChildWindows(hwnd, PrintWindow, NULL);
|
|
||||||
|
|
||||||
/* Close the dialog */
|
|
||||||
SendMessage(hwnd, WM_CLOSE, 0, 0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
DWORD WINAPI DialogSurpassThread(LPVOID lpThreadParameter)
|
|
||||||
{
|
|
||||||
MSG dummy;
|
|
||||||
|
|
||||||
/* Install event notifications */
|
|
||||||
SetWinEventHook(EVENT_SYSTEM_DIALOGSTART,
|
|
||||||
EVENT_SYSTEM_DIALOGSTART,
|
|
||||||
NULL,
|
|
||||||
WinEventProc,
|
|
||||||
0,
|
|
||||||
0,
|
|
||||||
WINEVENT_OUTOFCONTEXT);
|
|
||||||
|
|
||||||
while(GetMessage(&dummy, 0,0,0))
|
|
||||||
{
|
|
||||||
/* There is no need to dispatch messages here */
|
|
||||||
/* Actually this block will never be executed */
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
CDialogSurpass::CDialogSurpass()
|
|
||||||
{
|
|
||||||
/* Creat the trhead that will receive notifications */
|
|
||||||
hThread = CreateThread(NULL,
|
|
||||||
0,
|
|
||||||
DialogSurpassThread,
|
|
||||||
NULL,
|
|
||||||
0,
|
|
||||||
&ThreadID);
|
|
||||||
}
|
|
||||||
|
|
||||||
CDialogSurpass::~CDialogSurpass()
|
|
||||||
{
|
|
||||||
/* Notify the thread to close */
|
|
||||||
PostThreadMessage(ThreadID, WM_QUIT, 0, 0);
|
|
||||||
|
|
||||||
/* Wait for it close */
|
|
||||||
WaitForSingleObject(hThread, INFINITE);
|
|
||||||
|
|
||||||
/* Now close its handle*/
|
|
||||||
CloseHandle(hThread);
|
|
||||||
}
|
|
|
@ -1,17 +0,0 @@
|
||||||
/*
|
|
||||||
* PROJECT: ReactOS Automatic Testing Utility
|
|
||||||
* LICENSE: GNU GPLv2 or any later version as published by the Free Software Foundation
|
|
||||||
* PURPOSE: Class for managing all the configuration parameters
|
|
||||||
* COPYRIGHT: Copyright 2011
|
|
||||||
*/
|
|
||||||
|
|
||||||
class CDialogSurpass
|
|
||||||
{
|
|
||||||
private:
|
|
||||||
|
|
||||||
DWORD ThreadID;
|
|
||||||
HANDLE hThread;
|
|
||||||
public:
|
|
||||||
CDialogSurpass();
|
|
||||||
~CDialogSurpass();
|
|
||||||
};
|
|
|
@ -4,7 +4,6 @@ set_cpp()
|
||||||
|
|
||||||
list(APPEND SOURCE
|
list(APPEND SOURCE
|
||||||
CConfiguration.cpp
|
CConfiguration.cpp
|
||||||
CDialogSurpass.cpp
|
|
||||||
CFatalException.cpp
|
CFatalException.cpp
|
||||||
CInvalidParameterException.cpp
|
CInvalidParameterException.cpp
|
||||||
CJournaledTestList.cpp
|
CJournaledTestList.cpp
|
||||||
|
|
|
@ -48,7 +48,6 @@ wmain(int argc, wchar_t* argv[])
|
||||||
{
|
{
|
||||||
CWineTest WineTest;
|
CWineTest WineTest;
|
||||||
int ReturnValue = 1;
|
int ReturnValue = 1;
|
||||||
CDialogSurpass s;
|
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|
|
@ -20,7 +20,6 @@ using namespace std;
|
||||||
/* Class includes */
|
/* Class includes */
|
||||||
#include "auto_array_ptr.h"
|
#include "auto_array_ptr.h"
|
||||||
#include "CConfiguration.h"
|
#include "CConfiguration.h"
|
||||||
#include "CDialogSurpass.h"
|
|
||||||
#include "CFatalException.h"
|
#include "CFatalException.h"
|
||||||
#include "CInvalidParameterException.h"
|
#include "CInvalidParameterException.h"
|
||||||
#include "CProcess.h"
|
#include "CProcess.h"
|
||||||
|
|
|
@ -8,7 +8,6 @@
|
||||||
<library>user32</library>
|
<library>user32</library>
|
||||||
<library>wininet</library>
|
<library>wininet</library>
|
||||||
<file>CConfiguration.cpp</file>
|
<file>CConfiguration.cpp</file>
|
||||||
<file>CDialogSurpass.cpp</file>
|
|
||||||
<file>CFatalException.cpp</file>
|
<file>CFatalException.cpp</file>
|
||||||
<file>CInvalidParameterException.cpp</file>
|
<file>CInvalidParameterException.cpp</file>
|
||||||
<file>CJournaledTestList.cpp</file>
|
<file>CJournaledTestList.cpp</file>
|
||||||
|
|
Loading…
Reference in a new issue