Open yihuaf opened 5 months ago
Looks like test-windows
is broken unrelated to my change. I tried tip of the tree and the test still fails.
=== Failed
=== FAIL: cmd TestE2E_RerunFails/first_run_has_errors,_abort_rerun (0.39s)
main_e2e_test.go:69: assertion failed:
--- expected
+++ actual
@@ -1,6 +1,11 @@
+FAIL testjson/internal/broken
+
+=== Failed
+=== FAIL: testjson/internal/broken
+FAIL gotest.tools/gotestsum/testjson/internal/broken [build failed]
=== Errors
../testjson/internal/broken/broken.go:5:21: undefined: somepackage
-DONE 0 tests, 1 error
+DONE 0 tests, 1 failure, 1 error
@dnephin I was trying to do a PR to update your dependencies but tests are failing locally with the same error posted by @yihuaf
@dnephin Please let me know if there is anything you would like me to follow up :)
@dnephin Let me know if there is anything else you would like me to fix :)
@dnephin Ping again :)
Fix #274
As discussed in #274, when
gotestsum
rerun failed test cases, thecoverprofile
gets overridden by the each calls to the underlyinggo test
, causing coverprofile to per in correct.I tested the code with the repros provided in #274: https://github.com/neiser/gotestsum-rerun-dependent-subtests/tree/master
The code is just a proof of concept. If the general approach is acceptable, then I will go ahead and clean up the PR with necessary unit tests and comments.
The general approach taken in this PR:
coverprofile
flag is discovered, we parse the flag to get the file path.go test
unmodified.