public void ExplictStripOption_ThirdPartyLibrary_AndWarnsIfSo(bool?strip, bool shouldStrip) { MMPTests.RunMMPTest(tmpDir => { string originalLocation = Path.Combine(TI.FindRootDirectory(), MonoPosixOffset); string newLibraryLocation = Path.Combine(tmpDir, "libTest.dylib"); File.Copy(originalLocation, newLibraryLocation); TI.UnifiedTestConfig test = CreateStripTestConfig(strip, tmpDir, $" --native-reference=\"{newLibraryLocation}\""); test.Release = true; string buildOutput = TI.TestUnifiedExecutable(test).BuildOutput; Assert.AreEqual(shouldStrip, DidAnyLipoStrip(buildOutput), "lipo usage did not match expectations"); Assert.AreEqual(shouldStrip, buildOutput.Contains("MM2108"), "Warning did not match expectations"); }); }
string GetBaseAssemblyPath(string name, bool modern) => Path.Combine(TI.FindRootDirectory(), "Library/Frameworks/Xamarin.Mac.framework/Versions/Current/lib/mono/" + GetFrameworkName(modern) + "/", name + ".dll");