diff --git a/scripts/test/runtests.sh b/scripts/test/runtests.sh index a31263201..7a8726a88 100755 --- a/scripts/test/runtests.sh +++ b/scripts/test/runtests.sh @@ -32,14 +32,31 @@ done # copy TestProjects folder which is used by the test cases mkdir -p "$TestBinRoot/TestProjects" -cp -R $REPOROOT/test/TestProjects/* $TestBinRoot/TestProjects +cp -a $REPOROOT/test/TestProjects/* $TestBinRoot/TestProjects + -# set -e will abort if the exit code of this is non-zero pushd "$TestBinRoot" +set +e + +failedTests=() +failCount=0 for project in ${TestProjects[@]} do ./corerun "xunit.console.netcore.exe" "$project.dll" -xml "project.xml" -notrait category=failing + exitCode=$? + failCount+=$exitCode + if [ $exitCode -ne 0 ]; then + failedTests+=($project) + fi +done + +for test in ${failedTests[@]} +do + error "$test.dll failed. Logs in '$TestBinRoot/$test.xml'" done popd +set -e + +exit $failCount diff --git a/test/Microsoft.DotNet.Tools.Publish.Tests/Microsoft.DotNet.Tools.Publish.Tests.cs b/test/Microsoft.DotNet.Tools.Publish.Tests/Microsoft.DotNet.Tools.Publish.Tests.cs index bb6ae005f..22e8d5d25 100644 --- a/test/Microsoft.DotNet.Tools.Publish.Tests/Microsoft.DotNet.Tools.Publish.Tests.cs +++ b/test/Microsoft.DotNet.Tools.Publish.Tests/Microsoft.DotNet.Tools.Publish.Tests.cs @@ -27,7 +27,7 @@ namespace Microsoft.DotNet.Tools.Publish.Tests new object[] { "", RuntimeIdentifier.Current, "", "" }, new object[] { "", "", "Release", "" }, new object[] { "", "", "", "some/dir"}, - //new object[] { "", "", "", "\"some/dir/with spaces\"" }, + //new object[] { "", "", "", "\"some/dir/with spaces\"" }, // issue - https://github.com/dotnet/cli/issues/525 new object[] { "dnxcore50", RuntimeIdentifier.Current, "Debug", "some/dir" }, }; } diff --git a/test/Microsoft.DotNet.Tools.Publish.Tests/project.json b/test/Microsoft.DotNet.Tools.Publish.Tests/project.json index 8eb748a1b..9b0bb1546 100644 --- a/test/Microsoft.DotNet.Tools.Publish.Tests/project.json +++ b/test/Microsoft.DotNet.Tools.Publish.Tests/project.json @@ -2,12 +2,8 @@ "version": "1.0.0-*", "dependencies": { - "Microsoft.NETCore.Platforms": "1.0.1-*", - "Microsoft.NETCore.Runtime": "1.0.1-*", + "NETStandard.Library": "1.0.0-rc2-23614", "Microsoft.NETCore.TestHost" : "1.0.0-*", - "System.Console": "4.0.0-beta-*", - "System.Runtime": "4.0.21-beta-*", - "System.AppContext": "4.0.1-beta-*", "xunit": "2.1.0", "xunit.console.netcore": "1.0.2-prerelease-00101",