(args []string)
| 121 | } |
| 122 | |
| 123 | func (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 | |
| 160 | func (c *testCmd) runPrecommitHook() error { |
| 161 | cmdBin, err := osutil.LookPathGopath("devcam") |
no test coverage detected