Skip to content
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

Tests don't run on MacOS #47

Open
sirthias opened this issue Feb 20, 2020 · 3 comments
Open

Tests don't run on MacOS #47

sirthias opened this issue Feb 20, 2020 · 3 comments

Comments

@sirthias
Copy link
Contributor

sirthias commented Feb 20, 2020

The socat available via homebrew on the mac doesn't support setting the baudrate via the b115200 flag, which makes all tests fail with an error like this:

parseopts(): unknown option "b115200"

The work around is a s/b115200/ispeed=115200,ospeed=115200/ across the whole codebase (two locations). With that in place everything works nicely.

Probably the tests should test for the current platform and then use either b115200 (Linux) or ispeed=115200,ospeed=115200 (macOS).

@jodersky
Copy link
Owner

That's annoying. I'll see if the fix also works on Linux, and if so, change it.

Thanks for bringing this to my attention!

@jodersky
Copy link
Owner

Unfortunately the fix doesn't work on linux. socat doesn't recognize numbers for ispeed and ospeed, but requires prepending a b.

Does s/b115200/ispeed=b115200,ospeed=b115200/ work on a mac? (note the extra b)

@sirthias
Copy link
Contributor Author

Nope, unfortunately it doesn't work.
While it passes the command line parser (just as ispeed=foo,ospeed=bar does!) the values are only really set properly without the b prefix.

(I confirmed with -d -d -d -d where it produces log messages indicating the actual values used. Only when I specify the args as plain numbers they actually get set.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants