diff options
author | Lars Wirzenius <liw@liw.fi> | 2015-10-04 18:27:17 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2015-10-05 21:18:08 +0300 |
commit | bab8f1a382e65ffec583bda5642b43091ecaa3a3 (patch) | |
tree | bfc9cdbb91c7d284ddd1f8bddac72c381fd40602 /doc | |
parent | 62efe176f85db8e33f61b8e6c2680de79ee10b78 (diff) | |
download | ick-bab8f1a382e65ffec583bda5642b43091ecaa3a3.tar.gz |
Use ttystatus progress reporting to terminal
This started as a bug fix for build logs: each build log would contain
the log for all later builds as well, because of a silly bug. However,
as I was fixing that, I realised that I don't particularly want to
flood stdout with build logs. I'd rather have sensible progress
reporting. Thus, this commit changes things so that ttystatus is used
for progress reporting to the terminal, and each build's log (and only
that build's log) is written to the build's directory.
This requires a new version of ttystatus that supports multiline
output.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/040-simple.yarn | 4 | ||||
-rw-r--r-- | doc/900-implements.yarn | 26 |
2 files changed, 19 insertions, 11 deletions
diff --git a/doc/040-simple.yarn b/doc/040-simple.yarn index 4fde182..2414db6 100644 --- a/doc/040-simple.yarn +++ b/doc/040-simple.yarn @@ -58,13 +58,13 @@ Then we run Ick and check that the output contains the output of the build command. WHEN user runs ick KITTEN.ick - THEN ick output contains "BUILDING FOO" + THEN ick build log for FOO in KITTEN.state contains "BUILDING FOO" If we now run Ick again, it shouldn't do anything, since nothing in the git repository has changed. WHEN user runs ick KITTEN.ick - THEN ick output doesn't contain "BUILDING FOO" + THEN ick build log for FOO in KITTEN.state doesn't contain "BUILDING FOO" There we go. That's all you should need to know to run builds and build-time tests for a simple project. This doesn't produce Debian diff --git a/doc/900-implements.yarn b/doc/900-implements.yarn index 8c2b616..68de27f 100644 --- a/doc/900-implements.yarn +++ b/doc/900-implements.yarn @@ -65,15 +65,23 @@ Run ick, capturing its output for later inspection. We run ick in Inspect the captured output of the latest ick file. - IMPLEMENTS THEN ick output contains "(.+)" - cat "$DATADIR/ick.stdout" - cat "$DATADIR/ick.stderr" - grep "$MATCH_1" "$DATADIR/ick.stdout" - - IMPLEMENTS THEN ick output doesn't contain "(.+)" - cat "$DATADIR/ick.stdout" - cat "$DATADIR/ick.stderr" - ! grep "$MATCH_1" "$DATADIR/ick.stdout" + IMPLEMENTS THEN ick build log for (.+) in (.+) contains "(.+)" + export PROJECT="$MATCH_1" + export STATE="$MATCH_2" + export PATTERN="$MATCH_3" + builds="$DATADIR/$STATE/$PROJECT/builds" + build_log="$(ls "$builds"/*/build.log | tail -n1)" + cat "$build_log" + grep "$PATTERN" "$build_log" + + IMPLEMENTS THEN ick build log for (.+) in (.+) doesn't contain "(.+)" + export PROJECT="$MATCH_1" + export STATE="$MATCH_2" + export PATTERN="$MATCH_3" + builds="$DATADIR/$STATE/$PROJECT/builds" + build_log="$(ls "$builds"/*/build.log | tail -n1)" + cat "$build_log" + ! grep "$PATTERN" "$build_log" ## Creating a git repository |