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
333 334 335 336 337 338 |
# File 'lib/hot_cell/test_operations.rb', line 333 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 |