github.com/nya3jp/tast@v0.0.0-20230601000426-85c8e4d83a9b/src/go.chromium.org/tast/core/internal/bundle/local.go (about) 1 // Copyright 2020 The ChromiumOS Authors 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 package bundle 6 7 import ( 8 "context" 9 "io" 10 "time" 11 12 "go.chromium.org/tast/core/internal/testing" 13 ) 14 15 const ( 16 localTestTimeout = 2 * time.Minute // default max runtime for each test 17 ) 18 19 // Local implements the main function for local test bundles. 20 // 21 // Main function of local test bundles should call LocalDefault instead. 22 func Local(clArgs []string, stdin io.Reader, stdout, stderr io.Writer, reg *testing.Registry, d Delegate) int { 23 cfg := NewStaticConfig(reg, localTestTimeout, d) 24 return run(context.Background(), clArgs, stdin, stdout, stderr, cfg) 25 }