From 2ce694ebdd59226d7afe9c8b6bcc321fb537c96f Mon Sep 17 00:00:00 2001 From: Andrew Schwartzmeyer Date: Tue, 16 Feb 2016 13:33:56 -0800 Subject: [PATCH] Add xUnit test runner script Unfortunately a wrapper is needed because `LD_LIBRARY_PATH` must be set to avoid having to place build artifacts (specifically `libpsl-native.so`) out-of-tree to run tests. --- xunit.sh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100755 xunit.sh diff --git a/xunit.sh b/xunit.sh new file mode 100755 index 0000000000..57330555fc --- /dev/null +++ b/xunit.sh @@ -0,0 +1,20 @@ +#!/usr/bin/env bash + +# Build native components +pushd src/libpsl-native +cmake -DCMAKE_BUILD_TYPE=Debug . +make -j +ctest -V +## Work-around dotnet/cli#710 +export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$(pwd)/src" +popd + +# Run xUnit tests +pushd test/csharp +## Build +dotnet build +## Work-around dotnet/cli#753 +cp -r ../../src/Microsoft.PowerShell.Linux.Host/{Modules,*ps1xml} bin/Debug/dnxcore50/ +## Test +dotnet test +popd