test: improve test logging infra (#13811)

Co-authored-by: Ben Hillis <benhill@ntdev.microsoft.com>
This commit is contained in:
Ben Hillis 2025-12-01 21:17:28 -08:00 committed by GitHub
parent 82e54b12a8
commit 0f6f3c1e02
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 4 deletions

View File

@ -103,11 +103,11 @@ int main(int Argc, char* Argv[], char** Envp)
if (LXT_SUCCESS(Result))
{
LxtLogPassed("%s", false, LxtTests[Itr].Name);
LxtLogPassed("%s", LxtTests[Itr].Name);
}
else
{
LxtLogError("%s", false, LxtTests[Itr].Name);
LxtLogError("%s", LxtTests[Itr].Name);
}
goto ErrorExit;

View File

@ -1907,7 +1907,8 @@ Return Value:
}
LaunchArguments += CommandLine;
LogInfo("Test process exited with: %lu", LxsstuLaunchWsl(LaunchArguments.c_str()));
DWORD ExitCode = LxsstuLaunchWsl(LaunchArguments.c_str());
LogInfo("Test process exited with: %lu", ExitCode);
//
// Parse the contents of the linux log(s) files and relog.
@ -1917,9 +1918,11 @@ Return Value:
{
THROW_IF_NTSTATUS_FAILED(LxsstuParseLinuxLogFiles(LogFileName, &TestPassed));
THROW_HR_IF(E_FAIL, !TestPassed);
VERIFY_IS_TRUE(TestPassed);
}
VERIFY_ARE_EQUAL(0, ExitCode);
return;
}