Fix xUnit tests

Moved the xUnit tests build rules to their own Makefile, included by
monad-build/Makefile.

Temporarily introduced POWERSHELL_HOST to reenable running of
xunit.console.netcore.exe until this is built-in to the native
powershell host.
This commit is contained in:
Andrew Schwartzmeyer 2015-11-03 09:49:55 -08:00
parent eb816dd147
commit 8dcb769bb7
3 changed files with 15 additions and 2 deletions

View file

@ -36,7 +36,8 @@ bootstrap: tools/nuget.exe
# run targets
export POWERSHELL=env TEMP=/tmp LD_LIBRARY_PATH=$(MONAD)/lib:$(PSLIB) PSMODULEPATH=$(PSLIB)/Modules $(MONAD)/bin/powershell $(PSLIB)/powershell.exe
export POWERSHELL_HOST=env TEMP=/tmp LD_LIBRARY_PATH=$(MONAD)/lib:$(PSLIB) PSMODULEPATH=$(PSLIB)/Modules $(MONAD)/bin/powershell
export POWERSHELL=$(POWERSHELL_HOST) $(PSLIB)/powershell.exe
demo:
$(POWERSHELL) '"a","b","c","a","a" | Select-Object -Unique'

@ -1 +1 @@
Subproject commit 6ed63339e8c6f8d66fb66b37ffde4e86aed07d0b
Subproject commit 254d126ddb2c7306d185030d7f837aa6fb27c9ff

View file

@ -0,0 +1,12 @@
# xUnit tests for PowerShell
# - results in xunit-tests.xml
# - see https://xunit.github.io/
TEST_FOLDER=$(MONAD)/src/xunit-tests
TEST_SRCS=$(TEST_FOLDER)/test_*.cs
TEST_TARGETS=$(addprefix $(PSLIB)/, System.Management.Automation.dll Microsoft.PowerShell.Commands.Management.dll)
$(PSLIB)/PowerShell.Linux.Test.dll: $(TEST_SRCS) $(TEST_TARGETS)
$(CSC) $(CSCOPTS_LIB) -out:$@ $(addprefix -r:$(MONAD_EXT)/xunit/, xunit.core.dll xunit.assert.dll) $(addprefix -r:, $(TEST_TARGETS)) $(COREREF) $(TEST_SRCS)
test: $(PSLIB)/PowerShell.Linux.Test.dll
$(POWERSHELL_HOST) $(PSLIB)/xunit.console.netcore.exe $< -xml $(MONAD)/xunit-tests.xml