From 9df33597b8a2edaa2d662d5493101d40ef2c972f Mon Sep 17 00:00:00 2001 From: Katy Coe Date: Mon, 14 Dec 2020 02:56:29 +0100 Subject: [PATCH] Tests: TestRunner sets LoadOptions.BinaryFilePath and finds Linux process maps --- Il2CppTests/TestRunner.cs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Il2CppTests/TestRunner.cs b/Il2CppTests/TestRunner.cs index d4b89a7..c3f17ee 100644 --- a/Il2CppTests/TestRunner.cs +++ b/Il2CppTests/TestRunner.cs @@ -31,6 +31,15 @@ namespace Il2CppInspector // iOS if (!File.Exists(testFile)) testFile = testPath + @"\" + Path.GetFileName(testPath); + // Linux process map + if (!File.Exists(testFile)) + testFile = Directory.GetFiles(testPath, "*-maps.txt").FirstOrDefault(); + + // Set load options + if (loadOptions == null) + loadOptions = new LoadOptions(); + + loadOptions.BinaryFilePath = testFile; var inspectors = Il2CppInspector.LoadFromFile(testFile, testPath + @"\global-metadata.dat", loadOptions);