From e9afce94f8494150c4f878e055f4b33b09193a2e Mon Sep 17 00:00:00 2001 From: Michelle McDaniel Date: Mon, 17 Apr 2017 09:39:00 -0700 Subject: [PATCH] Strip quotes out of BenchviewCommitName When we pass the name of the pr to submission-metadata.py, we need the name of the pr to not include quotes, or submission-metadata.py will fail because it has the "wrong" parameters (because parts of the name are no longer quoted). This change strips quotation marks out of the benchview commit name to harden against this kind of failure. Commit migrated from https://github.com/dotnet/coreclr/commit/060314b22f606c5b4e0a2a90e482f85d4ca6330f --- src/coreclr/perf.groovy | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/coreclr/perf.groovy b/src/coreclr/perf.groovy index cb454b3..5a88ff1 100644 --- a/src/coreclr/perf.groovy +++ b/src/coreclr/perf.groovy @@ -69,7 +69,9 @@ def static getOSGroup(def os) { //Do this here to remove the origin but at the front of the branch name as this is a problem for BenchView //we have to do it all as one statement because cmd is called each time and we lose the set environment variable batchFile("if [%GIT_BRANCH:~0,7%] == [origin/] (set GIT_BRANCH_WITHOUT_ORIGIN=%GIT_BRANCH:origin/=%) else (set GIT_BRANCH_WITHOUT_ORIGIN=%GIT_BRANCH%)\n" + - "py \"%WORKSPACE%\\Microsoft.BenchView.JSONFormat\\tools\\submission-metadata.py\" --name \"${benchViewName}\" --user \"dotnet-bot@microsoft.com\"\n" + + "set BENCHVIEWNAME=${benchViewName}\n" + + "set BENCHVIEWNAME=%BENCHVIEWNAME:\"=%\n" + + "py \"%WORKSPACE%\\Microsoft.BenchView.JSONFormat\\tools\\submission-metadata.py\" --name \"%BENCHVIEWNAME%\" --user \"dotnet-bot@microsoft.com\"\n" + "py \"%WORKSPACE%\\Microsoft.BenchView.JSONFormat\\tools\\build.py\" git --branch %GIT_BRANCH_WITHOUT_ORIGIN% --type ${runType}") batchFile("py \"%WORKSPACE%\\Microsoft.BenchView.JSONFormat\\tools\\machinedata.py\"") batchFile("set __TestIntermediateDir=int&&build.cmd ${configuration} ${architecture}") @@ -162,6 +164,8 @@ def static getOSGroup(def os) { //Do this here to remove the origin but at the front of the branch name as this is a problem for BenchView //we have to do it all as one statement because cmd is called each time and we lose the set environment variable batchFile("if [%GIT_BRANCH:~0,7%] == [origin/] (set GIT_BRANCH_WITHOUT_ORIGIN=%GIT_BRANCH:origin/=%) else (set GIT_BRANCH_WITHOUT_ORIGIN=%GIT_BRANCH%)\n" + + "set BENCHVIEWNAME=${benchViewName}\n" + + "set BENCHVIEWNAME=%BENCHVIEWNAME:\"=%\n" + "py \"%WORKSPACE%\\Microsoft.BenchView.JSONFormat\\tools\\submission-metadata.py\" --name \"${benchViewName}\" --user \"dotnet-bot@microsoft.com\"\n" + "py \"%WORKSPACE%\\Microsoft.BenchView.JSONFormat\\tools\\build.py\" git --branch %GIT_BRANCH_WITHOUT_ORIGIN% --type ${runType}") batchFile("py \"%WORKSPACE%\\Microsoft.BenchView.JSONFormat\\tools\\machinedata.py\"") -- 2.7.4