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

GO1.11 : go test -o NUL fails on Windows #142

Closed
Pykselle opened this issue Oct 15, 2018 · 2 comments
Closed

GO1.11 : go test -o NUL fails on Windows #142

Pykselle opened this issue Oct 15, 2018 · 2 comments

Comments

@Pykselle
Copy link
Contributor

I put it here for information, in case somebody else encounters this issue :

On Windows and Go1.11, I am not able to launch godog tests with the "godog" command anymore.

This is apparently due to this issue in Go1.11 : golang/go#28035

The error message I get is the following :

$ godog  
failed to compile tested package: qa, reason: exit status 1, output: WORK=C:\Users\CBONNA~1\AppData\Local\Temp\go-build279225422  
go test gitlab.prod.saas.lan/neo/qa.test: build output "C:\\Users\\cbonnafous\\go\\src\\gitlab.prod.saas.lan\\neo\\qa\\NUL" already exists and is not an object file

To bypass this issue, I have to add a TestMain function as explained in the FAQ (https://github.com/DATA-DOG/godog#running-godog-with-go-test), and launch the tests with "go test"

@l3pp4rd
Copy link
Member

l3pp4rd commented Oct 16, 2018

made it like in previous go versions, to generate a file in temp directory. this should now work on windows too

@l3pp4rd l3pp4rd added the P2 label Oct 16, 2018
@Pykselle
Copy link
Contributor Author

Great, thanks !

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

No branches or pull requests

2 participants