From: Michelle McDaniel Date: Mon, 17 Apr 2017 16:39:00 +0000 (-0700) Subject: Strip quotes out of BenchviewCommitName X-Git-Tag: accepted/tizen/base/20180629.140029~1340^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=060314b22f606c5b4e0a2a90e482f85d4ca6330f;p=platform%2Fupstream%2Fcoreclr.git 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. --- diff --git a/perf.groovy b/perf.groovy index cb454b3..5a88ff1 100644 --- a/perf.groovy +++ b/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\"")