mirror of
https://github.com/reactos/reactos.git
synced 2025-06-24 17:09:44 +00:00
[ROSAUTOTEST]
- Finish a test run in the database when all tests have successfully been run. This got lost during the C++ rewrite of rosautotest in r40147. - Don't spam the logs with useless OK messages. Only report the web service response if an error occurred. svn path=/trunk/; revision=66516
This commit is contained in:
parent
f268fadf4a
commit
65b4da13f4
3 changed files with 43 additions and 6 deletions
|
@ -94,6 +94,38 @@ CWebService::DoRequest(const string& InputData)
|
|||
return Data.release();
|
||||
}
|
||||
|
||||
/**
|
||||
* Interface to other classes for finishing this test run
|
||||
*
|
||||
* @param TestType
|
||||
* Constant pointer to a char array containing the test type to be run (i.e. "wine")
|
||||
*/
|
||||
void
|
||||
CWebService::Finish(const char* TestType)
|
||||
{
|
||||
auto_array_ptr<char> Response;
|
||||
string Data;
|
||||
stringstream ss;
|
||||
|
||||
if (!m_TestID)
|
||||
EXCEPTION("CWebService::Finish was called, but not a single result had been submitted!");
|
||||
|
||||
Data = "action=finish";
|
||||
Data += Configuration.GetAuthenticationRequestString();
|
||||
Data += "&testtype=";
|
||||
Data += TestType;
|
||||
Data += "&testid=";
|
||||
Data += m_TestID;
|
||||
|
||||
Response.reset(DoRequest(Data));
|
||||
|
||||
if (strcmp(Response, "OK"))
|
||||
{
|
||||
ss << "When finishing the test run, the server responded:" << endl << Response << endl;
|
||||
SSEXCEPTION;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Requests a Test ID from the Web Service for our test run.
|
||||
*
|
||||
|
@ -206,9 +238,9 @@ CWebService::Submit(const char* TestType, CTestInfo* TestInfo)
|
|||
|
||||
Response.reset(DoRequest(Data));
|
||||
|
||||
ss << "The server responded:" << endl << Response << endl;
|
||||
StringOut(ss.str());
|
||||
|
||||
if(strcmp(Response, "OK"))
|
||||
EXCEPTION("Aborted!\n");
|
||||
if (strcmp(Response, "OK"))
|
||||
{
|
||||
ss << "When submitting the result, the server responded:" << endl << Response << endl;
|
||||
SSEXCEPTION;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue