More work on TestRunner, now runs all the CPU tests.

This commit is contained in:
Henrik Rydgard 2013-03-07 00:22:39 +01:00
parent 57d4544ef4
commit a69b09a831
2 changed files with 13 additions and 7 deletions

View File

@ -215,7 +215,7 @@ const u8 *Jit::DoJit(u32 em_address, ArmJitBlock *b)
if (logBlocks > 0) logBlocks--;
if (dontLogBlocks > 0) dontLogBlocks--;
#define LOGASM
// #define LOGASM
#ifdef LOGASM
char temp[256];
#endif

View File

@ -26,7 +26,9 @@
#include <iostream>
#include "base/basictypes.h"
#include "base/display.h"
#include "base/logging.h"
#include "gfx_es2/gl_state.h"
#include "Core/Core.h"
#include "Core/System.h"
@ -71,8 +73,8 @@ void RunTests()
for (int i = 0; i < ARRAY_SIZE(testsToRun); i++) {
const char *testName = testsToRun[i];
coreParam.fileToStart = g_Config.memCardDirectory + "/pspautotests/tests/" + testName + ".prx";
std::string expectedFile = g_Config.memCardDirectory + "/pspautotests/tests/" + testName + ".expected";
coreParam.fileToStart = g_Config.memCardDirectory + "pspautotests/tests/" + testName + ".prx";
std::string expectedFile = g_Config.memCardDirectory + "pspautotests/tests/" + testName + ".expected";
ILOG("Preparing to execute %s", testName)
std::string error_string;
@ -111,7 +113,11 @@ void RunTests()
std::string e, o;
std::getline(expected, e);
std::getline(logoutput, o);
e = e.substr(0, e.size() - 1); // For some reason we get some extra character
// Remove stray returns
while (e[e.size()-1] == 10 || e[e.size()-1] == 13)
e = e.substr(0, e.size() - 1); // For some reason we get some extra character
while (o[o.size()-1] == 10 || o[o.size()-1] == 13)
o = o.substr(0, o.size() - 1); // For some reason we get some extra character
if (e != o) {
ELOG("DIFF! %i vs %i, %s vs %s", (int)e.size(), (int)o.size(), e.c_str(), o.c_str());
}
@ -122,8 +128,8 @@ void RunTests()
break;
}
}
ILOG("Test executed.");
return;
PSP_Shutdown();
}
glstate.Restore();
glstate.viewport.set(0,0,pixel_xres,pixel_yres);
}