Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Print output as it's happening #68

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

bram-perl
Copy link

With the current code it first runs the command (make, test_harness, ...) and
when it's complete it may 'log' all the output on STDOUT/smokecurrent.log.

What I like more is if the output shows when things are happening instead of
needing to wait until the command fully completed.

With this patch that does happen for

  • make
  • make test_harness

I consider this to be WIP because:

  • Should this behavior be configurable?
  • For _run_harness3_target (and others) it uses a pipe and then reads from it. I'm guessing that it should be possible to replace the code with capture (or tee) from Capture::Tiny but I don't know if that is desirable.
  • On Windows some output is now duplicated in the log because stdout of make is already logged (see $make_output in sub make_).
  • This is incomplete: only '_run_harness3_target' was updated but other code has the same structure.
  • It causes the messages (from make, test_harness3) to be logged without timestamp. Before if the output of make was logged (for example on Windows) all messages were logged with the same timestamp. (Ideally each message would have a timestamp of when it happened but that might not be possible with Capture::Tiny)

With the current code it first runs the command (make, test_harness, ...) and
when it's complete it *may* 'log' all the output on STDOUT/smokecurrent.log.

What *I* like more is if the output shows when things are happening instead of
needing to wait until the command fully completed.

With this patch that does happen for
- `make`
- `make test_harness`

I consider this to be WIP because:
	a) Should this behavior be configurable?
	b) For `_run_harness3_target` (and others) it uses a pipe and then
	   reads from it. I'm *guessing* that it should be possible to replace
	   the code with `capture` (or `tee`) from Capture::Tiny but I don't
	   know if that is desirable.
	c) On Windows some output is now duplicated in the log because stdout
	   of `make` is already logged (see `$make_output` in `sub make_`).
	d) This is incomplete: only '_run_harness3_target' was updated but
	   other code has the same structure.
	e) It causes the messages (from make, test_harness3) to be logged
	   without timestamp. Before if the output of make was logged (for
	   example on Windows) all messages were logged with the same timestamp.
	   (Ideally each message would have a timestamp of when it happened but
	    that might not be feasible with Capture::Tiny)
@bram-perl
Copy link
Author

Example of a logfile (on Windows) with these changes: https://perl5.test-smoke.org/logfile/5021750
This (clearly) results in larger log files which I don't know if that is desirable since it will take up more space in the smokedb..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant