#26 Handle tests outside packages correctly.
Merged a month ago by qulogic. Opened 5 months ago by qulogic.
qulogic/golist fix-xtest  into  master

file modified
+7 -1

@@ -240,6 +240,11 @@ 

  					data.Tests[pkgName] = append(data.Tests[pkgName], item)

  				}

  			}

+ 			for _, item := range pkgInfo.XTestImports {

+ 				if is, _ := p.isStandard(item); !is {

+ 					data.Tests[pkgName] = append(data.Tests[pkgName], item)

+ 				}

+ 			}

  		}

  	}

  

@@ -297,9 +302,10 @@ 

  	for _, info := range p.packageInfos {

  		var pkgImports []string

  		if testsOnly {

- 			pkgImports = info.TestImports

+ 			pkgImports = append(info.TestImports, info.XTestImports...)

  		} else if withTests {

  			pkgImports = append(info.Imports, info.TestImports...)

+ 			pkgImports = append(pkgImports, info.XTestImports...)

  		} else {

  			pkgImports = info.Imports

  		}

no initial comment

This will add additional test dependencies for:

  • bazil.org/fuse
  • github.com/Masterminds/semver
  • github.com/boltdb/bolt
  • github.com/cosmos72/gomacro
  • github.com/denisenkom/go-mssqldb
  • github.com/gofrs/flock
  • github.com/google/go-github
  • github.com/keybase/go-crypto
  • github.com/klauspost/compress
  • github.com/klauspost/crc32
  • github.com/mdlayher/netlink
  • github.com/onsi/ginkgo
  • github.com/pierrec/lz4
  • go4.org
  • golang.org/x/build
  • golang.org/x/image
  • google.golang.org/grpc

but 90% are self-referential, and would be skipped by --skip-self. 90% of the remaining are to the standard library too, so not of any real effect.

I will try to check the remaining ones.

I actually had a quite outdated list of packages to check and there are many more that are affected (though still 90% self-references). I set up a copr to do a test rebuild with this change, so we'll see soon whether there's any issues.

Everything that was affected was rebuilt in this copr, and while there were several failures, none of them are new (or not timeouts).

Pull-Request has been merged by qulogic

a month ago

Yeah I'm slowly working my way through the FTBFS, will probably need some help with reviews for new dep.

Metadata