chiark / gitweb /
test suite: Add library function t-push-was-source-only
[dgit.git] / tests / lib
index fcc2a69766e73b34a32b8ba0cdd1112893c1775f..e4554e373f9fddef37c7cd0f302e98989e643fd1 100644 (file)
--- a/tests/lib
+++ b/tests/lib
@@ -635,6 +635,21 @@ t-check-pushed-master () {
        if [ x$mbase = x$master ]; then fail "failed to ff master"; fi
 }
 
+t-push-was-source-only () {
+        local f
+       t-files-notexist $tmp/incoming/${p}_${v}_*.deb \
+                         $tmp/incoming/${p}_${v}_*.udeb
+       # we permit _source.buildinfo files; see test_changes_source_only()
+       for f in $tmp/incoming/${p}_${v}_*.buildinfo; do
+            if [ -e $f ]; then
+                case "$f" in
+                    *_source.buildinfo) ;;
+                    *) fail "non-source-only file $f exists!" ;;
+                esac
+            fi
+        done
+}
+
 t-pushed-good () {
        local branch=$1
        local suite=${2:-sid}