-
Notifications
You must be signed in to change notification settings - Fork 43
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
Windows Unit Tests All Fixed (fix #402) #404
Conversation
@advayDev1 - ignore for now, still in progress |
c74d3ef
to
01bbd50
Compare
c54d6e7
to
948d20e
Compare
@advayDev1 and @gocursor - I've gone through and fixed up all the unit tests on Windows. A small number (~4) were disabled with TODOs. This was complicated by not having a Windows machine ;-). @cursor, if you could look at trying to fix some of the disabled Windows tasks marked with TODOs, that would be helpful, in particular it needs a substitute for running 'echo' on the command line. @advayDev1 - I still have one weird failure locally but it doesn't happen on the build bots. Very happy to see this all working: |
@@ -99,6 +135,29 @@ class Utils { | |||
} | |||
} | |||
|
|||
// Same as File.separator but can mocked using fakeOSName |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/mocked/faked/ below as well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
Awesome - really nice work! Can you add to CONTRIBUTING.md style guide the canonical way to construct a file paths such that they work across platforms and across fakes OSes? I see sometimes you using new File(parent, child).absolutePath and sometime concating with the Utils separator. |
18e5b2a
to
9068d90
Compare
@advayDev1 - PTAL, this is all fixed up, including the local failure that @gocursor also saw. It should be ready for a LGTM now. |
// https://github.com/j2objc-contrib/j2objc-gradle/issues/422 | ||
String executableCmd = 'echo' | ||
if (Utils.isWindowsNoFake()) { | ||
// executableCmd = '????' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks like your new echo solution is needed here too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point. Fixed that up too.
LGTM. see 1 comment in the code and also please respond to my comment above:
|
4ffc6ee
to
ab9fdc4
Compare
I'll add the section to CONTRIBUTING in my next PR. Just waiting on builds and then I'll merge. |
sg |
Major: - Fix j2objc-contrib#402 - Windows 37 unit tests failures - Fix j2objc-contrib#422 - echo command fails on Windows - Disabled only failing test on Windows: j2objc-contrib#374 Minor: - Fake OS specific file and path separators - Explicit setFakeOS methods, e.g. setFakeOSWindows() - Default to using native OS rather than fake OS for most unit tests - Small number of unit tests use fakeOSName - ‘inTestMustFakeOS’ setting removed
Windows Unit Tests All Fixed (fix #402)
Major:
Minor: