未验证 提交 db703b58 编写于 作者: J Jonathon Marolf 提交者: GitHub

Merge pull request #31219 from jmarolf/optprof-on-ci

verify that optprof scripts are not broken
......@@ -7,9 +7,9 @@ $ErrorActionPreference = "Stop"
try {
. (Join-Path $PSScriptRoot "build-utils.ps1")
Push-Location $repoDir
Push-Location $RepoRoot
Write-Host "Repo Dir $repoDir"
Write-Host "Repo Dir $RepoRoot"
Write-Host "Binaries Dir $binariesDir"
$buildConfiguration = if ($release) { "Release" } else { "Debug" }
......@@ -17,7 +17,7 @@ try {
$optProfToolDir = Get-PackageDir "Roslyn.OptProf.RunSettings.Generator"
$optProfToolExe = Join-Path $optProfToolDir "tools\roslyn.optprof.runsettings.generator.exe"
$configFile = Join-Path $repoDir "build\config\optprof.json"
$configFile = Join-Path $RepoRoot "build\config\optprof.json"
$outputFolder = Join-Path $configDir "Insertion\RunSettings"
$optProfArgs = "--configFile $configFile --outputFolder $outputFolder --buildNumber 28320.3001 "
......
......@@ -36,7 +36,30 @@ try {
# Verify the state of our generated syntax files
Write-Host "Checking generated compiler files"
Exec-Block { & (Join-Path $PSScriptRoot "generate-compiler-code.ps1") -test }
Write-Host ""
# Verfiy the state of creating run settings for optprof
Write-Host "Checking run generation for optprof"
# set environment variables
if (-not (Test-Path env:SYSTEM_TEAMPROJECT)) { $env:SYSTEM_TEAMPROJECT = "DevDiv" }
if (-not (Test-Path env:BUILD_REPOSITORY_NAME)) { $env:BUILD_REPOSITORY_NAME = "dotnet/roslyn" }
if (-not (Test-Path env:BUILD_SOURCEBRANCHNAME)) { $env:BUILD_SOURCEBRANCHNAME = "test" }
if (-not (Test-Path env:BUILD_BUILDID)) { $env:BUILD_BUILDID = "42.42.42.42" }
if (-not (Test-Path env:BUILD_SOURCESDIRECTORY)) { $env:BUILD_SOURCESDIRECTORY = $RepoRoot }
if (-not (Test-Path env:BUILD_STAGINGDIRECTORY)) { $env:BUILD_STAGINGDIRECTORY = $configDir }
# create a fake BootstrapperInfo.json file
$bootstrapperInfoFolder = Join-Path $configDir "MicroBuild\Output"
Create-Directory $bootstrapperInfoFolder
$bootstrapperInfoPath = Join-Path $bootstrapperInfoFolder "BootstrapperInfo.json"
$bootstrapperInfoContent = "[{""VSBuildVersion"": ""42.42.42424.42""}]"
$bootstrapperInfoContent >> $bootstrapperInfoPath
# generate run settings
Exec-Block { & (Join-Path $PSScriptRoot "createrunsettings.ps1") }
exit 0
}
catch [exception] {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册