2016-06-05 04:09:13 -07:00
|
|
|
#include <memory>
|
|
|
|
|
#include <spdlog/spdlog.h>
|
|
|
|
|
#include "hardwaretests.h"
|
2016-06-14 01:17:31 +01:00
|
|
|
#include "libcpu/cpu.h"
|
|
|
|
|
#include "libcpu/mem.h"
|
2016-07-10 01:38:42 +01:00
|
|
|
#include "common/decaf_assert.h"
|
2016-06-05 04:09:13 -07:00
|
|
|
|
|
|
|
|
std::shared_ptr<spdlog::logger>
|
|
|
|
|
gLog;
|
|
|
|
|
|
2016-06-06 01:29:51 -07:00
|
|
|
static int runResult;
|
|
|
|
|
|
2016-06-05 04:09:13 -07:00
|
|
|
int main(int argc, char *argv[])
|
|
|
|
|
{
|
|
|
|
|
gLog = std::make_shared<spdlog::logger>("logger", std::make_shared<spdlog::sinks::stdout_sink_st>());
|
|
|
|
|
gLog->set_level(spdlog::level::debug);
|
|
|
|
|
|
|
|
|
|
mem::initialise();
|
|
|
|
|
cpu::initialise();
|
|
|
|
|
|
2016-07-08 01:25:11 -07:00
|
|
|
cpu::setJitMode(cpu::jit_mode::enabled);
|
2016-06-14 01:17:31 +01:00
|
|
|
|
2016-06-06 01:29:51 -07:00
|
|
|
// We need to run the tests on a core.
|
2016-06-12 15:35:31 +01:00
|
|
|
cpu::setCoreEntrypointHandler(
|
|
|
|
|
[]() {
|
|
|
|
|
if (cpu::this_core::id() == 1) {
|
|
|
|
|
// Run the tests on only a single core.
|
|
|
|
|
runResult = hwtest::runTests("tests/cpu/wiiu") ? 0 : 1;
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
2016-06-06 01:29:51 -07:00
|
|
|
cpu::start();
|
|
|
|
|
cpu::join();
|
2016-06-12 15:35:31 +01:00
|
|
|
|
2016-06-05 04:09:13 -07:00
|
|
|
system("PAUSE");
|
2016-06-06 01:29:51 -07:00
|
|
|
return runResult;
|
2016-06-05 04:09:13 -07:00
|
|
|
}
|