Compile all unit tests into one shared dll
This commit is contained in:
parent
d9a0c8270f
commit
99804642fc
|
@ -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
|
||||
|
||||
|
|
|
@ -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")]
|
||||
|
||||
|
||||
//
|
||||
|
|
Loading…
Reference in a new issue