summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Maw <richard.maw@codethink.co.uk>2015-10-28 17:14:13 +0000
committerDaniel Silverstone <dsilvers@digital-scurf.org>2015-10-30 18:59:04 +0100
commit9700084c22f44b0f7e02bde411493e8f1a1a69d4 (patch)
tree3def0e409705ca8ce540fa5cdf7d9d61ef35ed82
parentc5045a3010a1fe91b859df0e76f643fbd514dee1 (diff)
downloadgitano-9700084c22f44b0f7e02bde411493e8f1a1a69d4.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 3f57a26..edd659b 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
-----------------------