提交 4724bd5f 编写于 作者: C CyrusNajmabadi

Merge branch 'master' into codeCleanupErrors2

......@@ -108,16 +108,19 @@ try {
Run-MSBuild Roslyn.sln /p:Configuration=$buildConfiguration /p:DeployExtension=false
# Check if we have credentials to upload to benchview
$extraArgs = ""
$extraArgs = @()
if ((Test-Path env:\GIT_BRANCH) -and (Test-Path env:\BV_UPLOAD_SAS_TOKEN)) {
$extraArgs = "--report-benchview --branch $($env:GIT_BRANCH)"
$extraArgs += "--report-benchview"
$extraArgs += "--branch=$env:GIT_BRANCH"
# Check if we are in a PR or this is a rolling submission
if (Test-Path env:\ghprbPullTitle) {
$extraArgs = '$($extraArgs) --benchview-submission-name "[$($env:ghprbPullAuthorLogin)] PR $($env:ghprbPullId): $($env:ghprbPullTitle)" --benchview-submission-type private'
$submissionName = $env:ghprbPullTitle.Replace(" ", "_")
$extraArgs += "--benchview-submission-name=""$submissionName"""
$extraArgs += "--benchview-submission-type=private"
}
else {
$extraArgs = '$(4extraArgs) --benchview-submission-type rolling'
$extraArgs += "--benchview-submission-type=rolling"
}
Create-Directory ".\Binaries\$buildConfiguration\tools\"
......@@ -126,7 +129,7 @@ try {
}
Terminate-BuildProcesses
& ".\Binaries\$buildConfiguration\Exes\Perf.Runner\Roslyn.Test.Performance.Runner.exe" --search-directory=".\\Binaries\\$buildConfiguration\\Dlls\\" --no-trace-upload $extraArgs
& ".\Binaries\$buildConfiguration\Exes\Perf.Runner\Roslyn.Test.Performance.Runner.exe" $extraArgs --search-directory=".\\Binaries\\$buildConfiguration\\Dlls\\" --no-trace-upload
if (-not $?) {
throw "Perf run failed"
}
......
......@@ -16,8 +16,10 @@ Invoke-WebRequest -Uri http://dotnetci.blob.core.windows.net/roslyn-perf/cpc.zip
[Reflection.Assembly]::LoadWithPartialName('System.IO.Compression.FileSystem') | Out-Null
[IO.Compression.ZipFile]::ExtractToDirectory('cpc.zip', $CPCLocation)
./cibuild.cmd /testPerfRun /release
if ($LASTEXITCODE -ne 0)
./build/scripts/cibuild.ps1 -release -testPerfRun
if ( -not $? )
{
exit $LASTEXITCODE
echo "perf run failed"
exit 1
}
......@@ -54,4 +54,4 @@ def generate(boolean isPr) {
}
generate(true)
generate(false)
\ No newline at end of file
generate(false)
......@@ -16,6 +16,8 @@ public static class Program
{
public static int Main(string[] args)
{
Console.WriteLine("args: \n" + String.Join("\n ", args));
bool shouldReportBenchview = false;
bool shouldUploadTrace = true;
bool isCiTest = false;
......@@ -37,8 +39,12 @@ public static int Main(string[] args)
{"search-directory=", "the directory to recursively search for tests", dir => { searchDirectory = dir; } }
};
parameterOptions.Parse(args);
Log($"shouldReportBenchview: {shouldReportBenchview}");
Log($"submissionType: {submissionType}");
if (shouldReportBenchview)
{
if (!CheckBenchViewOptions(submissionType, submissionName) ||
......
......@@ -86,7 +86,7 @@ public static void UploadBenchviewReport(string filepath, string submissionName)
if (result)
{
var submissionJson = CreateSubmissionJson(s_submissionType, submissionName, s_branch, Path.Combine(s_outputDirectory, "measurement.json"));
System.Console.Write(System.IO.File.ReadAllText(submissionJson));
Log("Uploading json to Azure blob storage");
var uploadPy = Path.Combine(s_scriptDirectory, "upload.py");
ShellOutVital("py", $"\"{uploadPy}\" \"{submissionJson}\" --container roslyn");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册