Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit 060314b

Browse files
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.
1 parent 591be50 commit 060314b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

perf.groovy

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,9 @@ def static getOSGroup(def os) {
6969
//Do this here to remove the origin but at the front of the branch name as this is a problem for BenchView
7070
//we have to do it all as one statement because cmd is called each time and we lose the set environment variable
7171
batchFile("if [%GIT_BRANCH:~0,7%] == [origin/] (set GIT_BRANCH_WITHOUT_ORIGIN=%GIT_BRANCH:origin/=%) else (set GIT_BRANCH_WITHOUT_ORIGIN=%GIT_BRANCH%)\n" +
72-
"py \"%WORKSPACE%\\Microsoft.BenchView.JSONFormat\\tools\\submission-metadata.py\" --name \"${benchViewName}\" --user \"[email protected]\"\n" +
72+
"set BENCHVIEWNAME=${benchViewName}\n" +
73+
"set BENCHVIEWNAME=%BENCHVIEWNAME:\"=%\n" +
74+
"py \"%WORKSPACE%\\Microsoft.BenchView.JSONFormat\\tools\\submission-metadata.py\" --name \"%BENCHVIEWNAME%\" --user \"[email protected]\"\n" +
7375
"py \"%WORKSPACE%\\Microsoft.BenchView.JSONFormat\\tools\\build.py\" git --branch %GIT_BRANCH_WITHOUT_ORIGIN% --type ${runType}")
7476
batchFile("py \"%WORKSPACE%\\Microsoft.BenchView.JSONFormat\\tools\\machinedata.py\"")
7577
batchFile("set __TestIntermediateDir=int&&build.cmd ${configuration} ${architecture}")
@@ -162,6 +164,8 @@ def static getOSGroup(def os) {
162164
//Do this here to remove the origin but at the front of the branch name as this is a problem for BenchView
163165
//we have to do it all as one statement because cmd is called each time and we lose the set environment variable
164166
batchFile("if [%GIT_BRANCH:~0,7%] == [origin/] (set GIT_BRANCH_WITHOUT_ORIGIN=%GIT_BRANCH:origin/=%) else (set GIT_BRANCH_WITHOUT_ORIGIN=%GIT_BRANCH%)\n" +
167+
"set BENCHVIEWNAME=${benchViewName}\n" +
168+
"set BENCHVIEWNAME=%BENCHVIEWNAME:\"=%\n" +
165169
"py \"%WORKSPACE%\\Microsoft.BenchView.JSONFormat\\tools\\submission-metadata.py\" --name \"${benchViewName}\" --user \"[email protected]\"\n" +
166170
"py \"%WORKSPACE%\\Microsoft.BenchView.JSONFormat\\tools\\build.py\" git --branch %GIT_BRANCH_WITHOUT_ORIGIN% --type ${runType}")
167171
batchFile("py \"%WORKSPACE%\\Microsoft.BenchView.JSONFormat\\tools\\machinedata.py\"")

0 commit comments

Comments
 (0)