MCPcopy
hub / github.com/perkeep/perkeep / runTests

Method runTests

dev/devcam/test.go:123–158  ·  view source on GitHub ↗
(args []string)

Source from the content-addressed store, hash-verified

121}
122
123func (c *testCmd) runTests(args []string) error {
124 targs := []string{"test"}
125 if c.sqlite {
126 targs = append(targs, "--tags=with_sqlite fake_android libsqlite3")
127 } else {
128 targs = append(targs, "--tags=fake_android")
129 }
130 if c.short {
131 targs = append(targs, "-short")
132 }
133 if c.race {
134 targs = append(targs, "-race")
135 }
136 if c.verbose {
137 targs = append(targs, "-v")
138 }
139 if c.run != "" {
140 targs = append(targs, "-run="+c.run)
141 }
142 if len(args) > 0 {
143 targs = append(targs, args...)
144 } else {
145 targs = append(targs, []string{
146 "./internal/...",
147 "./pkg/...",
148 "./server/perkeepd",
149 "./cmd/...",
150 "./app/publisher/...",
151 "./misc/docker/...",
152 "./website/pk-web",
153 }...)
154 }
155 env := c.env()
156 env.Set("SKIP_DEP_TESTS", "1")
157 return runExec("go", targs, env)
158}
159
160func (c *testCmd) runPrecommitHook() error {
161 cmdBin, err := osutil.LookPathGopath("devcam")

Callers 1

RunCommandMethod · 0.95

Calls 3

envMethod · 0.95
runExecFunction · 0.70
SetMethod · 0.65

Tested by

no test coverage detected