-
Notifications
You must be signed in to change notification settings - Fork 38.7k
test: avoid os-dependant path #18952
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
Conversation
The current code fails on windows because of the forward slashes; using os.path.join solves the problem and it is in general more robust
|
@sipsorcery want to take a look here & confirm the fix for windows? |
|
Hmm Windows should typically be able to deal with |
|
Jup, I don't think this is a bug fix. We've been running the functional tests on windows just fine. |
|
FWIW, In the future if we really want to be have the slashes agnostic, we can use |
|
I like using |
|
I can verify that the current It's hard to see where it could ever become a problem since modern day Windows accepts The command below works fine on my Windows 10 machine:
|
|
I import the test suite code in another project to automate regtest testing: when looking for the bitcoind binary on a Windows 10 machine, Python 3.8.2, no WSL, the original code fails. |
|
ACK 8a22fd0 |
8a22fd0 avoided os-dependant path (Ferdinando M. Ametrano) Pull request description: The current code fails on windows because of the forward slashes; using os.path.join solves the problem and it is in general more robust ACKs for top commit: MarcoFalke: ACK 8a22fd0 Tree-SHA512: 813f27aea33f97c8afac52e716a55fc5d7fb69621023aba99d40df7e1d145e0ec8d1eee49ddd403b219bf0e0e168e0e987b05c78eaef611f744d99bf2fc8bc91
Summary: using os.path.join is in general more robust than using string with forward slashes This is a backport of Core [[bitcoin/bitcoin#18952 | PR18952]] Test Plan: `ninja check-functional` Reviewers: #bitcoin_abc, Fabien Reviewed By: #bitcoin_abc, Fabien Differential Revision: https://reviews.bitcoinabc.org/D9119
The current code fails on windows because of the forward slashes; using os.path.join solves the problem and it is in general more robust