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

Commit c111a57

Browse files
Merge pull request #11020 from adiaaida/hardenPerf
Strip quotes out of BenchviewCommitName
2 parents bd43d49 + 060314b commit c111a57

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)