mirror of
https://github.com/libretro/ppsspp.git
synced 2025-01-26 11:16:13 +00:00
Merge pull request #627 from unknownbrackets/tests-faster
Make tests faster
This commit is contained in:
commit
e477c273de
@ -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<WaitVBlankInfo> 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();
|
||||
|
@ -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;
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 4f047eb8c76c6388a63a87ec72e98c64670152d5
|
||||
Subproject commit c4427bd55d57af2484f5ccd4ec1bed2bcf674395
|
11
test.py
11
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",
|
||||
@ -233,6 +241,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
|
||||
|
Loading…
x
Reference in New Issue
Block a user