Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(222)

Side by Side Diff: ct/go/worker_scripts/worker_common/worker_common.go

Issue 1988133002: Use swarming in capture_archives CT task and capture archives in parallel (Closed) Base URL: https://skia.googlesource.com/buildbot@ct-4-create_pagesets
Patch Set: Comment Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ct/go/worker_scripts/capture_archives/main.go ('k') | ct/isolates/capture_archives.isolate » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 Common initialization for worker scripts. 2 Common initialization for worker scripts.
3 */ 3 */
4 4
5 package worker_common 5 package worker_common
6 6
7 import ( 7 import (
8 "flag" 8 "flag"
9 "os"
10
11 "github.com/skia-dev/glog"
9 12
10 "go.skia.org/infra/ct/go/util" 13 "go.skia.org/infra/ct/go/util"
11 "go.skia.org/infra/go/common" 14 "go.skia.org/infra/go/common"
15 "go.skia.org/infra/go/exec"
16 skutil "go.skia.org/infra/go/util"
12 ) 17 )
13 18
14 var ( 19 var (
15 Local = flag.Bool("local", false, "Running locally if true. As opposed t o in production.") 20 Local = flag.Bool("local", false, "Running locally if true. As opposed t o in production.")
16 ) 21 )
17 22
18 func Init() { 23 func Init() {
19 common.Init() 24 common.Init()
20 if *Local { 25 if *Local {
21 util.SetVarsForLocal() 26 util.SetVarsForLocal()
27 } else {
28 // Add depot_tools to the PATH.
29 skutil.LogErr(os.Setenv("PATH", os.Getenv("PATH")+":"+util.Depot ToolsDir))
30 // Bring up Xvfb on workers (for GCE instances).
31 if _, _, err := exec.RunIndefinitely(&exec.Command{
32 Name: "sudo",
33 Args: []string{"Xvfb", ":0", "-screen", "0", "128 0x1024x24"},
34 Env: []string{},
35 InheritPath: true,
36 Timeout: util.XVFB_TIMEOUT,
37 LogStdout: true,
38 Stdout: nil,
39 LogStderr: true,
40 Stderr: nil,
41 }); err != nil {
42 // CT's baremetal machines will already have an active d isplay 0.
43 glog.Infof("Could not run Xvfb on Display 0: %s", err)
44 }
22 } 45 }
23 } 46 }
OLDNEW
« no previous file with comments | « ct/go/worker_scripts/capture_archives/main.go ('k') | ct/isolates/capture_archives.isolate » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698