commit | d4bd26acfffafb86a9798bd284519c7a205a274e | [log] [tgz] |
---|---|---|
author | Bogdan Caprita <caprita@google.com> | Thu Nov 19 10:50:50 2015 -0800 |
committer | Bogdan Caprita <caprita@google.com> | Thu Nov 19 10:50:50 2015 -0800 |
tree | be201b5122bad03cf85ccdbf55c562e50c35e55c | |
parent | 9699e3a1144d0d5d30e64c848e1b7db70b888e07 [diff] |
jiri/runutil: clarify comments on output handing for sequence and add unit test This change adds a test case to sequence_test to verify the various combinations of stdout/stderr settings (there are three places where one can set these for a given sequence, and each one is handled slightly differently). Informed by the behavior observed in the test, updated the comments on the Sequence to more precisely describe where the output goes. Also fix the comments around Opts() since Opts also applies only to the next Run/Last and not all subsequent Run/Lasts (there's even logic in TestSequenceModifiers to verify this behavior). Note, this CL doesn't change any actual behavior in the Sequence package. However, I think a follow-up CL is due to actually simplify things: for example, I think allowing Opts to specify stdout and stderr is unnecessary and only adds complexity. Vast majority of use cases should be handled by specifying stdout and stderr just once in NewSequence, and then using Capture as needed. Another change that's sensible is to always dump the command's stdout and stderr to the sequence's stdout when in verbose mode or if the command fails, even if Capture is used on the command. Change-Id: Iac8fdf491b659ddf2ab79b593f70757551c6d99c
“Jiri integrates repositories intelligently”
This repository implements the Jiri repository management tool.
For documentation, see http://godoc.org/v.io/jiri