Changes based on reviewer comments.

This commit is contained in:
Doug Lyons 2025-03-27 23:48:04 -05:00
parent a45c5c8826
commit 8cfb3dbe2f

View file

@ -9,7 +9,7 @@
#include <cstdio> #include <cstdio>
#include <ndk/setypes.h> #include <ndk/setypes.h>
#include <ndk/exfuncs.h> #include <ndk/exfuncs.h>
#include <strsafe.h>
WCHAR TestName[MAX_PATH]; WCHAR TestName[MAX_PATH];
CConfiguration Configuration; CConfiguration Configuration;
@ -92,9 +92,12 @@ wmain(int argc, wchar_t* argv[])
DWORD TestStartTime, TestEndTime; DWORD TestStartTime, TestEndTime;
GetModuleFileNameW(NULL, TestName, _countof(TestName)); GetModuleFileNameW(NULL, TestName, _countof(TestName));
// printf("Full TestName is '%S'\n", TestName);
WCHAR* Name = wcsrchr(TestName, '\\'); WCHAR* Name = wcsrchr(TestName, '\\');
if (Name)
Name++; Name++;
StringCchCopyW(TestName, _countof(TestName), Name); memmove(TestName, Name, _countof(TestName) * sizeof(WCHAR));
// printf("Short TestName is '%S'.\n", TestName);
SetNtGlobalFlags(); SetNtGlobalFlags();
@ -161,7 +164,7 @@ wmain(int argc, wchar_t* argv[])
ss << endl ss << endl
<< "[ROSAUTOTEST] System uptime at end was " << setprecision(2) << fixed; << "[ROSAUTOTEST] System uptime at end was " << setprecision(2) << fixed;
ss << ((float)TestEndTime / 1000) << " seconds" << endl; ss << ((float)TestEndTime / 1000) << " seconds" << endl;
ss << "[ROSAUTOTEST] Duration was " << (((float)TestEndTime / 1000) - ((float)TestStartTime / 1000)) / 60; ss << "[ROSAUTOTEST] Duration was " << (((float)TestEndTime - (float)TestStartTime) / 1000) / 60;
ss << " minutes" << endl; ss << " minutes" << endl;
StringOut(ss.str()); StringOut(ss.str());