From a69b09a831ba25301328be5039c4ab5e46cf273a Mon Sep 17 00:00:00 2001 From: Henrik Rydgard Date: Thu, 7 Mar 2013 00:22:39 +0100 Subject: [PATCH] More work on TestRunner, now runs all the CPU tests. --- Core/MIPS/ARM/ArmJit.cpp | 2 +- android/jni/TestRunner.cpp | 18 ++++++++++++------ 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/Core/MIPS/ARM/ArmJit.cpp b/Core/MIPS/ARM/ArmJit.cpp index 2f23b4b774..b2d763ae6c 100644 --- a/Core/MIPS/ARM/ArmJit.cpp +++ b/Core/MIPS/ARM/ArmJit.cpp @@ -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 diff --git a/android/jni/TestRunner.cpp b/android/jni/TestRunner.cpp index 57629f64c7..126d4574b2 100644 --- a/android/jni/TestRunner.cpp +++ b/android/jni/TestRunner.cpp @@ -26,7 +26,9 @@ #include #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); } \ No newline at end of file