Class: HotCell::Fixtures::ReadThroughFd
- Defined in:
- lib/hot_cell/test_operations.rb
Overview
Hands an exec'd tool the input descriptor and has it read the bytes back through /dev/fd, so a test
can prove run_tool's pass: exposes a descriptor to a tool without staging it. Reports whether the
input was copied onto scratch, which must be false.
Constant Summary
Constants inherited from Operation
Instance Method Summary collapse
Methods inherited from Operation
abstract_operation, abstract_operation?, before_fork, before_worker_boot, inherited, limits, operation, operation_name, #run_tool, unreadable
Instance Method Details
#perform(inputs, _outputs) ⇒ Object
311 312 313 314 315 316 |
# File 'lib/hot_cell/test_operations.rb', line 311 def perform(inputs, _outputs) source, = inputs result = run_tool "cat", source.fd_path, pass: [ source.to_io ] { content: result.out, ok: result.ok?, staged: source.staged? } end |