diff options
Diffstat (limited to 'linker/Tests/TestCasesRunner/TestCaseSandbox.cs')
-rw-r--r-- | linker/Tests/TestCasesRunner/TestCaseSandbox.cs | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/linker/Tests/TestCasesRunner/TestCaseSandbox.cs b/linker/Tests/TestCasesRunner/TestCaseSandbox.cs index 03e990ff0..17f66dd0c 100644 --- a/linker/Tests/TestCasesRunner/TestCaseSandbox.cs +++ b/linker/Tests/TestCasesRunner/TestCaseSandbox.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.IO; using Mono.Linker.Tests.Cases.Expectations.Assertions; using Mono.Linker.Tests.Extensions; using Mono.Linker.Tests.TestCases; @@ -63,6 +64,18 @@ namespace Mono.Linker.Tests.TestCasesRunner { foreach (var dep in metadataProvider.AdditionalFilesToSandbox ()) { dep.FileMustExist ().Copy (_directory); } + + foreach (var compileRefInfo in metadataProvider.GetSetupCompileAssembliesBefore ()) + { + var destination = BeforeReferenceSourceDirectoryFor (compileRefInfo.OutputName).EnsureDirectoryExists (); + compileRefInfo.SourceFiles.Copy (destination); + } + + foreach (var compileRefInfo in metadataProvider.GetSetupCompileAssembliesAfter ()) + { + var destination = AfterReferenceSourceDirectoryFor (compileRefInfo.OutputName).EnsureDirectoryExists (); + compileRefInfo.SourceFiles.Copy (destination); + } } private static NPath GetExpectationsAssemblyPath () @@ -75,5 +88,15 @@ namespace Mono.Linker.Tests.TestCasesRunner { source.Copy (InputDirectory); source.Copy (ExpectationsDirectory); } + + public NPath BeforeReferenceSourceDirectoryFor (string outputName) + { + return _directory.Combine ($"ref_source_before_{Path.GetFileNameWithoutExtension (outputName)}"); + } + + public NPath AfterReferenceSourceDirectoryFor (string outputName) + { + return _directory.Combine ($"ref_source_after_{Path.GetFileNameWithoutExtension (outputName)}"); + } } }
\ No newline at end of file |