diff --git a/scripts/test/build-tests.ps1 b/scripts/test/build-tests.ps1 index 8a2256935..54876ee81 100644 --- a/scripts/test/build-tests.ps1 +++ b/scripts/test/build-tests.ps1 @@ -7,9 +7,10 @@ # Publish each test project loadTestProjectList | foreach { - dotnet publish --framework "dnxcore50" --runtime "$Rid" --output "$TestBinRoot" --configuration "$Configuration" "$RepoRoot\test\$($_.ProjectName)" + #we should use publish to an output path, we will once issue #1183 has been fixed and we can point dotnet test do a dll. + dotnet build --framework "dnxcore50" --runtime "$Rid" --configuration "$Configuration" "$RepoRoot\test\$($_.ProjectName)" if (!$?) { - Write-Host Command failed: dotnet publish --framework "dnxcore50" --runtime "$Rid" --output "$TestBinRoot" --configuration "$Configuration" "$RepoRoot\test\$($_.ProjectName)" + Write-Host Command failed: dotnet publish --framework "dnxcore50" --runtime "$Rid" --configuration "$Configuration" "$RepoRoot\test\$($_.ProjectName)" exit 1 } } diff --git a/scripts/test/build-tests.sh b/scripts/test/build-tests.sh index fadfc67ec..5aaa16414 100755 --- a/scripts/test/build-tests.sh +++ b/scripts/test/build-tests.sh @@ -21,6 +21,7 @@ PROJECTS=$(loadTestProjectList) for project in $PROJECTS do - dotnet publish --framework "dnxcore50" --runtime "$RID" --output "$TEST_BIN_ROOT" --configuration "$CONFIGURATION" "$REPOROOT/test/$project" + #we should use publish to an output path, we will once issue #1183 has been fixed and we can point dotnet test do a dll. + dotnet build --framework "dnxcore50" --runtime "$RID" --configuration "$CONFIGURATION" "$REPOROOT/test/$project" done diff --git a/scripts/test/run-tests.ps1 b/scripts/test/run-tests.ps1 index 269447c3b..10b320127 100644 --- a/scripts/test/run-tests.ps1 +++ b/scripts/test/run-tests.ps1 @@ -29,10 +29,13 @@ popd mkdir -Force "$TestBinRoot\TestProjects" cp -rec -Force "$RepoRoot\test\TestProjects\*" "$TestBinRoot\TestProjects" -pushd "$TestBinRoot" # Run each test project $TestProjects | foreach { - & ".\corerun" "xunit.console.netcore.exe" "$($_.ProjectName).dll" -xml "$($_.ProjectName)-testResults.xml" -notrait category=failing + # This is a workaroudn for issue #1184, where dotnet test needs to be executed from the folder containing the project.json. + pushd "$RepoRoot\test\$($_.ProjectName)" + dotnet test -xml "$TestBinRoot\$($_.ProjectName)-testResults.xml" -notrait category=failing + popd + $exitCode = $LastExitCode if ($exitCode -ne 0) { $failingTests += "$($_.ProjectName)" @@ -41,8 +44,6 @@ $TestProjects | foreach { $failCount += $exitCode } -popd - $TestScripts | foreach { $scriptName = "$($_.ProjectName).ps1" diff --git a/scripts/test/run-tests.sh b/scripts/test/run-tests.sh index d5e36ed81..49c816469 100755 --- a/scripts/test/run-tests.sh +++ b/scripts/test/run-tests.sh @@ -31,7 +31,11 @@ set +e for project in $TestProjects do - ./corerun "xunit.console.netcore.exe" "$project.dll" -xml "${project}-testResults.xml" -notrait category=failing + # This is a workaroudn for issue #1184, where dotnet test needs to be executed from the folder containing the project.json. + pushd "$REPOROOT/test/$project" + dotnet test -xml "$TEST_BIN_ROOT\$project-testResults.xml" -notrait category=failing + popd + exitCode=$? failCount+=$exitCode if [ $exitCode -ne 0 ]; then diff --git a/src/Microsoft.DotNet.Cli.Utils/project.json b/src/Microsoft.DotNet.Cli.Utils/project.json index 49b32b763..fc8770c5b 100644 --- a/src/Microsoft.DotNet.Cli.Utils/project.json +++ b/src/Microsoft.DotNet.Cli.Utils/project.json @@ -9,11 +9,7 @@ "NETStandard.Library": "1.0.0-rc2-23728", "Microsoft.DotNet.ProjectModel": "1.0.0-*", "System.Reflection.Metadata": "1.2.0-rc2-23728", - "Microsoft.Extensions.PlatformAbstractions": "1.0.0-rc2-16537", - "Microsoft.DotNet.Files": { - "type": "build", - "version": "1.0.0-*" - } + "Microsoft.Extensions.PlatformAbstractions": "1.0.0-rc2-16537" }, "frameworks": { diff --git a/src/Microsoft.DotNet.Compiler.Common/project.json b/src/Microsoft.DotNet.Compiler.Common/project.json index 55f52f1b0..c786e641e 100644 --- a/src/Microsoft.DotNet.Compiler.Common/project.json +++ b/src/Microsoft.DotNet.Compiler.Common/project.json @@ -10,8 +10,8 @@ "System.CommandLine": "0.1.0-e160119-1", "Microsoft.CodeAnalysis.CSharp": "1.2.0-beta1-20160108-01", "Microsoft.DotNet.ProjectModel": "1.0.0-*", - "Microsoft.DotNet.Cli.Utils": "1.0.0-*", - "Microsoft.DotNet.Files": {"version": "1.0.0-*", "type": "build"} + "Microsoft.DotNet.Cli.Utils": "1.0.0-*", + "Microsoft.DotNet.Files": {"version": "1.0.0-*", "target": "project"} }, "frameworks": { "dnxcore50": { diff --git a/src/Microsoft.DotNet.Files/project.json b/src/Microsoft.DotNet.Files/project.json index 33f235993..e003b1b01 100644 --- a/src/Microsoft.DotNet.Files/project.json +++ b/src/Microsoft.DotNet.Files/project.json @@ -5,8 +5,8 @@ }, "description": "Abstraction to interact with the file system and file paths.", "dependencies": { - "NETStandard.Library": "1.0.0-rc2-23727", - "System.Linq.Expressions": "4.0.11-rc2-23727", + "NETStandard.Library": "1.0.0-rc2-23728", + "System.Linq.Expressions": "4.0.11-rc2-23728", "Microsoft.Extensions.FileSystemGlobbing": "1.0.0-rc2-15975", diff --git a/test/StreamForwarderTests/project.json b/test/StreamForwarderTests/project.json index 910aad82d..755c9752a 100644 --- a/test/StreamForwarderTests/project.json +++ b/test/StreamForwarderTests/project.json @@ -7,20 +7,20 @@ "dependencies": { "NETStandard.Library" : "1.0.0-rc2-23728", - "xunit": "2.1.0", - "xunit.console.netcore": "1.0.2-prerelease-00101", - "xunit.netcore.extensions": "1.0.0-prerelease-00153", - "xunit.runner.utility": "2.1.0", - "Microsoft.DotNet.ProjectModel": { "target": "project" }, "Microsoft.DotNet.Cli.Utils": { "target": "project" }, - "Microsoft.DotNet.Tools.Tests.Utilities": { "target": "project" } + "Microsoft.DotNet.Tools.Tests.Utilities": { "target": "project" }, + + "xunit": "2.1.0", + "dotnet-test-xunit": "1.0.0-dev-45337-57" }, "frameworks": { "dnxcore50": { "imports": "portable-net45+win8" } - } + }, + + "testRunner": "xunit" }