This repository has been archived on 2025-09-07. You can view files and clone it, but you cannot make any changes to its state, such as pushing and creating new issues, pull requests or comments.
dotnet-installer/scripts/test/package-command-test.ps1
Bryan Thornbury afacc2c0a6 Finish Refactoring Test Scripts
remove publish todo

small fixes

small fixes

fix packaging test bug

Fix script bug

script changes

fix packaging test

NuGet task cancelled workaround

script fixes further

more script fixes, + workaround tweak

use build rather than compile in package command test
2016-01-30 00:21:14 -08:00

34 lines
987 B
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"
#compile apps
dir "$RepoRoot\test\PackagedCommands\Consumers" | where {$_.PsIsContainer} | where {$_.Name.Contains("Direct")} |
foreach {
pushd "$RepoRoot\test\PackagedCommands\Consumers\$_"
dotnet build
popd
}
#run test
dir "$RepoRoot\test\PackagedCommands\Consumers" | where {$_.PsIsContainer} | where {$_.Name.Contains("AppWith")} |
foreach {
$testName = "test\PackagedCommands\Consumers\$_"
pushd "$RepoRoot\$testName"
$outputArray = dotnet hello | Out-String
$output = [string]::Join('\n', $outputArray).Trim("`r", "`n")
if ($output -ne "hello") {
error "Test Failed: $testName\dotnet hello"
error " printed $output"
Exit 1
}
info "Test passed: $testName"
popd
}
Exit 0