From dc15c004e90258c428ddbed9b2a8e3e869aee21f Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Sat, 9 Feb 2013 00:26:46 -0800 Subject: [PATCH 1/4] Don't sleep for vsync in headless. Makes the tests run faster, timeout less. --- Core/HLE/sceDisplay.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Core/HLE/sceDisplay.cpp b/Core/HLE/sceDisplay.cpp index da021db024..f6e4c4f583 100644 --- a/Core/HLE/sceDisplay.cpp +++ b/Core/HLE/sceDisplay.cpp @@ -25,6 +25,7 @@ #include "Thread.h" #include "../Core/CoreTiming.h" +#include "../Core/CoreParameter.h" #include "../MIPS/MIPS.h" #include "../HLE/HLE.h" #include "sceAudio.h" @@ -78,7 +79,7 @@ static int hCountTotal; //unused static int vCount; static int isVblank; static bool hasSetMode; -double lastFrameTime; +static double lastFrameTime; std::vector vblankWaitingThreads; @@ -269,12 +270,11 @@ void hleEnterVblank(u64 userdata, int cyclesLate) { host->EndFrame(); #ifdef _WIN32 - static double lastFrameTime = 0.0; // Best place to throttle the frame rate on non vsynced platforms is probably here. Let's try it. time_update(); if (lastFrameTime == 0.0) lastFrameTime = time_now_d(); - if (!GetAsyncKeyState(VK_TAB)) { + if (!GetAsyncKeyState(VK_TAB) && !PSP_CoreParameter().headLess) { while (time_now_d() < lastFrameTime + 1.0 / 60.0) { Common::SleepCurrentThread(1); time_update(); From 5afc53e42bbd373d34871a38ec6f1b756361faf5 Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Sat, 9 Feb 2013 01:07:45 -0800 Subject: [PATCH 2/4] Consider timed out tests to have failed. --- test.py | 1 + 1 file changed, 1 insertion(+) diff --git a/test.py b/test.py index 983e47db6a..a7cf179346 100755 --- a/test.py +++ b/test.py @@ -233,6 +233,7 @@ def run_tests(test_list, args): if c.timeout: print(output) print("Test exceded limit of %d seconds." % TIMEOUT) + tests_failed.append(test) tcprint("##teamcity[testFailed name='%s' message='Test timeout']" % test) tcprint("##teamcity[testFinished name='%s']" % test) continue From 779171e8d582eb0f60d7bf4f27a52e9b18d960c2 Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Sat, 9 Feb 2013 01:14:39 -0800 Subject: [PATCH 3/4] Run tests using jit by default. --- headless/Headless.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/headless/Headless.cpp b/headless/Headless.cpp index 29bfb4428d..a03bfe04b4 100644 --- a/headless/Headless.cpp +++ b/headless/Headless.cpp @@ -65,8 +65,9 @@ void printUsage(const char *progname, const char *reason) fprintf(stderr, " --screenshot=FILE compare against a screenshot\n"); } + fprintf(stderr, " -i use the interpreter\n"); fprintf(stderr, " -f use the fast interpreter\n"); - fprintf(stderr, " -j use jit (overrides -f)\n"); + fprintf(stderr, " -j use jit (default)\n"); fprintf(stderr, " -c, --compare compare with output in file.expected\n"); fprintf(stderr, "\nSee headless.txt for details.\n"); } @@ -74,7 +75,7 @@ void printUsage(const char *progname, const char *reason) int main(int argc, const char* argv[]) { bool fullLog = false; - bool useJit = false; + bool useJit = true; bool fastInterpreter = false; bool autoCompare = false; bool useGraphics = false; @@ -96,6 +97,8 @@ int main(int argc, const char* argv[]) readMount = true; else if (!strcmp(argv[i], "-l") || !strcmp(argv[i], "--log")) fullLog = true; + else if (!strcmp(argv[i], "-i")) + useJit = false; else if (!strcmp(argv[i], "-j")) useJit = true; else if (!strcmp(argv[i], "-f")) @@ -153,7 +156,7 @@ int main(int argc, const char* argv[]) coreParameter.fileToStart = bootFilename; coreParameter.mountIso = mountIso ? mountIso : ""; coreParameter.startPaused = false; - coreParameter.cpuCore = useJit ? CPU_JIT : (fastInterpreter ? CPU_FASTINTERPRETER : CPU_INTERPRETER); + coreParameter.cpuCore = fastInterpreter ? CPU_FASTINTERPRETER : (useJit ? CPU_JIT : CPU_INTERPRETER); coreParameter.gpuCore = headlessHost->isGLWorking() ? GPU_GLES : GPU_NULL; coreParameter.enableSound = false; coreParameter.headLess = true; From 83caa7d31efcc0e75d232e492f590b1c03c9d3ff Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Sat, 9 Feb 2013 01:19:02 -0800 Subject: [PATCH 4/4] Update tests. --- pspautotests | 2 +- test.py | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/pspautotests b/pspautotests index 4f047eb8c7..c4427bd55d 160000 --- a/pspautotests +++ b/pspautotests @@ -1 +1 @@ -Subproject commit 4f047eb8c76c6388a63a87ec72e98c64670152d5 +Subproject commit c4427bd55d57af2484f5ccd4ec1bed2bcf674395 diff --git a/test.py b/test.py index a7cf179346..2d98e03079 100755 --- a/test.py +++ b/test.py @@ -109,6 +109,12 @@ tests_good = [ "threads/semaphores/refer/refer", "threads/semaphores/signal/signal", "threads/semaphores/wait/wait", + "threads/vpl/vpl", + "threads/vpl/delete", + "threads/vpl/free", + "threads/vpl/priority", + "threads/vpl/refer", + "threads/vpl/try", "power/power", "umd/callbacks/umd", "umd/wait/wait", @@ -124,11 +130,13 @@ tests_next = [ "threads/msgpipe/msgpipe", "threads/scheduling/scheduling", "threads/threads/threads", - "threads/vpl/vpl", "threads/vtimers/vtimer", + "threads/vpl/allocate", + "threads/vpl/create", "threads/wakeup/wakeup", "gpu/simple/simple", "gpu/triangle/triangle", + "gpu/commands/basic", "hle/check_not_used_uids", "font/fonttest", "io/cwd/cwd",