summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2015-10-21 20:09:11 +0300
committerLars Wirzenius <liw@liw.fi>2015-10-21 21:14:42 +0300
commit2882e4ec73a92cd1fd17f341bbde022e44bb7798 (patch)
tree44cc537ffdad1a7e42c8d409fe32ed6e046fd245 /doc
parent0db74eacbb9d8aa9fe57fe0d3383fea7f3c58e72 (diff)
downloadick-2882e4ec73a92cd1fd17f341bbde022e44bb7798.tar.gz
Only create build.yaml if actually building
Diffstat (limited to 'doc')
-rw-r--r--doc/040-simple.yarn3
-rw-r--r--doc/900-implements.yarn12
2 files changed, 14 insertions, 1 deletions
diff --git a/doc/040-simple.yarn b/doc/040-simple.yarn
index 2414db6..8c3da6d 100644
--- a/doc/040-simple.yarn
+++ b/doc/040-simple.yarn
@@ -59,12 +59,13 @@ build command.
WHEN user runs ick KITTEN.ick
THEN ick build log for FOO in KITTEN.state contains "BUILDING FOO"
+ AND there is 1 build log for FOO in KITTEN.state
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 build log for FOO in KITTEN.state doesn't contain "BUILDING FOO"
+ THEN there is 1 build log for FOO in KITTEN.state
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 68de27f..a275848 100644
--- a/doc/900-implements.yarn
+++ b/doc/900-implements.yarn
@@ -83,6 +83,18 @@ Inspect the captured output of the latest ick file.
cat "$build_log"
! grep "$PATTERN" "$build_log"
+ IMPLEMENTS THEN there is (\d+) build log(s?) for (.+) in (.+)
+ export COUNT="$MATCH_1"
+ export PROJECT="$MATCH_3"
+ export STATE="$MATCH_4"
+ builds="$DATADIR/$STATE/$PROJECT/builds"
+ export NUM_BUILDS="$(ls "$builds" | wc -l)"
+ if [ "$NUM_BUILDS" != "$COUNT" ]
+ then
+ echo "Expected $COUNT builds, found $NUM_BUILDS" 1>&2
+ exit 1
+ fi
+
## Creating a git repository
We need a git repository with some source code. It should have a