Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/linker.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--linker/Tests/TestCasesRunner/LinkerArgumentBuilder.cs14
-rw-r--r--linker/Tests/TestCasesRunner/TestRunner.cs15
2 files changed, 20 insertions, 9 deletions
diff --git a/linker/Tests/TestCasesRunner/LinkerArgumentBuilder.cs b/linker/Tests/TestCasesRunner/LinkerArgumentBuilder.cs
index 09c728e03..4c2a4e5a5 100644
--- a/linker/Tests/TestCasesRunner/LinkerArgumentBuilder.cs
+++ b/linker/Tests/TestCasesRunner/LinkerArgumentBuilder.cs
@@ -50,5 +50,19 @@ namespace Mono.Linker.Tests.TestCasesRunner {
{
_arguments.Add (arg);
}
+
+ public virtual void ProcessOptions (TestCaseLinkerOptions options)
+ {
+ AddCoreLink (options.CoreLink);
+
+ // Running the blacklist step causes a ton of stuff to be preserved. That's good for normal use cases, but for
+ // our test cases that pollutes the results
+ if (!string.IsNullOrEmpty (options.IncludeBlacklistStep))
+ IncludeBlacklist (options.IncludeBlacklistStep);
+
+ // Internationalization assemblies pollute our test case results as well so disable them
+ if (!string.IsNullOrEmpty (options.Il8n))
+ AddIl8n (options.Il8n);
+ }
}
} \ No newline at end of file
diff --git a/linker/Tests/TestCasesRunner/TestRunner.cs b/linker/Tests/TestCasesRunner/TestRunner.cs
index 24b766c8b..848ee27b6 100644
--- a/linker/Tests/TestCasesRunner/TestRunner.cs
+++ b/linker/Tests/TestCasesRunner/TestRunner.cs
@@ -68,20 +68,17 @@ namespace Mono.Linker.Tests.TestCasesRunner {
foreach (var extraSearchDir in metadataProvider.GetExtraLinkerSearchDirectories ())
builder.AddSearchDirectory (extraSearchDir);
- builder.AddCoreLink (caseDefinedOptions.CoreLink);
+ builder.ProcessOptions (caseDefinedOptions);
- // Running the blacklist step causes a ton of stuff to be preserved. That's good for normal use cases, but for
- // our test cases that pollutes the results
- if (!string.IsNullOrEmpty (caseDefinedOptions.IncludeBlacklistStep))
- builder.IncludeBlacklist (caseDefinedOptions.IncludeBlacklistStep);
-
- // Internationalization assemblies pollute our test case results as well so disable them
- if (!string.IsNullOrEmpty (caseDefinedOptions.Il8n))
- builder.AddIl8n (caseDefinedOptions.Il8n);
+ AddAdditionalLinkOptions (builder, metadataProvider);
linker.Link (builder.ToArgs ());
return new LinkedTestCaseResult (testCase, compilationResult.InputAssemblyPath, sandbox.OutputDirectory.Combine (compilationResult.InputAssemblyPath.FileName), compilationResult.ExpectationsAssemblyPath);
}
+
+ protected virtual void AddAdditionalLinkOptions (LinkerArgumentBuilder builder, TestCaseMetadaProvider metadataProvider)
+ {
+ }
}
} \ No newline at end of file