chiark / gitweb /
git-debrebase: test suite: lib-gdr: introduce t-nmu-upload-3
[dgit.git] / tests / lib-gdr
index d6d33f7851e568ff0bcf64ea1c69dd3d2f872f1c..26afb1d341823b18dea0e0b2f1b453f583a4ff28 100644 (file)
@@ -22,10 +22,13 @@ t-gdr-good () {
 
        git diff --quiet ${beforetag-t.before} -- ':.' ':!debian/patches'
 
-       local etype netype
+       local etype netype bwtip
 
        case $state in
-       laundered)      etype=Upstream  ;;
+       laundered)
+                       etype=Upstream
+                       bwtip=Y:`t-git-debrebase breakwater`
+               ;;
        stitched)       etype=Pseudomerge ;;
        pushed)         etype=AddPatches; netype=Pseudomerge ;;
        esac
@@ -43,6 +46,7 @@ t-gdr-good () {
                expect="$parents"
                enparents=1
                : "$ctype/$cetype" "$parents"
+
                case "$ctype/$cetype" in
                Pseudomerge/SAME)                       ;;
                Packaging/SAME)                         ;;
@@ -58,6 +62,15 @@ t-gdr-good () {
                        ;;
                esac
 
+               case "$ctype/$etype" in
+               Packaging/Upstream|\
+               Changelog/Upstream)
+                       if [ "x$bwtip" != x ]; then
+                               test "$bwtip" = "Y:$cid"
+                               bwtip=''
+                       fi
+               esac
+
                case "$ctype" in
                Pseudomerge)
                        expect=${info#Contributor=}
@@ -104,6 +117,8 @@ t-gdr-good () {
 t-some-changes () {
        local token=$1
 
+       t-git-next-date
+
        echo >>debian/zorkmid "// debian $token"
        git add debian/zorkmid
        git commit -m "DEBIAN add zorkmid ($token)"
@@ -116,6 +131,8 @@ t-some-changes () {
                git add $f
        done
        git commit -m "MIXED add both ($token)"
+
+       t-git-next-date
 }
 
 t-make-new-upstream-tarball () {
@@ -127,3 +144,43 @@ t-make-new-upstream-tarball () {
        ust=example_$uv.orig.tar.gz
        git archive -o ../$ust --prefix=example-2.0/ make-upstream
 }
+
+t-nmu-upload-1 () {
+       # usage:
+       #  v=<full version>
+       #  nmu-upload-1 <nmubranch>
+       #  gbp pq import or perhaps other similar things
+       #  nmu-upload-2
+       #  maybe make some dgit-covertible commits
+       #  nmu-upload-3
+
+       t-git-next-date
+       nmubranch=$1
+       git checkout -f -b $nmubranch
+       t-git-debrebase
+       t-git-debrebase convert-to-gbp
+       t-git-next-date
+       # now we are on a gbp patched-unapplied branch
+}
+
+
+t-nmu-upload-2 () {
+       t-git-next-date
+       t-dch-commit -v $v -m "nmu $nmubranch $v"
+}
+
+t-nmu-upload-3 () {
+       t-dch-commit -r sid
+
+       t-dgit -wgf build-source
+
+       cd ..
+       c=${p}_${v}_source.changes
+       debsign -kBCD22CD83243B79D3DFAC33EA3DBCBC039B13D8A $c
+       dput -c $tmp/dput.cf test-dummy $c
+
+       t-archive-process-incoming sid
+       t-git-next-date
+       cd $p
+       git checkout master
+}