modified version of jenkins debian glue (https://github.com/mika/jenkins-debian-glue) for devuan
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

41 lines
1.1 KiB

  1. #!/bin/sh
  2. # Copyright 2013 Michael Prokop <mika@debian.org>
  3. # Copyright 2012 Christoph Berg <myon@debian.org>
  4. # Licensed under the terms of the MIT License.
  5. set -ex
  6. cd /tmp/buildd/*/debian/..
  7. if [ ! -f debian/tests/control ]; then
  8. echo "Package does not have autopkgtest support, debian/tests/control is missing"
  9. exit 0
  10. fi
  11. if [ ! -f debian/files ]; then
  12. echo "Package source is not built, debian/files is missing" >&2
  13. exit 1
  14. fi
  15. set -- /tmp/adt-*/
  16. TMPADT="$1"
  17. if [ ! -d "$TMPADT" ]; then
  18. echo "Didn't find any /tmp/adt-*/ directory. It should have been created before invoking cowbuilder." >&2
  19. ls -la /tmp
  20. exit 1
  21. fi
  22. # runner/adt-run uses apt-utils's apt-ftparchive and
  23. # pbuilder's pbuilder-satisfydepends-classic
  24. apt-get install -y autopkgtest apt-utils pbuilder
  25. mkdir -p "$TMPADT/out"
  26. binaries=$(awk '/\.deb / { print "--binary ../" $1 }' debian/files)
  27. adt-run --tmp-dir $TMPADT/out --summary $TMPADT/summary \
  28. $binaries --built-tree $PWD --- adt-virt-null || EXIT=$?
  29. # 4 means some test failed, exit 0 here and let adtsummary2junit report the failure
  30. [ ${EXIT:-0} = 4 ] && exit 0
  31. exit ${EXIT:-0}