-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
Only save original working directory if death tests are enabled #3090
Conversation
Seems like the appveyor build timed out on windows. How can I rerun? |
Hi @knutpett, the easiest way is to pretend you touched your commit by executing:
|
e4f31a8
to
f3ec19b
Compare
On a diskless system you cannot get the current directory. So if death tests are disabled anyway, there is no point trying to get current directory. Without this fix, running tests on diskless systems will fail, even when death tests are disabled.
f3ec19b
to
e5686bb
Compare
I keep getting "24 - googletest-param-test-test (Timeout) I've touched the PR twice, but I keeps on failing.... |
My apologies for the failing tests. It's a known issue and we've had trouble resolving it. For now, all that is required is the CLA and Travis. Would you like us to import this PR? We can do additional internal testing, but importing it implies that the PR cannot be updated further. |
@CJ-Johnson Yes, I'm happy with you importing this PR :) |
Thank you for this PR! It has now been imported for internal testing. Please do not make additional changes as they will be overwritten. (341387352) |
Thanks! What happens now? Does this mean that the change likely will be merged? How do I know when/if it is done? Should I close the PR? |
Yes, if the internal testing passes, it will be merged and closed automatically. Please do not close it. :) |
This caused a regression for me in finally updating our patches for winegcc (not submitted yet, trying to upstream the winegcc compiler improvements that enable it into winehq first). UnitTest::GetInstance()->original_working_dir() is documented public API: If there's a need to do something special for diskless systems, seems like they should have a distinct check. |
UnitTest::GetInstance()->original_working_dir() is documented public API: https://github.com/google/googletest/blob/main/docs/reference/testing.md#original_working_dir-unittestoriginal_working_dir and is used for things like UnitTestOptions::GetAbsolutePathToOutputFile. So stubbing it to just return an empty string breaks many other unit tests unnecessarily if you have a filesystem but not death tests If there's a need to do something special for diskless systems, seems like they should have a distinct check. reverts e5686bb google#3090
Thank you for the comment! Do you have a proposed path for addressing the problem? |
I ran in to the same regression, I will propose a fix in the upcoming days. The challenge here is that it is not clear what the original issue was, and I cannot tell if I will reverse the problem back to what it originally was.... |
I undid this change in #3862 #3862 moves this logic to Thus, I think #3862 solves the original problem raised here without causing the side effects observed when |
UnitTest::GetInstance()->original_working_dir() is documented public API: https://github.com/google/googletest/blob/main/docs/reference/testing.md#original_working_dir-unittestoriginal_working_dir and is used for things like UnitTestOptions::GetAbsolutePathToOutputFile. So stubbing it to just return an empty string breaks many other unit tests unnecessarily if you have a filesystem but not death tests If there's a need to do something special for diskless systems, seems like they should have a distinct check. reverts e5686bb google#3090 See google#3869 for discussion This has now been reverted (and refactored) on `main` by google#3682, but the refactoring is more complex than I want to cherry-pick. So we will keep the simple revert for 0.12.1
On a diskless system you cannot get the current directory. So if
death tests are disabled anyway, there is no point trying to
get current directory.
Without this fix, running tests on diskless systems will fail,
even when death tests are disabled.
Solves #3089