[DRE-commits] [pkg-ruby-extras] 01/02: build-and-upload: allow skipping all tests

Antonio Terceiro terceiro at moszumanska.debian.org
Sun Aug 7 20:13:17 UTC 2016


This is an automated email from the git hooks/post-receive script.

terceiro pushed a commit to branch master
in repository pkg-ruby-extras.

commit a6f39a6a1f60862102798e83d9ec8f895ec9b2ff
Author: Antonio Terceiro <terceiro at debian.org>
Date:   Sun Aug 7 17:08:45 2016 -0300

    build-and-upload: allow skipping all tests
---
 build-and-upload | 34 +++++++++++++++++++++++++++++++---
 1 file changed, 31 insertions(+), 3 deletions(-)

diff --git a/build-and-upload b/build-and-upload
index c7f69f7..62d0492 100755
--- a/build-and-upload
+++ b/build-and-upload
@@ -115,12 +115,26 @@ test_reverse_dependencies() {
   local debs="$(dcmd --deb "$changes")"
   local rdeps="$(chdist apt-cache unstable rdepends $binaries | grep '^\s' | xargs -n 1 chdist bin2src unstable | sort -u)"
   local failed_rdeps=""
+  local do_test=y
   if [ -n "$rdeps" ]; then
     banner "Found reverse dependencies!"
     echo "$rdeps"
     for pkg in $rdeps; do
       if chdist apt-cache unstable showsrc "$pkg" | grep -q ^Testsuite:; then
-        if confirm "Test ${pkg}? [Y/n] " y; then
+        if [ "$do_test" != 'a' ]; then
+          if confirm "Test ${pkg}? [Y/n/a(ll)/s(kip all)] " y; then
+            do_test=y
+          else
+            do_test="$confirm"
+          fi
+        fi
+
+        if [ "$do_test" = 's' ]; then
+          warning "Skipping all remaining tests; please be careful!"
+          break
+        fi
+
+        if [ "$do_test" = 'y' -o "$do_test" = 'a' ]; then
           local rc=0
           adt-run --user debci --apt-upgrade $debs "$pkg" --- lxc --sudo adt-sid-"$arch" || rc=$?
           if [ $rc -ne 0 -a $rc -ne 2 -a $rc -ne 8 ]; then
@@ -168,8 +182,22 @@ test_reverse_build_dependencies() {
 
     local failed_rbdeps=""
 
+    local do_test=y
     for pkg in $rbdeps; do
-      if confirm "Test rebuilding $pkg? [Y/n]" y; then
+      if [ "$do_test" != 'a' ]; then
+        if confirm "Test rebuilding $pkg? [Y/n/a(ll)/s(kip all)]" y; then
+          do_test=y
+        else
+          do_test="$confirm"
+        fi
+      fi
+
+      if [ "$do_test" = 's' ]; then
+        warning "Skipping all remaining rebuild tests; please be careful!"
+        break
+      fi
+
+      if [ "$do_test" = 'y' -o "$do_test" = 'a' ]; then
         if ! test_rebuild "$pkg" $extra_packages; then
           failed_rbdeps="$failed_rbdeps $pkg"
         fi
@@ -191,7 +219,7 @@ test_rebuild() {
   cd "$tmpdir"
   chdist apt-get unstable source "$pkg"
   rc=0
-  sbuild --dist=unstable $@ *.dsc || rc=$?
+  sbuild --arch-all --dist=unstable $@ *.dsc || rc=$?
   cd -
   rm -rf "$tmpdir"
   return "$rc"

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/pkg-ruby-extras.git



More information about the Pkg-ruby-extras-commits mailing list