[Image Removed]
When stopping the abtest command it mentions that it’s going to run the A command again.
The code calls a function to switch the command back to the first parameter but since that function doesn’t execute the command it doesn’t change anything.
This possibly has unintended consequences due to changes in cvars leaking through to other tests that happen afterwards.
From the looks of it, it seems to come from this change when moving the ABTest system into it’s own cpp file
https://github.com/EpicGames/UnrealEngine/commit/2547171a65ba9b50a9d8d2cf294d4f18e9b6badb
I have a fix for it, since the TickAndGetCommand function runs each frame I just added a new variable bABTestStopping to the headed and added this code
`const TCHAR* FABTest::TickAndGetCommand()
{
const TCHAR* OutCommand = nullptr;
static double LastTime = 0;
#ifdef ABTESTFIX // Fix for ABTest not returning back to A command
if (bABTestStopping) {
OutCommand = SwitchTest(0);
bABTestStopping = false;
}
else
#endif
if (bABTestActive && RemainingCoolDown)
…`turning on the new flag
void FABTest::Stop() { if (bABTestActive) { ABTEST_LOG(TEXT("Running 'A' console command and stopping test.")); SwitchTest(0); bABTestActive = false; #ifdef ABTESTFIX // Fix for ABTest not returning back to A command bABTestStopping = true; #endif
allowing the SwitchTest function to return the command string
`const TCHAR* FABTest::SwitchTest(int32 Index)
{
RemainingCoolDown = CoolDown;
CurrentTest = Index;
RemainingTrial = Stream.RandRange(MinFramesPerTrial, MinFramesPerTrial * 3);
check(RemainingTrial);
if (!bABScopeTestActive
#ifdef ABTESTFIX // Fix for ABTest not returning back to A command
|| bABTestStopping
#endif
)`