Move all build diagnostic info into Logs dir

This moves all of our build diagnistic output into the same folder:
Binaries\Configuration\Logs. Having it in a single folder is necessary
for us to upload the information using the VSTS Build Artifact task.

Jenkins should be unaffected. It supports and uses wildcards for the
file types we need to be uploaded on failed builds.
上级 db02128e
......@@ -140,9 +140,7 @@ function Run-MSBuild([string]$projectFilePath, [string]$buildArgs = "", [string]
$logFileName = [IO.Path]::GetFileNameWithoutExtension($projectFilePath)
}
$logFileName = [IO.Path]::ChangeExtension($logFileName, ".binlog")
$logDir = Join-Path $binariesDir "Logs"
Create-Directory $logDir
$logFilePath = Join-Path $logDir $logFileName
$logFilePath = Join-Path $logsDir $logFileName
$args += " /bl:$logFilePath"
}
......@@ -185,12 +183,9 @@ function Make-BootstrapBuild() {
Create-Directory $dir
if ($buildCoreClr) {
$bootstrapFramework = "netcoreapp2.0"
$logDir = Join-Path $binariesDir "Logs"
Create-Directory $logDir
Exec-Console "dotnet" "publish --no-restore src/Compilers/CSharp/csc -o `"$dir/bincore`" --framework $bootstrapFramework $bootstrapArgs -bl:$logDir/BootstrapCsc.binlog"
Exec-Console "dotnet" "publish --no-restore src/Compilers/VisualBasic/vbc -o `"$dir/bincore`" --framework $bootstrapFramework $bootstrapArgs -bl:$logDir/BootstrapVbc.binlog"
Exec-Console "dotnet" "publish --no-restore src/Compilers/Server/VBCSCompiler -o `"$dir/bincore`" --framework $bootstrapFramework $bootstrapArgs -bl:$logDir/BootstrapVBCSCompiler.binlog"
Exec-Console "dotnet" "publish --no-restore src/Compilers/Core/MSBuildTask -o `"$dir`" $bootstrapArgs -bl:$binariesDir/BootstrapMSBuildTask.binlog"
Exec-Console "dotnet" "publish --no-restore src/Compilers/CSharp/csc -o `"$dir/bincore`" --framework $bootstrapFramework $bootstrapArgs -bl:$logsDir/BootstrapCsc.binlog"
Exec-Console "dotnet" "publish --no-restore src/Compilers/VisualBasic/vbc -o `"$dir/bincore`" --framework $bootstrapFramework $bootstrapArgs -bl:$logsDir/BootstrapVbc.binlog"
Exec-Console "dotnet" "publish --no-restore src/Compilers/Server/VBCSCompiler -o `"$dir/bincore`" --framework $bootstrapFramework $bootstrapArgs -bl:$logsDir/BootstrapVBCSCompiler.binlog"
Stop-BuildProcesses
}
else {
......@@ -391,8 +386,8 @@ function Test-XUnitCoreClr() {
$unitDir = Join-Path $configDir "UnitTests"
$tf = "netcoreapp2.0"
$logDir = Join-Path $unitDir "xUnitResults"
Create-Directory $logDir
$xunitResultDir = Join-Path $unitDir "xUnitResults"
Create-Directory $xunitResultDir
$xunitConsole = Join-Path (Get-PackageDir "dotnet-xunit") "tools\$tf\xunit.console.dll"
$dlls = @()
......@@ -408,7 +403,7 @@ function Test-XUnitCoreClr() {
$args += " --runtimeconfig " + [IO.Path]::ChangeExtension($dllPath, ".runtimeconfig.json")
$args += " $xunitConsole"
$args += " $dllPath"
$args += " -xml " + (Join-Path $logDir ([IO.Path]::ChangeExtension($dllName, ".xml")))
$args += " -xml " + (Join-Path $xunitResultDir ([IO.Path]::ChangeExtension($dllName, ".xml")))
try {
Write-Host "Running $dllName"
......@@ -438,7 +433,7 @@ function Test-XUnit() {
Deploy-VsixViaTool
}
$logFilePath = Join-Path $configDir "runtests.log"
$logFilePath = Join-Path $logsDir "runtests.log"
$unitDir = Join-Path $configDir "UnitTests"
$runTests = Join-Path $configDir "Exes\RunTests\RunTests.exe"
$xunitDir = Join-Path (Get-PackageDir "xunit.runner.console") "tools\net452"
......@@ -638,11 +633,13 @@ try {
$dotnet = Ensure-DotnetSdk
$buildConfiguration = if ($release) { "Release" } else { "Debug" }
$configDir = Join-Path $binariesDir $buildConfiguration
$logsDir = Join-Path $configDir "Logs"
$bootstrapDir = ""
# Ensure the main output directories exist as a number of tools will fail when they don't exist.
Create-Directory $binariesDir
Create-Directory $configDir
Create-Directory $logsDir
if ($cibuild) {
List-VSProcesses
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册