2016-06-05 04:09:13 -07:00
|
|
|
#include "hardwaretests.h"
|
2017-04-20 13:45:01 +01:00
|
|
|
|
2017-02-27 23:34:16 +00:00
|
|
|
#include <common/decaf_assert.h>
|
2018-12-08 10:19:19 +00:00
|
|
|
#include <common/log.h>
|
2017-04-20 13:45:01 +01:00
|
|
|
#include <libcpu/cpu.h>
|
2017-04-24 23:32:00 +01:00
|
|
|
#include <libcpu/cpu_config.h>
|
2017-04-20 13:45:01 +01:00
|
|
|
#include <libcpu/mem.h>
|
|
|
|
|
#include <memory>
|
|
|
|
|
#include <spdlog/spdlog.h>
|
2018-11-25 14:50:43 +10:30
|
|
|
#include <spdlog/sinks/stdout_sinks.h>
|
2016-06-05 04:09:13 -07:00
|
|
|
|
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[])
|
|
|
|
|
{
|
2018-12-08 10:19:19 +00:00
|
|
|
auto logger = std::make_shared<spdlog::logger>("logger", std::make_shared<spdlog::sinks::stdout_sink_st>());
|
|
|
|
|
logger->set_level(spdlog::level::debug);
|
|
|
|
|
gLog = logger;
|
2016-06-05 04:09:13 -07:00
|
|
|
|
2019-01-03 13:45:10 +00:00
|
|
|
auto cpuConfig = cpu::Settings { };
|
|
|
|
|
cpuConfig.jit.enabled = true;
|
|
|
|
|
cpu::setConfig(cpuConfig);
|
2016-06-05 04:09:13 -07:00
|
|
|
cpu::initialise();
|
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(
|
2018-11-25 14:50:43 +10:30
|
|
|
[](cpu::Core *core) {
|
2016-06-12 15:35:31 +01:00
|
|
|
if (cpu::this_core::id() == 1) {
|
|
|
|
|
// Run the tests on only a single core.
|
2017-04-21 14:45:23 +01:00
|
|
|
runResult = hwtest::runTests("data/wiiu");
|
2016-06-12 15:35:31 +01:00
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
2016-06-06 01:29:51 -07:00
|
|
|
cpu::start();
|
|
|
|
|
cpu::join();
|
|
|
|
|
return runResult;
|
2016-06-05 04:09:13 -07:00
|
|
|
}
|