| |
@@ -344,14 +344,14 @@
|
| |
var entryPoints []string
|
| |
if testsOnly {
|
| |
for p, pkgInfo := range p.packageInfos {
|
| |
- if len(pkgInfo.TestGoFiles) > 0 {
|
| |
+ if len(pkgInfo.TestGoFiles) > 0 || len(pkgInfo.XTestGoFiles) > 0 {
|
| |
entryPoints = append(entryPoints, p)
|
| |
}
|
| |
}
|
| |
} else {
|
| |
if withTests {
|
| |
for p, pkgInfo := range p.packageInfos {
|
| |
- if len(pkgInfo.TestGoFiles) > 0 {
|
| |
+ if len(pkgInfo.TestGoFiles) > 0 || len(pkgInfo.XTestGoFiles) > 0 {
|
| |
entryPoints = append(entryPoints, p)
|
| |
}
|
| |
}
|
| |
Prior this commit golist with --tests didn't list packages which had only
external tests. E.g. it didn't list package foo if it only had tests in
package foo_test (and not in foo package). This commit fixes this behaviour.