summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Maw <richard.maw@codethink.co.uk>2015-10-28 17:02:28 +0000
committerRichard Maw <richard.maw@codethink.co.uk>2015-10-28 17:07:48 +0000
commitc15bbd9c01f18fa4ff57eeb0879048b8c1375d48 (patch)
tree2e9d0c0cc75ddda1a1777942024f6368011ffb6e
parent657e73bf43b93bbd966ad7397154b1b8b6d7829f (diff)
downloadgitano-c15bbd9c01f18fa4ff57eeb0879048b8c1375d48.tar.bz2
tests: add gitarchive subcommand to GTT and yarn implementation
-rw-r--r--testing/gitano-test-tool.in7
-rw-r--r--testing/library.yarn4
2 files changed, 11 insertions, 0 deletions
diff --git a/testing/gitano-test-tool.in b/testing/gitano-test-tool.in
index 822460d..3fc6599 100644
--- a/testing/gitano-test-tool.in
+++ b/testing/gitano-test-tool.in
@@ -163,6 +163,13 @@ function cmd_cloneexists(user, localname)
}
end
+function cmd_gitarchive(user, key, repo, ref)
+ local exturl = generate_exturl(user, key, repo)
+ run_program {
+ "git", "archive", "--remote", exturl, ref,
+ }
+end
+
function cmd_pubkeyfilename(user, key)
print(ssh_key_file(user, key) .. ".pub")
end
diff --git a/testing/library.yarn b/testing/library.yarn
index 89e8da1..997db7e 100644
--- a/testing/library.yarn
+++ b/testing/library.yarn
@@ -64,6 +64,10 @@ Clone manipulation
cd "$($GTT clonelocation $MATCH_1 "$MATCH_2")"
if test -r "$MATCH_3"; then false; else true; fi
+ IMPLEMENTS WHEN ([a-z][a-z0-9]*) ([a-z][a-z0-9]*) uses git archive to extract the tree of ([a-z][a-z0-9-]*) ([a-z][a-z0-9]*) to ([a-z][a-z0-9]*)
+ mkdir -p "$DATADIR/$MATCH_5"
+ $GTT gitarchive $MATCH_1 $MATCH_2 $MATCH_3 $MATCH_4 | tar -C "$DATADIR/$MATCH_5" -x
+
Admin repo manipulation
-----------------------