dotnet-installer/scripts/test/argument-forwarding-tests.ps1
Eric Erhardt 3d14caceff Test directory refactoring step 1.
Moving TestProjects and TestPackages under root 'TestAssets' folder.

Partial fix #1250
2016-02-08 20:35:22 -06:00

35 lines
No EOL
1.4 KiB
PowerShell

#
# Copyright (c) .NET Foundation and contributors. All rights reserved.
# Licensed under the MIT license. See LICENSE file in the project root for full license information.
#
. "$PSScriptRoot\..\common\_common.ps1"
$ArgTestRoot = "$RepoRoot\test\ArgumentForwardingTests"
$ArgTestOutputRoot = "$RepoRoot\artifacts\tests\arg-forwarding"
dotnet publish --framework "dnxcore50" --runtime "$Rid" --output "$ArgTestOutputRoot" --configuration "$Configuration" "$ArgTestRoot\Reflector"
if (!$?) {
Write-Host Command failed: dotnet publish --framework "dnxcore50" --runtime "$Rid" --output "$ArgTestOutputRoot" --configuration "$Configuration" "$ArgTestRoot\Reflector"
Exit 1
}
dotnet publish --framework "dnxcore50" --runtime "$Rid" --output "$ArgTestOutputRoot" --configuration "$Configuration" "$ArgTestRoot\ArgumentForwardingTests"
if (!$?) {
Write-Host Command failed: dotnet publish --framework "dnxcore50" --runtime "$Rid" --output "$ArgTestOutputRoot" --configuration "$Configuration" "$ArgTestRoot\ArgumentForwardingTests"
Exit 1
}
cp "$ArgTestRoot\Reflector\reflector_cmd.cmd" "$ArgTestOutputRoot"
pushd "$ArgTestOutputRoot"
& ".\corerun" "xunit.console.netcore.exe" "ArgumentForwardingTests.dll" -xml "$_-testResults.xml" -notrait category=failing
$exitCode = $LastExitCode
popd
# No need to output here, we'll get test results
if ($exitCode -ne 0) {
Exit 1
}