[ROSAUTOTEST] Fix handling of empty test lists

Throw a test exception from GetNextTest if DoListCommand() returned an empty string, instead of continuing with a NULL buffer.
This commit is contained in:
Timo Kreuzer
2026-07-11 16:48:14 +00:00
parent 1ef584c446
commit be66db5ab4
@@ -60,6 +60,10 @@ CWineTest::GetNextFile()
bool FoundFile = false;
WIN32_FIND_DATAW fd;
/* Reset the test list */
m_ListBuffer = NULL;
m_ListString.clear();
/* Did we already begin searching for files? */
if (m_hFind)
{
@@ -211,6 +215,13 @@ CWineTest::GetNextTest()
/* Perform the --list command */
BufferSize = DoListCommand();
if ((BufferSize == 0) || (m_ListBuffer == NULL))
{
stringstream ss;
ss << "The --list command did not return any data for " << UnicodeToAscii(m_CurrentFile) << endl;
TESTEXCEPTION(ss.str());
}
/* Move the pointer to the first test */
pStart = strchr(m_ListBuffer, '\n');
pStart += 5;