Closed SteffenDE closed 2 years ago
I made it a little easier to see the test match reasons in CI: https://github.com/saleyn/erlexec/runs/7321194951?check_suite_focus=true
This also shows that in CI the output may get broken, so that <<"test\r\n">> may be received as [<<"test">>, <<"\r\n">>], which complicates matching a bit.
I also tried to fix the patter matching in receiving binary data. Please look at the latest. Only PTY tests are failing now in CI.
Yeah my change is probably not needed then; I see the Cmd given as a unicode string
part failing and one in the winsz test. Looking at the winsz test now.
If tput
is still failing, maybe try tput -T xterm lines cols
?
Yeah that is already fixed by putting TERM into the env; only the test with the unicode filename is still reliably failing.
I think the issue with PTY is that it doesn't distinguish between stdout and stderr (this was reported by another user a while back). Consequently, doing DEBUG printout while using pty will fail the tests. Perhaps there is solution to this, but I haven't found.
Yeah, I turned the PORT_DEBUG option off. I thought about adding some kind of IO process that provides a function like gen_tcp
active false mode where one has to manually call recv
with the number of bytes. Currently my tests are flaky as the case of a message longer than expected arriving can cause the order of data to be wrong.
Thank you very much!
Sorry for the back and forth; your check_receive
function combined with the PORT_DEBUG log confused me, therefore I unnecessarily moved back to my receiveBytes
function. One might see that I'm coming from the Elixir world and my Erlang is rather bad, but in the end I moved back to your solution as it works fine.
The only real changes are the macOS pipeline fix, as well as the assertion for the long "test\r\ntest\r\n". Thanks for the patience 😄
Work in progress