Refactoring test scripts

_nuget needs some RepoRoots

get the cats in line (d)

spaces

Fix Linux build breaks

add execution permissions

Pick up #999 Finish refactoring test scripts

remove auth

Reorder publishing to work!

fix rebase errors

fix more rebase errors

small fixes
This commit is contained in:
piotrp 2016-01-23 12:55:03 -08:00 committed by Bryan Thornbury
parent 4e365921f7
commit 51eca0bcba
40 changed files with 443 additions and 216 deletions

View file

@ -9,21 +9,24 @@ $Rid = "win7-x64"
$Tfm = "dnxcore50"
$RepoRoot = Resolve-Path "$PSScriptRoot\..\.."
$OutputDir = "$RepoRoot\artifacts\$Rid"
$DnxDir = "$OutputDir\dnx"
$DnxRoot = "$DnxDir\bin"
$Stage1Dir = "$OutputDir\stage1"
$Stage1CompilationDir = "$OutputDir\stage1compilation"
$Stage2Dir = "$OutputDir\stage2"
$Stage2CompilationDir = "$OutputDir\stage2compilation"
$HostDir = "$OutputDir\corehost"
$PackageDir = "$RepoRoot\artifacts\packages\dnvm"
$TestBinRoot = "$RepoRoot\artifacts\tests"
$TestPackageDir = "$TestBinRoot\packages"
$env:ReleaseSuffix = "beta"
$env:Channel = "$env:ReleaseSuffix"
$env:TEST_ROOT = "$OutputDir\tests"
$env:TEST_ARTIFACTS = "$env:TEST_ROOT\artifacts"
# Set reasonable defaults for unset variables
setEnvIfDefault "DOTNET_INSTALL_DIR" "$(Convert-Path "$PSScriptRoot\..")\.dotnet_stage0\win7-x64"
setEnvIfDefault "DOTNET_CLI_VERSION" "0.1.0.0"
setPathAndHomeIfDefault "$Stage2Dir"
setVarIfDefault "Configuration" "Debug"
# Common Files which depend on above properties
. $PSScriptRoot\_nuget.ps1
. $PSScriptRoot\_configuration.ps1

View file

@ -18,13 +18,14 @@ source "$COMMONDIR/_rid.sh"
export TFM=dnxcore50
export REPOROOT=$(cd $COMMONDIR/../.. && pwd)
export OUTPUT_ROOT=$REPOROOT/artifacts/$RID
export DNX_DIR=$OUTPUT_ROOT/dnx
export DNX_ROOT=$DNX_DIR/bin
export STAGE1_DIR=$OUTPUT_ROOT/stage1
export STAGE1_COMPILATION_DIR=$OUTPUT_ROOT/stage1compilation
export STAGE2_DIR=$OUTPUT_ROOT/stage2
export STAGE2_COMPILATION_DIR=$OUTPUT_ROOT/stage2compilation
export HOST_DIR=$OUTPUT_ROOT/corehost
export TEST_BIN_ROOT="$REPOROOT/artifacts/tests"
export TEST_PACKAGE_DIR="$TEST_BIN_ROOT/packages"
export RELEASE_SUFFIX=beta
export CHANNEL=$RELEASE_SUFFIX
@ -33,5 +34,9 @@ export CHANNEL=$RELEASE_SUFFIX
[ -z "$DOTNET_HOME" ] && export DOTNET_HOME=$STAGE2_DIR && export PATH=$STAGE2_DIR/bin:$PATH
[ -z "$CONFIGURATION" ] && export CONFIGURATION=Debug
# Common Files which depend on above properties
source "$COMMONDIR/_nuget.sh"
source "$COMMONDIR/_configuration.sh"
unset COMMONSOURCE
unset COMMONDIR
unset COMMONDIR

View file

@ -0,0 +1,24 @@
#
# 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.
#
function loadTestProjectList()
{
return Import-CSV "$RepoRoot\scripts\configuration\testProjects.csv" -Header "ProjectName"
}
function loadTestScriptList()
{
return Import-CSV "$RepoRoot\scripts\configuration\testScripts.csv" -Header "ProjectName"
}
function loadTestPackageList()
{
return Import-CSV "$RepoRoot\scripts\configuration\testPackageProjects.csv" -Header "ProjectName"
}
function loadBuildProjectList()
{
return Import-CSV "$RepoRoot\scripts\configuration\buildProjects.csv" -Header "ProjectName"
}

View file

@ -0,0 +1,25 @@
#!/usr/bin/env bash
#
# 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.
#
loadTestProjectList()
{
echo $(cat "$REPOROOT/scripts/configuration/testProjects.csv")
}
loadTestScriptList()
{
echo $(cat "$REPOROOT/scripts/configuration/testScripts.csv")
}
loadTestPackageList()
{
echo $(cat "$REPOROOT/scripts/configuration/testPackageProjects.csv")
}
loadBuildProjectList()
{
echo $(cat "$REPOROOT/scripts/configuration/buildProjects.csv")
}

16
scripts/common/_nuget.ps1 Normal file
View file

@ -0,0 +1,16 @@
#
# 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.
#
if ($env:CI_BUILD -eq "1") {
$env:NUGET_PACKAGES = (Join-Path $RepoRoot "artifacts\home\.nuget\packages")
} else {
$env:NUGET_PACKAGES = (Join-Path $env:USERPROFILE ".nuget\packages")
}
$env:DOTNET_PACKAGES = $env:NUGET_PACKAGES
$env:DNX_PACKAGES = $env:NUGET_PACKAGES
if(!(Test-Path $env:NUGET_PACKAGES)) {
mkdir $env:NUGET_PACKAGES | Out-Null
}

10
scripts/common/_nuget.sh Normal file
View file

@ -0,0 +1,10 @@
#!/usr/bin/env bash
#
# 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.
#
## Temporarily redirect to the NuGet package installation location
export NUGET_PACKAGES=~/.nuget/packages
export DOTNET_PACKAGES=$NUGET_PACKAGES
export DNX_PACKAGES=$NUGET_PACKAGES