X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=tests%2Flib;h=bd83be70a69d930a54af356a763c4ad2071718e0;hb=dccb73b082268949abbc074e9fe89d6ec294fd15;hp=7b7bcfbaafecb5f5778a44fecb71f263a7abd72d;hpb=7e3d4487708d076a6cdc26d3bdd2f6b95d2dbdfc;p=dgit.git diff --git a/tests/lib b/tests/lib index 7b7bcfba..bd83be70 100644 --- a/tests/lib +++ b/tests/lib @@ -62,6 +62,8 @@ incoming = $tmp/incoming run_dinstall = 0 END +: ${tagpfx:=test-dummy} + t-git-next-date () { GIT_COMMITTER_DATE="$(( ${GIT_COMMITTER_DATE%% *} + 1 )) ${GIT_COMMITTER_DATE#* }" GIT_AUTHOR_DATE="$GIT_COMMITTER_DATE" @@ -251,7 +253,8 @@ t-archive-updated () { "filename" => "$4", }; END { - print to_json \@v or die $!; + my $json = JSON->new->canonical(); + print $json->encode(\@v) or die $!; } ' } @@ -427,7 +430,7 @@ t-refs-notexist () { } t-v-tag () { - echo refs/tags/test-dummy/${v//\~/_} + echo refs/tags/$tagpfx/${v//\~/_} } t-check-pushed-master () { @@ -591,6 +594,7 @@ t-drs () { t-git-config dgit-distro.test-dummy.git-url "ext::$troot/drs-git-ext %S " t-git-config dgit-distro.test-dummy.git-check true t-git-config dgit-distro.test-dummy.git-create true + t-git-config dgit-distro.test-dummy.dgit-tag-format old,new cp $troot/gnupg/{dd.gpg,dm.gpg,dm.txt} $tmp/. cp $troot/suites $tmp/. cp $troot/suites $tmp/suites-master @@ -612,6 +616,14 @@ t-drs () { ln -sf /bin/true $drs_dispatch/policy-hook } +t-newtag () { + export tagpfx=archive/test-dummy + t-git-config dgit-distro.test-dummy.dgit-tag-format new +} +t-oldtag () { + t-git-config dgit-distro.test-dummy.dgit-tag-format old +} + t-dsd () { t-drs t-git-config dgit-distro.test-dummy.ssh "$troot/dsd-ssh"