Debian Codegraph @

go/internal/gccgoimporter/testenv_test.go

raw symbols SCIP
1 // Copyright 2018 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file.
4
5 // This file contains testing utilities copied from $GOROOT/src/internal/testenv/testenv.go.
6
7 package gccgoimporterscip-go gomod golang.org/x/tools . `golang.org/x/tools/go/internal/gccgoimporter`/
8
9 import (
10 "runtimescip-go gomod github.com/golang/go/src go1.25.0 runtime/"
11 "testingscip-go gomod github.com/golang/go/src go1.25.0 testing/"
12
13 toolstestenvscip-go gomod golang.org/x/tools . `golang.org/x/tools/internal/testenv`/ "golang.org/x/tools/internal/testenvscip-go gomod golang.org/x/tools . `golang.org/x/tools/internal/testenv`/"
14 )
15
16 // HasExec reports whether the current system can start new processes
17 // using os.StartProcess or (more commonly) exec.Command.
18 func HasExecscip-go gomod golang.org/x/tools . `golang.org/x/tools/go/internal/gccgoimporter`/HasExec().() bool {
19 return toolstestenvscip-go gomod golang.org/x/tools . `golang.org/x/tools/internal/testenv`/.HasExecscip-go gomod golang.org/x/tools . `golang.org/x/tools/internal/testenv`/HasExec().()
20 }
21
22 // MustHaveExec checks that the current system can start new processes
23 // using os.StartProcess or (more commonly) exec.Command.
24 // If not, MustHaveExec calls t.Skip with an explanation.
25 func MustHaveExecscip-go gomod golang.org/x/tools . `golang.org/x/tools/go/internal/gccgoimporter`/MustHaveExec().(t *testingscip-go gomod github.com/golang/go/src go1.25.0 testing/.Tscip-go gomod github.com/golang/go/src go1.25.0 testing/T#) {
26 if !HasExecscip-go gomod golang.org/x/tools . `golang.org/x/tools/go/internal/gccgoimporter`/HasExec().() {
27 t.Skipfscip-go gomod github.com/golang/go/src go1.25.0 testing/common#Skipf().("skipping test: cannot exec subprocess on %s/%s", runtimescip-go gomod github.com/golang/go/src go1.25.0 runtime/.GOOSscip-go gomod github.com/golang/go/src go1.25.0 runtime/GOOS., runtimescip-go gomod github.com/golang/go/src go1.25.0 runtime/.GOARCHscip-go gomod github.com/golang/go/src go1.25.0 runtime/GOARCH.)
28 }
29 }
30
31 var testenvscip-go gomod golang.org/x/tools . `golang.org/x/tools/go/internal/gccgoimporter`/testenv. = struct {
32 MustHaveExecscip-go gomod golang.org/x/tools . `golang.org/x/tools/go/internal/gccgoimporter`/testenv:MustHaveExec. func(*testingscip-go gomod github.com/golang/go/src go1.25.0 testing/.Tscip-go gomod github.com/golang/go/src go1.25.0 testing/T#)
33 }{
34 MustHaveExecscip-go gomod golang.org/x/tools . `golang.org/x/tools/go/internal/gccgoimporter`/testenv:MustHaveExec.: MustHaveExecscip-go gomod golang.org/x/tools . `golang.org/x/tools/go/internal/gccgoimporter`/MustHaveExec().,
35 }