-
-
Notifications
You must be signed in to change notification settings - Fork 641
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
After updating from v1.16 to v2.9, JUnit report fails with "open <file>: no such file or directory" #1210
Comments
Based on what I'm seeing in issues, it seems the semantics of these flags changed and it's not clear to me how to get the same result we had before where the report file was generated inside a folder that is next to our test binary. The ginkgo CLI allows specifying the output-dir, but this flag isn't present when running ginkgo tests with Is it still possible to do this? If not, what is the suggested workflow here? |
hey @nathanperkins ordinarily I'd say "use the If you want even more control while you're debugging this you can drop the var _ = ReportAfterSuite("junit", func(report Report) {
reporters.GenerateJUnitReport(report, "/path/to/report.xml")
}) that'll give you a bit more control over how/when the In general, I do recommend using the |
@onsi thank you for the quick and detailed response! Based on your comment, I looked into this more deeply. I found that my I see some relevant discussion here: #554 that implies v2 should recreate this folder. Maybe this only happens if you run with the |
yes it only happens if you run with the cli (and the only folder created is the one passed in to |
@onsi, that sounds great. Can you assign this issue to me? |
sweet, thanks! |
- Add os.MkdirAll(dst) before any os.Create(dst) calls within the reporters/ folder. - Fix onsi#1210, where the report file fails to create because the parent directory doesn't exist.
We are upgrading from ginkgo
v1.16.5
tov2.9.5
and it seems that the junit report broke in the process. Now our tests are all failing during the report outputs by saying no such file or directory exists.Script:
Output:
In one of my test runs, I added
ls -la
to ensure thetest_outputs
folder is created before running:The test binary is compiled by our CI and sent to the system under test.
The text was updated successfully, but these errors were encountered: