- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 28 for testMain (0.2 sec)
-
src/cmd/go/internal/load/test.go
switch { case name == "TestMain": if isTestFunc(n, "T") { t.Tests = append(t.Tests, testFunc{pkg, name, "", false}) *doImport, *seen = true, true continue } err := checkTestFunc(n, "M") if err != nil { return err } if t.TestMain != nil { return errors.New("multiple definitions of TestMain") } t.TestMain = &testFunc{pkg, name, "", false}
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 14:01:23 UTC 2024 - 28.2K bytes - Viewed (0) -
tests/integration/README.md
it is bootstrapped by a Go `TestMain`, which has the same restriction. To begin, create a new folder for your suite under [tests/integration](https://github.com/istio/istio/tree/master/tests/integration). ```console $ cd ${ISTIO}/tests/integration $ mkdir mysuite ``` Within that package, create a `TestMain` to bootstrap the test suite: ```go func TestMain(m *testing.M) { framework.
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Thu May 09 19:04:51 UTC 2024 - 20.9K bytes - Viewed (0) -
src/testing/testing_test.go
"path/filepath" "regexp" "slices" "strings" "sync" "testing" "time" ) // This is exactly what a test would do without a TestMain. // It's here only so that there is at least one package in the // standard library with a TestMain, so that code is executed. func TestMain(m *testing.M) { if os.Getenv("GO_WANT_RACE_BEFORE_TESTS") == "1" { doRace() } m.Run()
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 08 19:10:41 UTC 2024 - 19.3K bytes - Viewed (0) -
src/cmd/cgo/internal/testplugin/plugin_test.go
"runtime" "strings" "testing" "time" ) var globalSkip = func(t *testing.T) {} var gcflags string = os.Getenv("GO_GCFLAGS") var goroot string func TestMain(m *testing.M) { flag.Parse() log.SetFlags(log.Lshortfile) os.Exit(testMain(m)) } // tmpDir is used to cleanup logged commands -- s/tmpDir/$TMPDIR/ var tmpDir string // prettyPrintf prints lines with tmpDir sanitized.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 20 15:32:53 UTC 2024 - 12.3K bytes - Viewed (0) -
tests/integration/ambient/main_test.go
// WaypointProxies by WaypointProxies map[string]ambient.WaypointProxy } // TestMain defines the entrypoint for pilot tests using a standard Istio installation. // If a test requires a custom install it should go into its own package, otherwise it should go // here to reuse a single install across tests. func TestMain(m *testing.M) { // nolint: staticcheck framework. NewSuite(m). RequireMinVersion(24).
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Wed Jun 12 00:07:28 UTC 2024 - 10.8K bytes - Viewed (0) -
src/cmd/vet/vet_test.go
"internal/testenv" "log" "os" "os/exec" "path" "path/filepath" "regexp" "strconv" "strings" "sync" "testing" ) // TestMain executes the test binary as the vet command if // GO_VETTEST_IS_VET is set, and runs the tests otherwise. func TestMain(m *testing.M) { if os.Getenv("GO_VETTEST_IS_VET") != "" { main() os.Exit(0) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 03 01:02:40 UTC 2024 - 12.5K bytes - Viewed (0) -
src/crypto/tls/handshake_test.go
if err != nil { panic("failed to create temp file: " + err.Error()) } path := file.Name() file.WriteString(contents) file.Close() return path } // localListener is set up by TestMain and used by localPipe to create Conn // pairs like net.Pipe, but connected by an actual buffered TCP connection. var localListener struct { mu sync.Mutex addr net.Addr ch chan net.Conn }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 03:10:12 UTC 2024 - 24.5K bytes - Viewed (0) -
tests/integration/security/file_mounted_certs/main_test.go
"ISTIO_META_TLS_SERVER_KEY": "/server-certs/key.pem", "ISTIO_META_TLS_SERVER_ROOT_CERT": "/server-certs/root-cert.pem", } ` ) func TestMain(m *testing.M) { // nolint: staticcheck framework. NewSuite(m). Label(label.CustomSetup). RequireSingleCluster(). RequireMultiPrimary(). Setup(istio.Setup(&inst, setupConfig, CreateCustomIstiodSecret)).
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Thu May 02 21:29:40 UTC 2024 - 13.4K bytes - Viewed (0) -
src/cmd/cover/cover.go
if pkgconfig.EmitMetaFile != "" { p.emitMetaFile(pkgconfig.EmitMetaFile) } // Something went wrong if regonly/testmain mode is in effect and // we have instrumented functions. if counterStmt == nil && len(p.counterLengths) != 0 { panic("internal error: seen functions with regonly/testmain") } // Emit package name. fmt.Fprintf(w, "\npackage %s\n\n", pkgconfig.PkgName) // Emit package ID var.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 14 19:41:17 UTC 2024 - 34.5K bytes - Viewed (0) -
pkg/test/framework/components/echo/echotest/filters_test.go
}}, } all = echo.Instances{a1, a2, b1, b2, c1, c2, a1Ns2, a2Ns2, vm1, vm2, headless1, headless2, naked1, naked2, external1, external2} ) func TestMain(m *testing.M) { framework.NewSuite(m).EnvironmentFactory(resource.NilEnvironmentFactory).Run() } func TestDeployments(t *testing.T) { if diff := cmp.Diff( all.Services().NamespacedNames(),
Registered: Fri Jun 14 15:00:06 UTC 2024 - Last Modified: Thu Jun 06 22:12:34 UTC 2024 - 13.1K bytes - Viewed (0)