testrunner: fix runtime problems with TestThreadExecutor
This commit is contained in:
parent
d11b5163b7
commit
76cf097104
|
@ -110,7 +110,7 @@ int ThreadExecutor::handleRead(unsigned int &result)
|
||||||
unsigned int fileResult = 0;
|
unsigned int fileResult = 0;
|
||||||
iss >> fileResult;
|
iss >> fileResult;
|
||||||
result += fileResult;
|
result += fileResult;
|
||||||
_errorLogger.reportStatus(_fileCount, (unsigned int)_filenames.size());
|
_errorLogger.reportStatus(_fileCount, _filenames.size());
|
||||||
delete [] buf;
|
delete [] buf;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
@ -216,7 +216,7 @@ unsigned int ThreadExecutor::check()
|
||||||
|
|
||||||
void ThreadExecutor::writeToPipe(char type, const std::string &data)
|
void ThreadExecutor::writeToPipe(char type, const std::string &data)
|
||||||
{
|
{
|
||||||
std::size_t len = data.length() + 1;
|
unsigned int len = data.length() + 1;
|
||||||
char *out = new char[ len + 1 + sizeof(len)];
|
char *out = new char[ len + 1 + sizeof(len)];
|
||||||
out[0] = type;
|
out[0] = type;
|
||||||
std::memcpy(&(out[1]), &len, sizeof(len));
|
std::memcpy(&(out[1]), &len, sizeof(len));
|
||||||
|
|
Loading…
Reference in New Issue