2016-01-06 10:27:16 +00:00
|
|
|
#
|
|
|
|
# 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\$_"
|
2016-01-29 19:13:07 +00:00
|
|
|
dotnet build
|
2016-01-06 10:27:16 +00:00
|
|
|
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
|
2016-01-10 02:04:13 +00:00
|
|
|
$output = [string]::Join('\n', $outputArray).Trim("`r", "`n")
|
2016-01-06 10:27:16 +00:00
|
|
|
|
|
|
|
if ($output -ne "hello") {
|
|
|
|
error "Test Failed: $testName\dotnet hello"
|
|
|
|
error " printed $output"
|
|
|
|
Exit 1
|
|
|
|
}
|
|
|
|
|
|
|
|
info "Test passed: $testName"
|
|
|
|
popd
|
|
|
|
}
|
|
|
|
|
2016-01-12 16:46:33 +00:00
|
|
|
Exit 0
|