From 99804642fc8e7fc0a5bb0a4e20884ab28074a10d Mon Sep 17 00:00:00 2001 From: Andrew Schwartzmeyer Date: Thu, 11 Jun 2015 14:17:12 -0700 Subject: [PATCH] Compile all unit tests into one shared dll --- scripts/Makefile | 13 ++++++------- .../System.Management.Automation.assembly-info.cs | 2 +- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/scripts/Makefile b/scripts/Makefile index c312e92c42..e1ab4f5fe3 100644 --- a/scripts/Makefile +++ b/scripts/Makefile @@ -114,16 +114,15 @@ dotnetlibs/xunit.console.exe: $(MONAD_EXT)/xunit/xunit.console.netcore.exe TEST_FOLDER=../src/ps_test TEST_SRCS=$(addprefix $(TEST_FOLDER)/, test_CorePsPlatform.cs) -TEST_DLLS=$(addprefix dotnetlibs/, $(notdir $(TEST_SRCS:.cs=.dll))) -dotnetlibs/%.dll: $(TEST_FOLDER)/%.cs dotnetlibs/xunit.core.dll dotnetlibs/xunit.assert.dll dotnetlibs/System.Management.Automation.dll dotnetlibs/Microsoft.PowerShell.Commands.Management.dll dotnetlibs/$(ASSEMBLY_LOAD_CONTEXT_TARGET) - $(CSC) -out:$@ -noconfig -nostdlib -target:library -r:dotnetlibs/System.Management.Automation.dll -r:dotnetlibs/$(ASSEMBLY_LOAD_CONTEXT_TARGET) -r:dotnetlibs/xunit.core.dll -r:dotnetlibs/xunit.assert.dll ${COREREF} $< +dotnetlibs/ps_test.dll: $(TEST_SRCS) dotnetlibs/xunit.core.dll dotnetlibs/xunit.assert.dll dotnetlibs/System.Management.Automation.dll dotnetlibs/Microsoft.PowerShell.Commands.Management.dll dotnetlibs/$(ASSEMBLY_LOAD_CONTEXT_TARGET) + $(CSC) -out:$@ -noconfig -nostdlib -target:library -r:dotnetlibs/System.Management.Automation.dll -r:dotnetlibs/$(ASSEMBLY_LOAD_CONTEXT_TARGET) -r:dotnetlibs/xunit.core.dll -r:dotnetlibs/xunit.assert.dll ${COREREF} $(TEST_SRCS) -dotnetlibs/ps_test.exe: $(TEST_FOLDER)/ps_test.cs $(TEST_DLLS) dotnetlibs/System.Management.Automation.dll dotnetlibs/Microsoft.PowerShell.Commands.Management.dll dotnetlibs/$(ASSEMBLY_LOAD_CONTEXT_TARGET) dotnetlibs/xunit.core.dll dotnetlibs/xunit.assert.dll - $(CSC) -out:$@ -noconfig -nostdlib -target:exe $(addprefix -r:, $(TEST_DLLS)) -r:dotnetlibs/System.Management.Automation.dll -r:dotnetlibs/$(ASSEMBLY_LOAD_CONTEXT_TARGET) -r:dotnetlibs/xunit.core.dll -r:dotnetlibs/xunit.assert.dll ${COREREF} $< +dotnetlibs/ps_test_runner.exe: $(TEST_FOLDER)/ps_test.cs dotnetlibs/ps_test.dll dotnetlibs/System.Management.Automation.dll dotnetlibs/Microsoft.PowerShell.Commands.Management.dll dotnetlibs/$(ASSEMBLY_LOAD_CONTEXT_TARGET) dotnetlibs/xunit.core.dll dotnetlibs/xunit.assert.dll + $(CSC) -out:$@ -noconfig -nostdlib -target:exe -r:dotnetlibs/ps_test.dll -r:dotnetlibs/System.Management.Automation.dll -r:dotnetlibs/$(ASSEMBLY_LOAD_CONTEXT_TARGET) -r:dotnetlibs/xunit.core.dll -r:dotnetlibs/xunit.assert.dll ${COREREF} $< -run-test: dotnetlibs/ps_test.exe dotnetlibs/corerun - cd dotnetlibs && LD_LIBRARY_PATH=. ./corerun ps_test.exe +run-test: dotnetlibs/ps_test_runner.exe dotnetlibs/corerun + cd dotnetlibs && LD_LIBRARY_PATH=. ./corerun ps_test_runner.exe # the pinvoke library libps.so diff --git a/src/assembly-info/System.Management.Automation.assembly-info.cs b/src/assembly-info/System.Management.Automation.assembly-info.cs index 97f5414b5b..3111b04a5d 100644 --- a/src/assembly-info/System.Management.Automation.assembly-info.cs +++ b/src/assembly-info/System.Management.Automation.assembly-info.cs @@ -7,7 +7,7 @@ using System.Reflection; [assembly:InternalsVisibleTo("Microsoft.PowerShell.Security")] [assembly:InternalsVisibleTo("Microsoft.PowerShell.CoreCLR.AssemblyLoadContext")] //[assembly:InternalsVisibleTo("ps_hello_world")] -[assembly:InternalsVisibleTo("test_CorePsPlatform")] +[assembly:InternalsVisibleTo("ps_test")] //