Making the test scripts work with dotnet test.
This commit is contained in:
parent
fd604355fe
commit
e618ff091f
8 changed files with 27 additions and 24 deletions
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue