tests: add jak3 typeconsistency test and ensure offline tests are working (#3310)

This commit is contained in:
Tyler Wilding
2024-01-16 00:15:33 -05:00
committed by GitHub
parent 07427799a6
commit 4101d5d80e
14 changed files with 86 additions and 28 deletions
+6 -3
View File
@@ -9,9 +9,10 @@
// TODO - i think these should be partitioned by game name instead of it being in the filename
// (and the names not being consistent)
std::unordered_map<std::string, std::string> game_name_to_all_types1 = {
std::unordered_map<std::string, std::string> game_name_to_all_types = {
{"jak1", "jak1/all-types.gc"},
{"jak2", "jak2/all-types.gc"}};
{"jak2", "jak2/all-types.gc"},
{"jak3", "jak3/all-types.gc"}};
void disassemble(OfflineTestDecompiler& dc) {
dc.db->process_link_data(*dc.config);
@@ -105,13 +106,15 @@ OfflineTestCompileResult compile(OfflineTestDecompiler& dc,
Compiler compiler(game_name_to_version(config.game_name));
compiler.run_front_end_on_file(
{"decompiler", "config", game_name_to_all_types1[config.game_name]});
{"decompiler", "config", game_name_to_all_types[config.game_name]});
compiler.run_front_end_on_file(
{"test", "decompiler", "reference", config.game_name, "decompiler-macros.gc"});
if (config.game_name == "jak2") {
compiler.run_front_end_on_file({"goal_src", "jak2", "engine", "data", "art-elts.gc"});
} else if (config.game_name == "jak1") {
compiler.run_front_end_on_file({"goal_src", "jak1", "engine", "data", "art-elts.gc"});
} else if (config.game_name == "jak3") {
compiler.run_front_end_on_file({"goal_src", "jak3", "engine", "data", "art-elts.gc"});
}
int total_lines = 0;