-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
test failures on macOS 10.12 #1415
Comments
That's... |
We already have an issue open for OS X See also http://stackoverflow.com/questions/31984002/why-does-strptime-behave-differently-on-osx-and-on-linux. The OS X man page for I don't think I'll be fixing this anytime soon, though I'll probably paper this over in the test. |
Ahhh, right, |
@chdiza I've pushed an attempt to fix this. Can you please test. |
@nicowilliams Thanks. I tested it and I still get the same test failure, with the same |
@nicowilliams Getting closer, at least! The same test fails, but this time the
|
Hopefully that's an easy fix. If not, instead of spending even more time on this it'd be just fine with me if this particular test is simply skipped on macOS. |
@chdiza Yeah, maybe. Can you show us the output of this:
I mean, the test log implies it output nothing. But I'm curious if there were any errors. |
The output is:
|
c538237 breaks 1st test of optional.test on macos
It's Thursday, correctly. |
OS X (and *BSD) strptime() does not set tm_wday nor tm_yday unless corresponding format options are used. That means we must call timegm() to set them.
strptime() on OS X and *BSDs (reputedly) does not set tm_wday and tm_yday unless corresponding %U and %j format specifiers were used. That can be... surprising when one parsed year, month, and day anyways. Glibc's strptime() conveniently sets tm_wday and tm_yday in those cases, but OS X's does not, ignoring them completely. This commit makes jq compute those where possible, though the day of week computation may be wrong for dates before 1900-03-01 or after 2099-12-31.
When trying to build from master on 10.12.4, I get the following test failure: https://gist.github.com/chdiza/762c86adaf40bfef2bdd889485eaa547
The test-suite.log is here: https://gist.github.com/chdiza/a28e34301fe058b8759ce092a525a704
This happens whether or not I build against the enclosed oniguruma.
The text was updated successfully, but these errors were encountered: