summaryrefslogtreecommitdiff
path: root/tests/setup
diff options
context:
space:
mode:
authorIan Jackson <ijackson@chiark.greenend.org.uk>2016-08-05 20:38:59 +0100
committerIan Jackson <ijackson@chiark.greenend.org.uk>2016-09-05 13:41:48 +0100
commit4148272808e1c37f1077aa6a42e6057378730fa3 (patch)
tree749ba219fe8939c87a8c4d4a965c9907c4d2735e /tests/setup
parent9243bf289e6ece2b20765a6cd850aab4c66f98e8 (diff)
Test suite: examplegit setup script
We are going to have `setup' scripts which explain how to set up the preconditions for one or more tests. This is the first one. Right now it runs to completion, generating its deliverables in $tmp, but then crashes due to the as-yet-unimplemented t-setup-done call. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
Diffstat (limited to 'tests/setup')
-rwxr-xr-xtests/setup/examplegit43
1 files changed, 43 insertions, 0 deletions
diff --git a/tests/setup/examplegit b/tests/setup/examplegit
new file mode 100755
index 0000000..4f0a2f8
--- /dev/null
+++ b/tests/setup/examplegit
@@ -0,0 +1,43 @@
+#!/bin/bash
+set -e
+. tests/lib
+
+suitespecs+=' stable'
+
+t-tstunt-parsechangelog
+
+t-prep-newpackage example 1.0
+
+cd $p
+
+revision=1
+
+push-to () {
+ t-refs-same-start
+ t-ref-head
+ t-dgit build
+ t-dgit push --new $2
+ t-pushed-good $1 $2
+ t-archive-process-incoming $2
+}
+
+echo ancestor >which
+git add which
+t-commit Ancestor '' stable
+push-to master stable
+
+git checkout -b stable
+
+echo stable >which
+git add which
+t-commit Stable '' stable
+push-to stable stable
+
+git checkout master
+
+echo sid >which
+git add which
+t-commit Sid
+push-to master sid
+
+t-setup-done 'p v suitespecs revision' "aq git incoming $p"