mirror of
https://github.com/open-goal/jak-project.git
synced 2024-10-20 21:27:52 -04:00
9c631e11fe
This solves two main problems: - the looming threat of running out of memory since every thread would consume duplicate (and probably not needed) resources - though I will point out, jak 2's offline tests seem to hardly use any memory even with 400+ files, duplicated across many threads. Where as jak 1 does indeed use tons more memory. So I think there is something going on besides just the source files - condense the output so it's much easier to see what is happening / how close the test is to completing. - one annoying thing about the multiple thread change was errors were typically buried far in the middle of the output, this fixes that - refactors the offline test code in general to be a lot more modular The pretty printing is not enabled by default, run with `-p` or `--pretty-print` if you want to use it https://user-images.githubusercontent.com/13153231/205513212-a65c20d4-ce36-44f6-826a-cd475505dbf9.mp4
33 lines
949 B
C++
33 lines
949 B
C++
#pragma once
|
|
|
|
#include <string>
|
|
#include <string_view>
|
|
#include <unordered_map>
|
|
#include <unordered_set>
|
|
#include <vector>
|
|
|
|
#include "common/common_types.h"
|
|
|
|
class OfflineTestConfig {
|
|
public:
|
|
OfflineTestConfig(const std::string_view& _game_name,
|
|
const std::string& _iso_data_path,
|
|
const u32 _num_threads,
|
|
const bool _dump_mode,
|
|
const bool _fail_on_cmp,
|
|
const bool _fail_on_compile,
|
|
const bool _pretty_print);
|
|
|
|
std::string game_name;
|
|
std::string iso_data_path;
|
|
u32 num_threads;
|
|
bool dump_mode;
|
|
bool fail_on_cmp = false;
|
|
bool fail_on_compile = false;
|
|
bool pretty_print = false;
|
|
std::vector<std::string> dgos;
|
|
std::unordered_set<std::string> skip_compile_files;
|
|
std::unordered_set<std::string> skip_compile_functions;
|
|
std::unordered_map<std::string, std::unordered_set<std::string>> skip_compile_states;
|
|
};
|