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
path: root/linker
diff options
context:
space:
mode:
authorMike Voorhees <michaelv@unity3d.com>2017-06-05 22:39:13 +0300
committerMarek Safar <marek.safar@gmail.com>2017-06-06 11:36:11 +0300
commitfbce67218f79a64b8fb46e6b898dc62987bd2a02 (patch)
treee530c32f11b6fda8039935ec5542fb16df479290 /linker
parent5d72aac5e056c35887a54c66a0ed79d203943165 (diff)
Make arg builder more extensible
Diffstat (limited to 'linker')
-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