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

Failed to compile ginkgo-arch-specs: output file ".../ginkgo-arch-specs.test" could not be found #495

Closed
BooleanCat opened this issue Jul 2, 2018 · 4 comments
Labels
v2 Issues that will be resolved by v2

Comments

@BooleanCat
Copy link
Contributor

BooleanCat commented Jul 2, 2018

Ginkgo fails to compile suites that have no specs for an architecture when there are specs for other architectures.

Reproduction

Consider this project: https://github.com/BooleanCat/ginkgo-arch-specs

There is a package ginkgo_arch_specs.go, which is tested by:

ginkgo_arch_specs_linux_test.go
ginkgo_arch_specs_suite_linux_test.go

If I ginkgo run . this package from an archecture other than linux (I reproduced this with Darwin), then I see:

± tg |master ✓| → ginkgo .
?       github.com/BooleanCat/ginkgo-arch-specs [no test files]

?       github.com/BooleanCat/ginkgo-arch-specs [no test files]

?       github.com/BooleanCat/ginkgo-arch-specs [no test files]

?       github.com/BooleanCat/ginkgo-arch-specs [no test files]

?       github.com/BooleanCat/ginkgo-arch-specs [no test files]

?       github.com/BooleanCat/ginkgo-arch-specs [no test files]

Failed to compile ginkgo-arch-specs: output file "/var/folders/fl/67s579h57hj7r4bpl6zyt29w0000gn/T/ginkgo203116881/ginkgo-arch-specs.test" could not be found
Ginkgo ran 1 suite in 814.993584ms
Test Suite Failed

Expectation

I would expect ginkgo to succeed, running 0 specs on Darwin. On Linux, it should run the linux specs.

Notes

This block of code in Ginkgo considers no files existing after a successful go build of the test files to be an error - I don't have contest on why.

@BooleanCat BooleanCat changed the title Failed to compile ginkgo-arch-specs: output file "/var/folders/fl/67s579h57hj7r4bpl6zyt29w0000gn/T/ginkgo203116881/ginkgo-arch-specs.test" could not be found Failed to compile ginkgo-arch-specs: output file ".../ginkgo-arch-specs.test" could not be found Jul 2, 2018
@BooleanCat
Copy link
Contributor Author

BooleanCat commented Jul 2, 2018

Note that if we add an empty test file ginkgo_arch_specs_test.go, this resolves the immedate issue but l leaves artifacts in C:\Windows\Temp. Eventually our Windows CI machine will have so much stuff in its temp dir that it refuses to write anything else to it because of weird Windows fragmentation limitations. (https://garden.ci.cf-app.com/teams/main/pipelines/main/jobs/groot-windows-periodic/builds/874).

This should likely be another issue that I can raise separately if you care.

@nodo
Copy link
Collaborator

nodo commented Jul 4, 2018

Interesting @BooleanCat! thanks for raising that.

FWITW It think the behaviour of ginkgo it's a bit similar to go test:

$ go test
?   	github.com/nodo/ginkgo-arch-specs	[no test files]

@BooleanCat
Copy link
Contributor Author

It seems that the result of invoking ginkgo for my example suite is an exit code of -1 - a failure. Running go test in the same package results in an exit code of 0 - success.

@onsi
Copy link
Owner

onsi commented Apr 5, 2021

I'm working through the backlog of old Ginkgo issues - apologies as this issue is probably stale now.

I'll add this to the v2 backlog that's under active development. I agree that this should not result in ginkgo marking the test as failed. The cruft accumulating in /tmp should have been solved a few months ago.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v2 Issues that will be resolved by v2
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants