Thanks for picking that up, review points and pointers ...

On 03.11.2015 09:29, Michael Stapelberg wrote:
>> I’ve noticed the resulting package ships /usr/share/gocode/src/… — is that
>> intentional? Does it make sense to ship the library code, i.e. will other
>> programs use gox as a library? On first glance, it looks like a binary
>> only, but you might be more familiar with gox.

No, there's no reason to keep that. Removed it.

> The package builds and works fine, but for some reason the tests don't run
> through.
> 
>> The only failing test I can see is:
> 
>> === RUN   TestGoVersion
>> --- FAIL: TestGoVersion (0.25s)
>> go_test.go:24: bad: "go1.5.1"
> 
>> This is the code in question:
> 
>> func TestGoVersion(t *testing.T) {
>>     v, err := GoVersion()
>>     if err != nil {
>>         t.Fatalf("err: %s", err)
>>     }
> 
>>     acceptable := []string{"devel", "go1.0", "go1.1", "go1.2"}
>>     found := false
>>     for _, expected := range acceptable {
>>         if strings.HasPrefix(v, expected) {
>>             found = true
>>             break
>>         }
>>     }
> 
>>     if !found {
>>         t.Fatalf("bad: %#v", v)
>>     }
>> }
> 
>> So, the package expects to be compiled with go1.0, go1.1, go1.2, but
>> anything newer is definitely unacceptable…?! Given we have the Go 1
>> stability guarantee (see https://golang.org/doc/go1compat), that test
>> strikes me as not useful.

All right. I've stripped go_test.go via Files-Excluded in deb/copyright from the
upstream release watch gets, and refreshed the tarball within the Git repo.

>> I recommend suggesting upstream to delete the test, and then packaging a
>> new snapshot.

I've seen that upstream has already worked on that:
https://github.com/mitchellh/gox/commit/733261c

Maybe better to switch over to snapshot packaging?

>> We definitely want the other tests to run at package-build time.

Anyway, the tests are running through now.

The changes are in the repo.

Thanks you,
Daniel Stender

-- 
4096R/DF5182C8
46CB 1CA8 9EA3 B743 7676 1DB9 15E0 9AF4 DF51 82C8
LPI certified Linux admin (LPI000329859 64mz6f7kt4)
http://www.danielstender.com/blog/

Reply via email to