aboutsummaryrefslogtreecommitdiffstats
path: root/dashboard/app/coverage_batch.go
diff options
context:
space:
mode:
authorTaras Madan <tarasmadan@google.com>2024-07-26 13:33:42 +0200
committerTaras Madan <tarasmadan@google.com>2024-07-26 11:55:49 +0000
commit389c3e9cea0e1f2b34d475e858942ae9c6f12e05 (patch)
treed7dacbe33f60e68113ce585768c9f03a5c83d2f8 /dashboard/app/coverage_batch.go
parent2b4812a472dc793e954fa71a1b61773a428bdf88 (diff)
all: make coverage-merger client name configurable
Diffstat (limited to 'dashboard/app/coverage_batch.go')
-rw-r--r--dashboard/app/coverage_batch.go11
1 files changed, 9 insertions, 2 deletions
diff --git a/dashboard/app/coverage_batch.go b/dashboard/app/coverage_batch.go
index 8a88efa80..1e4b59d0f 100644
--- a/dashboard/app/coverage_batch.go
+++ b/dashboard/app/coverage_batch.go
@@ -55,7 +55,10 @@ func handleBatchCoverage(w http.ResponseWriter, r *http.Request) {
ctx,
nsCovConfig.BatchProject,
nsCovConfig.BatchServiceAccount,
- batchScript(ns, repo, branch, 7, dates, nsCovConfig.JobInitScript, nsCovConfig.SyzEnvInitScript),
+ batchScript(ns, repo, branch, 7, dates,
+ nsCovConfig.JobInitScript,
+ nsCovConfig.SyzEnvInitScript,
+ nsCovConfig.DashboardClientName),
nsCovConfig.BatchScopes); err != nil {
log.Errorf(ctx, "failed to batchScript: %s", err.Error())
}
@@ -63,7 +66,10 @@ func handleBatchCoverage(w http.ResponseWriter, r *http.Request) {
}
func batchScript(ns, repo, branch string, days int, datesTo []civil.Date,
- jobInitScript, syzEnvInitScript string) string {
+ jobInitScript, syzEnvInitScript, clientName string) string {
+ if clientName == "" {
+ clientName = defaultDashboardClientName
+ }
script := jobInitScript + "\n"
script += "git clone --depth 1 --branch master --single-branch https://github.com/google/syzkaller\n" +
"cd syzkaller\n" +
@@ -80,6 +86,7 @@ func batchScript(ns, repo, branch string, days int, datesTo []civil.Date,
" -b " + branch +
" -d " + strconv.Itoa(days) +
" -t " + dateTo.String() +
+ " -c " + clientName +
" 2>&1; " // we don't want stderr output to be logged as errors
}
script += "\""