dh_auto_test failed because of changing dir
Hi,
My Go code builds fine under travis-ci
https://travis-ci.org/go-easygen/easygen/builds/407328951?utm_source=github_status&utm_medium=notification
I.e.,
- - - - - - - - - - - - - - - -- - - - - - - -- - - - - - - -- - - - -
- - -- - - - - - - -
$ go test -v ./...
=== RUN TestStringManipulation
--- PASS: TestStringManipulation (0.00s)
=== RUN ExampleProcess0_list0StrTemplate
--- PASS: ExampleProcess0_list0StrTemplate (0.00s)
- - - - - - - - - - - - - - - -- - - - - - - -- - - - - - - -- - - - -
- - -- - - - - - - -
However, when I'm building it (with gbp buildpackage) within my
packaging process, `dh_auto_test` failed, and I think it's because
`dh_auto_test` change dir from my default code place first:
- - - - - - - - - - - - - - - -- - - - - - - -- - - - - - - -- - - - -
- - -- - - - - - - -
github.com/go-easygen/easygen
github.com/go-easygen/easygen/egVar
github.com/go-easygen/easygen/egCal
github.com/go-easygen/easygen/cmd/easygen
dh_auto_test -O--buildsystem=golang
cd obj-x86_64-linux-gnu && go test -vet=off -v -p 2
github.com/go-easygen/easygen
github.com/go-easygen/easygen/cmd/easygen
github.com/go-easygen/easygen/egCal
github.com/go-easygen/easygen/egVar
=== RUN TestStringManipulation
[easygen] Fatal error - DataFile 'test/strings' cannot be found
FAIL github.com/go-easygen/easygen 0.004s
- - - - - - - - - - - - - - - -- - - - - - - -- - - - - - - -- - - - -
- - -- - - - - - - -
How to fix it?
Here is my debian/rules file BTW:
- - - - - - - - - - - - - - - -- - - - - - - -- - - - - - - -- - - - -
- - -- - - - - - - -
#!/usr/bin/make -f
BINPKG := easygen
LIBPKG := golang-github-go-easygen-easygen-dev
override_dh_auto_install:
dh_auto_install # -- --no-source
dh_install -p$(BINPKG) usr/bin/easygen
dh_install -p$(LIBPKG) usr/share/gocode
%:
dh $@ --buildsystem=golang --with=golang
- - - - - - - - - - - - - - - -- - - - - - - -- - - - - - - -- - - - -
- - -- - - - - - - -
thx!
Reply to: