summaryrefslogtreecommitdiff
path: root/tests/scripts/features/output-sync
AgeCommit message (Collapse)AuthorFilesLines
2013-09-21Create a target that tests alternative configurations.Paul Smith1-3/+6
2013-09-21Ensure that output generated while reading makefiles is synced.Paul Smith1-0/+60
2013-09-21Ensure that stderr from shell functions in recipes is synced.Paul Smith1-0/+6
2013-09-14Support the -Orecurse option properly.Paul Smith1-2/+0
In this mode we still collect all the output from a given target and dump it at once. However we don't treat recursive lines any differently from non-recursive lines. Also we don't print enter/leave messages after every dump. However we do ensure that we always print them once to stdout, so the parent make will collect it properly.
2013-09-12Enhance the output sync mode.Paul Smith1-0/+23
Create a new file, output.c, and collect functions that generate output there. We introduce a new global context specifying where output should go (to stdout or to a sync file), and the lowest level output generator chooses where to write output based on that context. This allows us to set the context globally, and all operations that write output (including functions like $(info ...) etc.) will use it. Removed the "--trace=dir" capability. It was too confusing. If you have directory tracking enabled then output sync will print the enter/leave message for each synchronized block. If you don't want that, disable directory tracking.
2013-05-13Add new --trace[=MODE] flags, with --trace=dirPaul Smith1-8/+0
This mode replaces the previous heuristic setting enabled with -O, where we would log directory enter/leave for each synchronized output. Now we only do that if --trace=dir is given.
2013-05-05Rename the -O "job" mode to "line" and "make" to "recurse".Paul Smith1-4/+4
2013-05-05Ensure command lines are written synchronously with -O.Paul Smith1-17/+11
If output-sync is enabled, have make write the command line to the temp file instead of printing it directly to the screen to ensure that the output is ordered properly. Also, remove extraneous enter/leave operations by having them printed directly when dumping temp file output.
2013-05-04Improve sync handling for -Ojob/-Otarget and recursion.Paul Smith1-0/+10
If we are not going to sync a command line then dump any collected output first to preserve ordering. Do some code cleanup: * Move the handle init to a separate function. * Move the temp file truncation to the output function. * Remember whether we sync in a variable for readability. * Handle EINTR and short writes in child_out(). * Always call sync_output() in case output_sync was changed due to error.
2013-04-28Ensure error messages are printed with sync'd output.Paul Smith1-6/+2
Enhance the child_error() function so that it will write error output to the child's sync output buffer, if it exists. If it doesn't the output goes to stdout/stderr.
2013-04-28Small cleanups and fixes.Paul Smith1-5/+5
2013-04-28Add support for per-job output sync.Paul Smith1-15/+96
A new flag to the -O/--output-sync, "job", selects a per-job (that is, per line of a recipe) output synchronization. To support this move the close of the temp file out of the sync_output() function and don't do it until we free the child, since we may call sync_output() multiple times in a given recipe. When we set up for a new temp file, if we're in per-job mode we truncate the file and seek to the beginning to re-use it for every job.
2013-04-15Change the arg option for -O from numeric to string.Paul Smith1-2/+2
2013-04-15Modify output-sync tests to be more reliable.Paul Smith1-25/+63
2013-04-14Rename the "parallel-sync" option to "output-sync".Paul Smith1-0/+133