Error when reading from PTY output

Viewed 168

I have a ruby gem that adds some default rake tasks. I also have some basic integration tests checking the output of rake -T and rake -AT for each of these tasks.

In order to farm out these tasks from some Ruby source code, I chose to use PTY.spawn and captured the stdout and stderr output to streams.

As you might see here on the Travis build:

 Failure/Error: Paint.unpaint(out.read)

 Errno::EIO:
   Input/output error @ io_fread - /dev/pts/1
   # ./spec/spec_helper.rb:184:in `read'
   # ./spec/spec_helper.rb:184:in `run_command'
   # ./spec/rake/test_spec.rb:4:in `block (2 levels) in <top (required)>'

This is one of the first times I've used the Travis CI runner, so I tried manually requiring it to install libreadline too. I've updated bundler, rubygems, and have run this on multiple versions of ruby with the exact same error.

Per the constraints of one of my dependencies, I tested against MRI 2.2, 2.3, and 2.4. All of them failed the same way on travis, but also tried them on my local machine (MacOS) using chruby with no problem.

What am I missing?

0 Answers
Related