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-08-15 00:07:29 +0300
committerMarek Safar <marek.safar@gmail.com>2017-08-15 16:37:54 +0300
commit67116e0a7399ae668ede7985aaeb1c0e785683bb (patch)
tree7b375252bb3161a6d5397a2b34f8bc229b18d63b /linker
parenta85abdbaed03a0780ca815283082d457ff19e7d4 (diff)
Extension point for setting up pedump process
Diffstat (limited to 'linker')
-rw-r--r--linker/Tests/TestCasesRunner/PeVerifier.cs17
1 files changed, 11 insertions, 6 deletions
diff --git a/linker/Tests/TestCasesRunner/PeVerifier.cs b/linker/Tests/TestCasesRunner/PeVerifier.cs
index 0d87b63f5..7acda1d94 100644
--- a/linker/Tests/TestCasesRunner/PeVerifier.cs
+++ b/linker/Tests/TestCasesRunner/PeVerifier.cs
@@ -77,13 +77,8 @@ namespace Mono.Linker.Tests.TestCasesRunner {
private void CheckAssembly (NPath assemblyPath)
{
var capturedOutput = new List<string> ();
- var exeArgs = Environment.OSVersion.Platform == PlatformID.Win32NT ? $"/nologo {assemblyPath.InQuotes ()}" : $"--verify metadata,code {assemblyPath.InQuotes ()}";
var process = new Process ();
- process.StartInfo.FileName = _peExecutable;
- process.StartInfo.Arguments = exeArgs;
- process.StartInfo.UseShellExecute = false;
- process.StartInfo.CreateNoWindow = true;
- process.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
+ SetupProcess (process, assemblyPath);
process.StartInfo.RedirectStandardOutput = true;
process.OutputDataReceived += (sender, args) => capturedOutput.Add (args.Data);
process.Start ();
@@ -95,6 +90,16 @@ namespace Mono.Linker.Tests.TestCasesRunner {
}
}
+ protected virtual void SetupProcess (Process process, NPath assemblyPath)
+ {
+ var exeArgs = Environment.OSVersion.Platform == PlatformID.Win32NT ? $"/nologo {assemblyPath.InQuotes ()}" : $"--verify metadata,code {assemblyPath.InQuotes ()}";
+ process.StartInfo.FileName = _peExecutable;
+ process.StartInfo.Arguments = exeArgs;
+ process.StartInfo.UseShellExecute = false;
+ process.StartInfo.CreateNoWindow = true;
+ process.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
+ }
+
public static NPath FindPeExecutableFromRegistry ()
{
if (Environment.OSVersion.Platform != PlatformID.Win32NT)