Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

0.9.11 TestIniReader fails in go test for out-of-tree build #12

Closed
OdyX opened this issue Aug 23, 2020 · 4 comments · Fixed by #13
Closed

0.9.11 TestIniReader fails in go test for out-of-tree build #12

OdyX opened this issue Aug 23, 2020 · 4 comments · Fixed by #13

Comments

@OdyX
Copy link
Contributor

OdyX commented Aug 23, 2020

Debian builds ipp-usb "out-of-tree", and the inifile_test.go now fails:

   dh_auto_test -O--builddirectory=_build -O--buildsystem=golang
        cd _build && go test -vet=off -v -p 8 github.com/OpenPrinting/ipp-usb
=== RUN   TestIniReader
    inifile_test.go:36: open ipp-usb.conf: no such file or directory
@alexpevzner
Copy link
Member

This is because it does cd _build before running tests. The inifile_test.go needs ipp-usb.conf to perform testing. Is it possible to copy this file into the _build directory before running tests?

@OdyX
Copy link
Contributor Author

OdyX commented Aug 23, 2020

@alexpevzner
Copy link
Member

Very hard to guess what dh_auto_test actually does under the hood.

I've added make test target and tagged result with the 0.9.12 label

Could you please add override_dh_auto_test that runs dh_auto_test without options, or simple calls make test?

@OdyX
Copy link
Contributor Author

OdyX commented Aug 24, 2020

That doesn't work, because it then builds the test files outside of the dh_golang-prepared Go workpsace.

From my limited golang-related research, it seems that putting an ipp-usb.conf in a testdata directory will fix this, I've added this as PR #13.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants