From d8b075e382d87d96569fecd9d114f07da1bd4acb Mon Sep 17 00:00:00 2001 From: Timo Kreuzer Date: Sat, 4 Jul 2026 17:25:26 +0300 Subject: [PATCH] [ROSAUTOTEST] Handle test executable names that don't have an underscore This removes the need for the trailing underscore in "kmtest_.exe" --- modules/rostests/rosautotest/CWineTest.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/rostests/rosautotest/CWineTest.cpp b/modules/rostests/rosautotest/CWineTest.cpp index d23569ad7f5..6be9dbc228e 100644 --- a/modules/rostests/rosautotest/CWineTest.cpp +++ b/modules/rostests/rosautotest/CWineTest.cpp @@ -279,10 +279,10 @@ CWineTest::GetNextTestInfo() if(UnderscorePosition == m_CurrentFile.npos) { - stringstream ss; - - ss << "Invalid test file name: " << UnicodeToAscii(m_CurrentFile) << endl; - SSEXCEPTION; + /* Use the entire name (without .exe extendion) */ + UnderscorePosition = m_CurrentFile.find_first_of('.'); + if(UnderscorePosition == m_CurrentFile.npos) + UnderscorePosition = m_CurrentFile.length(); } TestInfo->Module = UnicodeToAscii(m_CurrentFile.substr(0, UnderscorePosition));