chiark / gitweb /
test suite: lib-gdr: t-some-changes: Honour $2 `dum'
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 22 Jun 2018 16:34:50 +0000 (17:34 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 22 Jun 2018 16:36:18 +0000 (17:36 +0100)
This allows for less thorough but faster test cases.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
tests/lib-gdr

index 9eb7537..7b4f085 100644 (file)
@@ -155,21 +155,34 @@ t-gdr-good () {
 
 t-some-changes () {
        local token=$1
+       local which=${2-dum}
 
        t-git-next-date
 
-       echo >>debian/zorkmid "// debian $token"
-       git add debian/zorkmid
-       git commit -m "DEBIAN add zorkmid ($token)"
+       case "$which" in
+       *d*)
+               echo >>debian/zorkmid "// debian $token"
+               git add debian/zorkmid
+               git commit -m "DEBIAN add zorkmid ($token)"
+               ;;
+       esac
 
-       echo >>src.c "// upstream $token"
-       git commit -a -m "UPSTREAM edit src.c ($token)"
+       case "$which" in
+       *u*)
+               echo >>src.c "// upstream $token"
+               git commit -a -m "UPSTREAM edit src.c ($token)"
+               ;;
+       esac
 
-       for f in debian/zorkmid src.c; do
-               echo "// both! $token" >>$f
-               git add $f
-       done
-       git commit -m "MIXED add both ($token)"
+       case "$which" in
+       *m*)
+               for f in debian/zorkmid src.c; do
+                       echo "// both! $token" >>$f
+                       git add $f
+               done
+               git commit -m "MIXED add both ($token)"
+               ;;
+       esac
 
        t-git-next-date
 }