coverage.sh: keep track of executed and skipped tests
This commit is contained in:
parent
04e40eca47
commit
b143e170e2
1 changed files with 192 additions and 0 deletions
192
coverage.sh
192
coverage.sh
|
@ -50,6 +50,8 @@ fi
|
||||||
|
|
||||||
starttime=
|
starttime=
|
||||||
total=122
|
total=122
|
||||||
|
skipped=0
|
||||||
|
runtests=0
|
||||||
i=1
|
i=1
|
||||||
|
|
||||||
print_header() {
|
print_header() {
|
||||||
|
@ -243,10 +245,13 @@ rm -r /tmp/debian-$dist-debootstrap /tmp/debian-$dist-mm
|
||||||
END
|
END
|
||||||
if [ "$HAVE_QEMU" = "yes" ]; then
|
if [ "$HAVE_QEMU" = "yes" ]; then
|
||||||
./run_qemu.sh
|
./run_qemu.sh
|
||||||
|
runtests=$((runtests+1))
|
||||||
elif [ "$defaultmode" = "root" ]; then
|
elif [ "$defaultmode" = "root" ]; then
|
||||||
./run_null.sh SUDO
|
./run_null.sh SUDO
|
||||||
|
runtests=$((runtests+1))
|
||||||
else
|
else
|
||||||
./run_null.sh
|
./run_null.sh
|
||||||
|
runtests=$((runtests+1))
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
|
@ -260,8 +265,10 @@ $CMD --help | grep --quiet --fixed-strings 'mmdebstrap [OPTION...] [SUITE [TARGE
|
||||||
END
|
END
|
||||||
if [ "$HAVE_QEMU" = "yes" ]; then
|
if [ "$HAVE_QEMU" = "yes" ]; then
|
||||||
./run_qemu.sh
|
./run_qemu.sh
|
||||||
|
runtests=$((runtests+1))
|
||||||
else
|
else
|
||||||
./run_null.sh SUDO
|
./run_null.sh SUDO
|
||||||
|
runtests=$((runtests+1))
|
||||||
fi
|
fi
|
||||||
|
|
||||||
print_header "test --man"
|
print_header "test --man"
|
||||||
|
@ -276,8 +283,10 @@ $CMD --man | grep --fixed-strings 'mmdebstrap [OPTION...] [*SUITE* [*TARGET* [*M
|
||||||
END
|
END
|
||||||
if [ "$HAVE_QEMU" = "yes" ]; then
|
if [ "$HAVE_QEMU" = "yes" ]; then
|
||||||
./run_qemu.sh
|
./run_qemu.sh
|
||||||
|
runtests=$((runtests+1))
|
||||||
else
|
else
|
||||||
./run_null.sh SUDO
|
./run_null.sh SUDO
|
||||||
|
runtests=$((runtests+1))
|
||||||
fi
|
fi
|
||||||
|
|
||||||
print_header "test --version"
|
print_header "test --version"
|
||||||
|
@ -289,8 +298,10 @@ $CMD --version | egrep --quiet '^mmdebstrap [0-9](\.[0-9])+$'
|
||||||
END
|
END
|
||||||
if [ "$HAVE_QEMU" = "yes" ]; then
|
if [ "$HAVE_QEMU" = "yes" ]; then
|
||||||
./run_qemu.sh
|
./run_qemu.sh
|
||||||
|
runtests=$((runtests+1))
|
||||||
else
|
else
|
||||||
./run_null.sh SUDO
|
./run_null.sh SUDO
|
||||||
|
runtests=$((runtests+1))
|
||||||
fi
|
fi
|
||||||
|
|
||||||
print_header "mode=root,variant=apt: create directory"
|
print_header "mode=root,variant=apt: create directory"
|
||||||
|
@ -305,8 +316,10 @@ rm -r /tmp/debian-chroot
|
||||||
END
|
END
|
||||||
if [ "$HAVE_QEMU" = "yes" ]; then
|
if [ "$HAVE_QEMU" = "yes" ]; then
|
||||||
./run_qemu.sh
|
./run_qemu.sh
|
||||||
|
runtests=$((runtests+1))
|
||||||
else
|
else
|
||||||
./run_null.sh SUDO
|
./run_null.sh SUDO
|
||||||
|
runtests=$((runtests+1))
|
||||||
fi
|
fi
|
||||||
|
|
||||||
print_header "mode=unshare,variant=apt: fail with unshare as root user"
|
print_header "mode=unshare,variant=apt: fail with unshare as root user"
|
||||||
|
@ -328,8 +341,10 @@ fi
|
||||||
END
|
END
|
||||||
if [ "$HAVE_QEMU" = "yes" ]; then
|
if [ "$HAVE_QEMU" = "yes" ]; then
|
||||||
./run_qemu.sh
|
./run_qemu.sh
|
||||||
|
runtests=$((runtests+1))
|
||||||
else
|
else
|
||||||
echo "HAVE_QEMU != yes -- Skipping test..." >&2
|
echo "HAVE_QEMU != yes -- Skipping test..." >&2
|
||||||
|
skipped=$((skipped+1))
|
||||||
fi
|
fi
|
||||||
|
|
||||||
print_header "mode=$defaultmode,variant=apt: test progress bars on fake tty"
|
print_header "mode=$defaultmode,variant=apt: test progress bars on fake tty"
|
||||||
|
@ -343,10 +358,13 @@ rm /tmp/debian-chroot.tar
|
||||||
END
|
END
|
||||||
if [ "$HAVE_QEMU" = "yes" ]; then
|
if [ "$HAVE_QEMU" = "yes" ]; then
|
||||||
./run_qemu.sh
|
./run_qemu.sh
|
||||||
|
runtests=$((runtests+1))
|
||||||
elif [ "$defaultmode" = "root" ]; then
|
elif [ "$defaultmode" = "root" ]; then
|
||||||
./run_null.sh SUDO
|
./run_null.sh SUDO
|
||||||
|
runtests=$((runtests+1))
|
||||||
else
|
else
|
||||||
./run_null.sh
|
./run_null.sh
|
||||||
|
runtests=$((runtests+1))
|
||||||
fi
|
fi
|
||||||
|
|
||||||
print_header "mode=$defaultmode,variant=apt: test --debug output on fake tty"
|
print_header "mode=$defaultmode,variant=apt: test --debug output on fake tty"
|
||||||
|
@ -360,10 +378,13 @@ rm /tmp/debian-chroot.tar
|
||||||
END
|
END
|
||||||
if [ "$HAVE_QEMU" = "yes" ]; then
|
if [ "$HAVE_QEMU" = "yes" ]; then
|
||||||
./run_qemu.sh
|
./run_qemu.sh
|
||||||
|
runtests=$((runtests+1))
|
||||||
elif [ "$defaultmode" = "root" ]; then
|
elif [ "$defaultmode" = "root" ]; then
|
||||||
./run_null.sh SUDO
|
./run_null.sh SUDO
|
||||||
|
runtests=$((runtests+1))
|
||||||
else
|
else
|
||||||
./run_null.sh
|
./run_null.sh
|
||||||
|
runtests=$((runtests+1))
|
||||||
fi
|
fi
|
||||||
|
|
||||||
print_header "mode=root,variant=apt: existing empty directory"
|
print_header "mode=root,variant=apt: existing empty directory"
|
||||||
|
@ -378,8 +399,10 @@ rm -r /tmp/debian-chroot
|
||||||
END
|
END
|
||||||
if [ "$HAVE_QEMU" = "yes" ]; then
|
if [ "$HAVE_QEMU" = "yes" ]; then
|
||||||
./run_qemu.sh
|
./run_qemu.sh
|
||||||
|
runtests=$((runtests+1))
|
||||||
else
|
else
|
||||||
./run_null.sh SUDO
|
./run_null.sh SUDO
|
||||||
|
runtests=$((runtests+1))
|
||||||
fi
|
fi
|
||||||
|
|
||||||
print_header "mode=root,variant=apt: existing directory with lost+found"
|
print_header "mode=root,variant=apt: existing directory with lost+found"
|
||||||
|
@ -396,8 +419,10 @@ rm -r /tmp/debian-chroot
|
||||||
END
|
END
|
||||||
if [ "$HAVE_QEMU" = "yes" ]; then
|
if [ "$HAVE_QEMU" = "yes" ]; then
|
||||||
./run_qemu.sh
|
./run_qemu.sh
|
||||||
|
runtests=$((runtests+1))
|
||||||
else
|
else
|
||||||
./run_null.sh SUDO
|
./run_null.sh SUDO
|
||||||
|
runtests=$((runtests+1))
|
||||||
fi
|
fi
|
||||||
|
|
||||||
print_header "mode=$defaultmode,variant=apt: fail installing to non-empty lost+found"
|
print_header "mode=$defaultmode,variant=apt: fail installing to non-empty lost+found"
|
||||||
|
@ -420,10 +445,13 @@ fi
|
||||||
END
|
END
|
||||||
if [ "$HAVE_QEMU" = "yes" ]; then
|
if [ "$HAVE_QEMU" = "yes" ]; then
|
||||||
./run_qemu.sh
|
./run_qemu.sh
|
||||||
|
runtests=$((runtests+1))
|
||||||
elif [ "$defaultmode" = "root" ]; then
|
elif [ "$defaultmode" = "root" ]; then
|
||||||
./run_null.sh SUDO
|
./run_null.sh SUDO
|
||||||
|
runtests=$((runtests+1))
|
||||||
else
|
else
|
||||||
./run_null.sh
|
./run_null.sh
|
||||||
|
runtests=$((runtests+1))
|
||||||
fi
|
fi
|
||||||
|
|
||||||
print_header "mode=$defaultmode,variant=apt: fail installing to non-empty target directory"
|
print_header "mode=$defaultmode,variant=apt: fail installing to non-empty target directory"
|
||||||
|
@ -446,10 +474,13 @@ fi
|
||||||
END
|
END
|
||||||
if [ "$HAVE_QEMU" = "yes" ]; then
|
if [ "$HAVE_QEMU" = "yes" ]; then
|
||||||
./run_qemu.sh
|
./run_qemu.sh
|
||||||
|
runtests=$((runtests+1))
|
||||||
elif [ "$defaultmode" = "root" ]; then
|
elif [ "$defaultmode" = "root" ]; then
|
||||||
./run_null.sh SUDO
|
./run_null.sh SUDO
|
||||||
|
runtests=$((runtests+1))
|
||||||
else
|
else
|
||||||
./run_null.sh
|
./run_null.sh
|
||||||
|
runtests=$((runtests+1))
|
||||||
fi
|
fi
|
||||||
|
|
||||||
print_header "mode=root,variant=apt: chroot directory not accessible by _apt user"
|
print_header "mode=root,variant=apt: chroot directory not accessible by _apt user"
|
||||||
|
@ -465,8 +496,10 @@ rm -r /tmp/debian-chroot
|
||||||
END
|
END
|
||||||
if [ "$HAVE_QEMU" = "yes" ]; then
|
if [ "$HAVE_QEMU" = "yes" ]; then
|
||||||
./run_qemu.sh
|
./run_qemu.sh
|
||||||
|
runtests=$((runtests+1))
|
||||||
else
|
else
|
||||||
./run_null.sh SUDO
|
./run_null.sh SUDO
|
||||||
|
runtests=$((runtests+1))
|
||||||
fi
|
fi
|
||||||
|
|
||||||
print_header "mode=unshare,variant=apt: create gzip compressed tarball"
|
print_header "mode=unshare,variant=apt: create gzip compressed tarball"
|
||||||
|
@ -487,8 +520,10 @@ rm /tmp/debian-chroot.tar.gz
|
||||||
END
|
END
|
||||||
if [ "$HAVE_QEMU" = "yes" ]; then
|
if [ "$HAVE_QEMU" = "yes" ]; then
|
||||||
./run_qemu.sh
|
./run_qemu.sh
|
||||||
|
runtests=$((runtests+1))
|
||||||
else
|
else
|
||||||
echo "HAVE_QEMU != yes -- Skipping test..." >&2
|
echo "HAVE_QEMU != yes -- Skipping test..." >&2
|
||||||
|
skipped=$((skipped+1))
|
||||||
fi
|
fi
|
||||||
|
|
||||||
print_header "mode=$defaultmode,variant=apt: test xz compressed tarball"
|
print_header "mode=$defaultmode,variant=apt: test xz compressed tarball"
|
||||||
|
@ -503,10 +538,13 @@ rm /tmp/debian-chroot.tar.xz
|
||||||
END
|
END
|
||||||
if [ "$HAVE_QEMU" = "yes" ]; then
|
if [ "$HAVE_QEMU" = "yes" ]; then
|
||||||
./run_qemu.sh
|
./run_qemu.sh
|
||||||
|
runtests=$((runtests+1))
|
||||||
elif [ "$defaultmode" = "root" ]; then
|
elif [ "$defaultmode" = "root" ]; then
|
||||||
./run_null.sh SUDO
|
./run_null.sh SUDO
|
||||||
|
runtests=$((runtests+1))
|
||||||
else
|
else
|
||||||
./run_null.sh
|
./run_null.sh
|
||||||
|
runtests=$((runtests+1))
|
||||||
fi
|
fi
|
||||||
|
|
||||||
print_header "mode=auto,variant=apt: test auto-mode without unshare capabilities"
|
print_header "mode=auto,variant=apt: test auto-mode without unshare capabilities"
|
||||||
|
@ -528,8 +566,10 @@ rm /tmp/debian-chroot.tar.gz
|
||||||
END
|
END
|
||||||
if [ "$HAVE_QEMU" = "yes" ]; then
|
if [ "$HAVE_QEMU" = "yes" ]; then
|
||||||
./run_qemu.sh
|
./run_qemu.sh
|
||||||
|
runtests=$((runtests+1))
|
||||||
else
|
else
|
||||||
echo "HAVE_QEMU != yes -- Skipping test..." >&2
|
echo "HAVE_QEMU != yes -- Skipping test..." >&2
|
||||||
|
skipped=$((skipped+1))
|
||||||
fi
|
fi
|
||||||
|
|
||||||
print_header "mode=$defaultmode,variant=apt: fail with missing lz4"
|
print_header "mode=$defaultmode,variant=apt: fail with missing lz4"
|
||||||
|
@ -546,10 +586,13 @@ fi
|
||||||
END
|
END
|
||||||
if [ "$HAVE_QEMU" = "yes" ]; then
|
if [ "$HAVE_QEMU" = "yes" ]; then
|
||||||
./run_qemu.sh
|
./run_qemu.sh
|
||||||
|
runtests=$((runtests+1))
|
||||||
elif [ "$defaultmode" = "root" ]; then
|
elif [ "$defaultmode" = "root" ]; then
|
||||||
./run_null.sh SUDO
|
./run_null.sh SUDO
|
||||||
|
runtests=$((runtests+1))
|
||||||
else
|
else
|
||||||
./run_null.sh
|
./run_null.sh
|
||||||
|
runtests=$((runtests+1))
|
||||||
fi
|
fi
|
||||||
|
|
||||||
print_header "mode=$defaultmode,variant=apt: fail with path with quotes"
|
print_header "mode=$defaultmode,variant=apt: fail with path with quotes"
|
||||||
|
@ -566,10 +609,13 @@ fi
|
||||||
END
|
END
|
||||||
if [ "$HAVE_QEMU" = "yes" ]; then
|
if [ "$HAVE_QEMU" = "yes" ]; then
|
||||||
./run_qemu.sh
|
./run_qemu.sh
|
||||||
|
runtests=$((runtests+1))
|
||||||
elif [ "$defaultmode" = "root" ]; then
|
elif [ "$defaultmode" = "root" ]; then
|
||||||
./run_null.sh SUDO
|
./run_null.sh SUDO
|
||||||
|
runtests=$((runtests+1))
|
||||||
else
|
else
|
||||||
./run_null.sh
|
./run_null.sh
|
||||||
|
runtests=$((runtests+1))
|
||||||
fi
|
fi
|
||||||
|
|
||||||
print_header "mode=root,variant=apt: create tarball with /tmp mounted nodev"
|
print_header "mode=root,variant=apt: create tarball with /tmp mounted nodev"
|
||||||
|
@ -589,8 +635,10 @@ rm /tmp/debian-chroot.tar
|
||||||
END
|
END
|
||||||
if [ "$HAVE_QEMU" = "yes" ]; then
|
if [ "$HAVE_QEMU" = "yes" ]; then
|
||||||
./run_qemu.sh
|
./run_qemu.sh
|
||||||
|
runtests=$((runtests+1))
|
||||||
else
|
else
|
||||||
echo "HAVE_QEMU != yes -- Skipping test..." >&2
|
echo "HAVE_QEMU != yes -- Skipping test..." >&2
|
||||||
|
skipped=$((skipped+1))
|
||||||
fi
|
fi
|
||||||
|
|
||||||
print_header "mode=$defaultmode,variant=apt: read from stdin, write to stdout"
|
print_header "mode=$defaultmode,variant=apt: read from stdin, write to stdout"
|
||||||
|
@ -604,10 +652,13 @@ rm /tmp/debian-chroot.tar
|
||||||
END
|
END
|
||||||
if [ "$HAVE_QEMU" = "yes" ]; then
|
if [ "$HAVE_QEMU" = "yes" ]; then
|
||||||
./run_qemu.sh
|
./run_qemu.sh
|
||||||
|
runtests=$((runtests+1))
|
||||||
elif [ "$defaultmode" = "root" ]; then
|
elif [ "$defaultmode" = "root" ]; then
|
||||||
./run_null.sh SUDO
|
./run_null.sh SUDO
|
||||||
|
runtests=$((runtests+1))
|
||||||
else
|
else
|
||||||
./run_null.sh
|
./run_null.sh
|
||||||
|
runtests=$((runtests+1))
|
||||||
fi
|
fi
|
||||||
|
|
||||||
print_header "mode=$defaultmode,variant=apt: supply components manually"
|
print_header "mode=$defaultmode,variant=apt: supply components manually"
|
||||||
|
@ -622,10 +673,13 @@ rm -r /tmp/debian-chroot
|
||||||
END
|
END
|
||||||
if [ "$HAVE_QEMU" = "yes" ]; then
|
if [ "$HAVE_QEMU" = "yes" ]; then
|
||||||
./run_qemu.sh
|
./run_qemu.sh
|
||||||
|
runtests=$((runtests+1))
|
||||||
elif [ "$defaultmode" = "root" ]; then
|
elif [ "$defaultmode" = "root" ]; then
|
||||||
./run_null.sh SUDO
|
./run_null.sh SUDO
|
||||||
|
runtests=$((runtests+1))
|
||||||
else
|
else
|
||||||
./run_null.sh
|
./run_null.sh
|
||||||
|
runtests=$((runtests+1))
|
||||||
fi
|
fi
|
||||||
|
|
||||||
print_header "mode=root,variant=apt: stable default mirror"
|
print_header "mode=root,variant=apt: stable default mirror"
|
||||||
|
@ -653,8 +707,10 @@ rm -r /tmp/debian-chroot
|
||||||
END
|
END
|
||||||
if [ "$HAVE_QEMU" = "yes" ]; then
|
if [ "$HAVE_QEMU" = "yes" ]; then
|
||||||
./run_qemu.sh
|
./run_qemu.sh
|
||||||
|
runtests=$((runtests+1))
|
||||||
else
|
else
|
||||||
echo "HAVE_QEMU != yes -- Skipping test..." >&2
|
echo "HAVE_QEMU != yes -- Skipping test..." >&2
|
||||||
|
skipped=$((skipped+1))
|
||||||
fi
|
fi
|
||||||
|
|
||||||
print_header "mode=$defaultmode,variant=apt: pass distribution but implicitly write to stdout"
|
print_header "mode=$defaultmode,variant=apt: pass distribution but implicitly write to stdout"
|
||||||
|
@ -673,8 +729,10 @@ rm /tmp/debian-chroot.tar
|
||||||
END
|
END
|
||||||
if [ "$HAVE_QEMU" = "yes" ]; then
|
if [ "$HAVE_QEMU" = "yes" ]; then
|
||||||
./run_qemu.sh
|
./run_qemu.sh
|
||||||
|
runtests=$((runtests+1))
|
||||||
else
|
else
|
||||||
echo "HAVE_QEMU != yes -- Skipping test..." >&2
|
echo "HAVE_QEMU != yes -- Skipping test..." >&2
|
||||||
|
skipped=$((skipped+1))
|
||||||
fi
|
fi
|
||||||
|
|
||||||
print_header "mode=$defaultmode,variant=apt: test aspcud apt solver"
|
print_header "mode=$defaultmode,variant=apt: test aspcud apt solver"
|
||||||
|
@ -693,10 +751,13 @@ rm /tmp/debian-chroot.tar
|
||||||
END
|
END
|
||||||
if [ "$HAVE_QEMU" = "yes" ]; then
|
if [ "$HAVE_QEMU" = "yes" ]; then
|
||||||
./run_qemu.sh
|
./run_qemu.sh
|
||||||
|
runtests=$((runtests+1))
|
||||||
elif [ "$defaultmode" = "root" ]; then
|
elif [ "$defaultmode" = "root" ]; then
|
||||||
./run_null.sh SUDO
|
./run_null.sh SUDO
|
||||||
|
runtests=$((runtests+1))
|
||||||
else
|
else
|
||||||
./run_null.sh
|
./run_null.sh
|
||||||
|
runtests=$((runtests+1))
|
||||||
fi
|
fi
|
||||||
|
|
||||||
print_header "mode=$defaultmode,variant=apt: mirror is -"
|
print_header "mode=$defaultmode,variant=apt: mirror is -"
|
||||||
|
@ -710,10 +771,13 @@ rm /tmp/debian-chroot.tar
|
||||||
END
|
END
|
||||||
if [ "$HAVE_QEMU" = "yes" ]; then
|
if [ "$HAVE_QEMU" = "yes" ]; then
|
||||||
./run_qemu.sh
|
./run_qemu.sh
|
||||||
|
runtests=$((runtests+1))
|
||||||
elif [ "$defaultmode" = "root" ]; then
|
elif [ "$defaultmode" = "root" ]; then
|
||||||
./run_null.sh SUDO
|
./run_null.sh SUDO
|
||||||
|
runtests=$((runtests+1))
|
||||||
else
|
else
|
||||||
./run_null.sh
|
./run_null.sh
|
||||||
|
runtests=$((runtests+1))
|
||||||
fi
|
fi
|
||||||
|
|
||||||
print_header "mode=$defaultmode,variant=apt: copy:// mirror"
|
print_header "mode=$defaultmode,variant=apt: copy:// mirror"
|
||||||
|
@ -731,8 +795,10 @@ rm /tmp/debian-chroot.tar
|
||||||
END
|
END
|
||||||
if [ "$HAVE_QEMU" = "yes" ]; then
|
if [ "$HAVE_QEMU" = "yes" ]; then
|
||||||
./run_qemu.sh
|
./run_qemu.sh
|
||||||
|
runtests=$((runtests+1))
|
||||||
else
|
else
|
||||||
echo "HAVE_QEMU != yes -- Skipping test..." >&2
|
echo "HAVE_QEMU != yes -- Skipping test..." >&2
|
||||||
|
skipped=$((skipped+1))
|
||||||
fi
|
fi
|
||||||
|
|
||||||
print_header "mode=$defaultmode,variant=apt: fail with file:// mirror"
|
print_header "mode=$defaultmode,variant=apt: fail with file:// mirror"
|
||||||
|
@ -754,8 +820,10 @@ fi
|
||||||
END
|
END
|
||||||
if [ "$HAVE_QEMU" = "yes" ]; then
|
if [ "$HAVE_QEMU" = "yes" ]; then
|
||||||
./run_qemu.sh
|
./run_qemu.sh
|
||||||
|
runtests=$((runtests+1))
|
||||||
else
|
else
|
||||||
echo "HAVE_QEMU != yes -- Skipping test..." >&2
|
echo "HAVE_QEMU != yes -- Skipping test..." >&2
|
||||||
|
skipped=$((skipped+1))
|
||||||
fi
|
fi
|
||||||
|
|
||||||
print_header "mode=$defaultmode,variant=apt: mirror is deb..."
|
print_header "mode=$defaultmode,variant=apt: mirror is deb..."
|
||||||
|
@ -769,10 +837,13 @@ rm /tmp/debian-chroot.tar
|
||||||
END
|
END
|
||||||
if [ "$HAVE_QEMU" = "yes" ]; then
|
if [ "$HAVE_QEMU" = "yes" ]; then
|
||||||
./run_qemu.sh
|
./run_qemu.sh
|
||||||
|
runtests=$((runtests+1))
|
||||||
elif [ "$defaultmode" = "root" ]; then
|
elif [ "$defaultmode" = "root" ]; then
|
||||||
./run_null.sh SUDO
|
./run_null.sh SUDO
|
||||||
|
runtests=$((runtests+1))
|
||||||
else
|
else
|
||||||
./run_null.sh
|
./run_null.sh
|
||||||
|
runtests=$((runtests+1))
|
||||||
fi
|
fi
|
||||||
|
|
||||||
print_header "mode=$defaultmode,variant=apt: mirror is real file"
|
print_header "mode=$defaultmode,variant=apt: mirror is real file"
|
||||||
|
@ -787,10 +858,13 @@ rm /tmp/debian-chroot.tar /tmp/sources.list
|
||||||
END
|
END
|
||||||
if [ "$HAVE_QEMU" = "yes" ]; then
|
if [ "$HAVE_QEMU" = "yes" ]; then
|
||||||
./run_qemu.sh
|
./run_qemu.sh
|
||||||
|
runtests=$((runtests+1))
|
||||||
elif [ "$defaultmode" = "root" ]; then
|
elif [ "$defaultmode" = "root" ]; then
|
||||||
./run_null.sh SUDO
|
./run_null.sh SUDO
|
||||||
|
runtests=$((runtests+1))
|
||||||
else
|
else
|
||||||
./run_null.sh
|
./run_null.sh
|
||||||
|
runtests=$((runtests+1))
|
||||||
fi
|
fi
|
||||||
|
|
||||||
print_header "mode=$defaultmode,variant=apt: automatic mirror from suite"
|
print_header "mode=$defaultmode,variant=apt: automatic mirror from suite"
|
||||||
|
@ -805,10 +879,13 @@ rm /tmp/debian-chroot.tar
|
||||||
END
|
END
|
||||||
if [ "$HAVE_QEMU" = "yes" ]; then
|
if [ "$HAVE_QEMU" = "yes" ]; then
|
||||||
./run_qemu.sh
|
./run_qemu.sh
|
||||||
|
runtests=$((runtests+1))
|
||||||
elif [ "$defaultmode" = "root" ]; then
|
elif [ "$defaultmode" = "root" ]; then
|
||||||
./run_null.sh SUDO
|
./run_null.sh SUDO
|
||||||
|
runtests=$((runtests+1))
|
||||||
else
|
else
|
||||||
./run_null.sh
|
./run_null.sh
|
||||||
|
runtests=$((runtests+1))
|
||||||
fi
|
fi
|
||||||
|
|
||||||
print_header "mode=$defaultmode,variant=apt: invalid mirror"
|
print_header "mode=$defaultmode,variant=apt: invalid mirror"
|
||||||
|
@ -826,10 +903,13 @@ fi
|
||||||
END
|
END
|
||||||
if [ "$HAVE_QEMU" = "yes" ]; then
|
if [ "$HAVE_QEMU" = "yes" ]; then
|
||||||
./run_qemu.sh
|
./run_qemu.sh
|
||||||
|
runtests=$((runtests+1))
|
||||||
elif [ "$defaultmode" = "root" ]; then
|
elif [ "$defaultmode" = "root" ]; then
|
||||||
./run_null.sh SUDO
|
./run_null.sh SUDO
|
||||||
|
runtests=$((runtests+1))
|
||||||
else
|
else
|
||||||
./run_null.sh
|
./run_null.sh
|
||||||
|
runtests=$((runtests+1))
|
||||||
fi
|
fi
|
||||||
|
|
||||||
print_header "mode=root,variant=apt: fail installing to /"
|
print_header "mode=root,variant=apt: fail installing to /"
|
||||||
|
@ -846,8 +926,10 @@ fi
|
||||||
END
|
END
|
||||||
if [ "$HAVE_QEMU" = "yes" ]; then
|
if [ "$HAVE_QEMU" = "yes" ]; then
|
||||||
./run_qemu.sh
|
./run_qemu.sh
|
||||||
|
runtests=$((runtests+1))
|
||||||
else
|
else
|
||||||
./run_null.sh SUDO
|
./run_null.sh SUDO
|
||||||
|
runtests=$((runtests+1))
|
||||||
fi
|
fi
|
||||||
|
|
||||||
print_header "mode=root,variant=apt: fail installing to existing file"
|
print_header "mode=root,variant=apt: fail installing to existing file"
|
||||||
|
@ -865,8 +947,10 @@ fi
|
||||||
END
|
END
|
||||||
if [ "$HAVE_QEMU" = "yes" ]; then
|
if [ "$HAVE_QEMU" = "yes" ]; then
|
||||||
./run_qemu.sh
|
./run_qemu.sh
|
||||||
|
runtests=$((runtests+1))
|
||||||
else
|
else
|
||||||
./run_null.sh SUDO
|
./run_null.sh SUDO
|
||||||
|
runtests=$((runtests+1))
|
||||||
fi
|
fi
|
||||||
|
|
||||||
print_header "mode=$defaultmode,variant=apt: test armhf without qemu support"
|
print_header "mode=$defaultmode,variant=apt: test armhf without qemu support"
|
||||||
|
@ -888,10 +972,13 @@ fi
|
||||||
END
|
END
|
||||||
if [ "$HOSTARCH" != amd64 ]; then
|
if [ "$HOSTARCH" != amd64 ]; then
|
||||||
echo "HOSTARCH != amd64 -- Skipping test..." >&2
|
echo "HOSTARCH != amd64 -- Skipping test..." >&2
|
||||||
|
skipped=$((skipped+1))
|
||||||
elif [ "$HAVE_QEMU" = "yes" ]; then
|
elif [ "$HAVE_QEMU" = "yes" ]; then
|
||||||
./run_qemu.sh
|
./run_qemu.sh
|
||||||
|
runtests=$((runtests+1))
|
||||||
else
|
else
|
||||||
echo "HAVE_QEMU != yes -- Skipping test..." >&2
|
echo "HAVE_QEMU != yes -- Skipping test..." >&2
|
||||||
|
skipped=$((skipped+1))
|
||||||
fi
|
fi
|
||||||
|
|
||||||
print_header "mode=$defaultmode,variant=apt: test i386 (which can be executed without qemu)"
|
print_header "mode=$defaultmode,variant=apt: test i386 (which can be executed without qemu)"
|
||||||
|
@ -937,10 +1024,13 @@ rm /tmp/debian-chroot.tar
|
||||||
END
|
END
|
||||||
if [ "$HOSTARCH" != amd64 ]; then
|
if [ "$HOSTARCH" != amd64 ]; then
|
||||||
echo "HOSTARCH != amd64 -- Skipping test..." >&2
|
echo "HOSTARCH != amd64 -- Skipping test..." >&2
|
||||||
|
skipped=$((skipped+1))
|
||||||
elif [ "$HAVE_QEMU" = "yes" ]; then
|
elif [ "$HAVE_QEMU" = "yes" ]; then
|
||||||
./run_qemu.sh
|
./run_qemu.sh
|
||||||
|
runtests=$((runtests+1))
|
||||||
else
|
else
|
||||||
echo "HAVE_QEMU != yes -- Skipping test..." >&2
|
echo "HAVE_QEMU != yes -- Skipping test..." >&2
|
||||||
|
skipped=$((skipped+1))
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# to test foreign architecture package installation we choose a package which
|
# to test foreign architecture package installation we choose a package which
|
||||||
|
@ -976,13 +1066,17 @@ END
|
||||||
if [ "$RUN_MA_SAME_TESTS" = "yes" ]; then
|
if [ "$RUN_MA_SAME_TESTS" = "yes" ]; then
|
||||||
if [ "$HOSTARCH" != amd64 ]; then
|
if [ "$HOSTARCH" != amd64 ]; then
|
||||||
echo "HOSTARCH != amd64 -- Skipping test..." >&2
|
echo "HOSTARCH != amd64 -- Skipping test..." >&2
|
||||||
|
skipped=$((skipped+1))
|
||||||
elif [ "$HAVE_QEMU" = "yes" ]; then
|
elif [ "$HAVE_QEMU" = "yes" ]; then
|
||||||
./run_qemu.sh
|
./run_qemu.sh
|
||||||
|
runtests=$((runtests+1))
|
||||||
else
|
else
|
||||||
./run_null.sh SUDO
|
./run_null.sh SUDO
|
||||||
|
runtests=$((runtests+1))
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo "RUN_MA_SAME_TESTS != yes -- Skipping test..." >&2
|
echo "RUN_MA_SAME_TESTS != yes -- Skipping test..." >&2
|
||||||
|
skipped=$((skipped+1))
|
||||||
fi
|
fi
|
||||||
|
|
||||||
print_header "mode=root,variant=apt: test --include=libmagic-mgc:armhf with multiple --arch options"
|
print_header "mode=root,variant=apt: test --include=libmagic-mgc:armhf with multiple --arch options"
|
||||||
|
@ -1013,13 +1107,17 @@ END
|
||||||
if [ "$RUN_MA_SAME_TESTS" = "yes" ]; then
|
if [ "$RUN_MA_SAME_TESTS" = "yes" ]; then
|
||||||
if [ "$HOSTARCH" != amd64 ]; then
|
if [ "$HOSTARCH" != amd64 ]; then
|
||||||
echo "HOSTARCH != amd64 -- Skipping test..." >&2
|
echo "HOSTARCH != amd64 -- Skipping test..." >&2
|
||||||
|
skipped=$((skipped+1))
|
||||||
elif [ "$HAVE_QEMU" = "yes" ]; then
|
elif [ "$HAVE_QEMU" = "yes" ]; then
|
||||||
./run_qemu.sh
|
./run_qemu.sh
|
||||||
|
runtests=$((runtests+1))
|
||||||
else
|
else
|
||||||
./run_null.sh SUDO
|
./run_null.sh SUDO
|
||||||
|
runtests=$((runtests+1))
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo "RUN_MA_SAME_TESTS != yes -- Skipping test..." >&2
|
echo "RUN_MA_SAME_TESTS != yes -- Skipping test..." >&2
|
||||||
|
skipped=$((skipped+1))
|
||||||
fi
|
fi
|
||||||
|
|
||||||
print_header "mode=root,variant=apt: test --aptopt"
|
print_header "mode=root,variant=apt: test --aptopt"
|
||||||
|
@ -1036,8 +1134,10 @@ rm -r /tmp/debian-chroot
|
||||||
END
|
END
|
||||||
if [ "$HAVE_QEMU" = "yes" ]; then
|
if [ "$HAVE_QEMU" = "yes" ]; then
|
||||||
./run_qemu.sh
|
./run_qemu.sh
|
||||||
|
runtests=$((runtests+1))
|
||||||
else
|
else
|
||||||
./run_null.sh SUDO
|
./run_null.sh SUDO
|
||||||
|
runtests=$((runtests+1))
|
||||||
fi
|
fi
|
||||||
|
|
||||||
print_header "mode=root,variant=apt: test --keyring"
|
print_header "mode=root,variant=apt: test --keyring"
|
||||||
|
@ -1056,8 +1156,10 @@ rm -r /tmp/debian-chroot
|
||||||
END
|
END
|
||||||
if [ "$HAVE_QEMU" = "yes" ]; then
|
if [ "$HAVE_QEMU" = "yes" ]; then
|
||||||
./run_qemu.sh
|
./run_qemu.sh
|
||||||
|
runtests=$((runtests+1))
|
||||||
else
|
else
|
||||||
echo "HAVE_QEMU != yes -- Skipping test..." >&2
|
echo "HAVE_QEMU != yes -- Skipping test..." >&2
|
||||||
|
skipped=$((skipped+1))
|
||||||
fi
|
fi
|
||||||
|
|
||||||
print_header "mode=root,variant=apt: test --keyring overwrites"
|
print_header "mode=root,variant=apt: test --keyring overwrites"
|
||||||
|
@ -1080,8 +1182,10 @@ fi
|
||||||
END
|
END
|
||||||
if [ "$HAVE_QEMU" = "yes" ]; then
|
if [ "$HAVE_QEMU" = "yes" ]; then
|
||||||
./run_qemu.sh
|
./run_qemu.sh
|
||||||
|
runtests=$((runtests+1))
|
||||||
else
|
else
|
||||||
./run_null.sh SUDO
|
./run_null.sh SUDO
|
||||||
|
runtests=$((runtests+1))
|
||||||
fi
|
fi
|
||||||
|
|
||||||
print_header "mode=root,variant=apt: test signed-by without host keys"
|
print_header "mode=root,variant=apt: test signed-by without host keys"
|
||||||
|
@ -1104,8 +1208,10 @@ rm -r /tmp/debian-chroot
|
||||||
END
|
END
|
||||||
if [ "$HAVE_QEMU" = "yes" ]; then
|
if [ "$HAVE_QEMU" = "yes" ]; then
|
||||||
./run_qemu.sh
|
./run_qemu.sh
|
||||||
|
runtests=$((runtests+1))
|
||||||
else
|
else
|
||||||
echo "HAVE_QEMU != yes -- Skipping test..." >&2
|
echo "HAVE_QEMU != yes -- Skipping test..." >&2
|
||||||
|
skipped=$((skipped+1))
|
||||||
fi
|
fi
|
||||||
|
|
||||||
print_header "mode=root,variant=apt: test signed-by with host keys"
|
print_header "mode=root,variant=apt: test signed-by with host keys"
|
||||||
|
@ -1127,8 +1233,10 @@ rm -r /tmp/debian-chroot
|
||||||
END
|
END
|
||||||
if [ "$HAVE_QEMU" = "yes" ]; then
|
if [ "$HAVE_QEMU" = "yes" ]; then
|
||||||
./run_qemu.sh
|
./run_qemu.sh
|
||||||
|
runtests=$((runtests+1))
|
||||||
else
|
else
|
||||||
echo "HAVE_QEMU != yes -- Skipping test..." >&2
|
echo "HAVE_QEMU != yes -- Skipping test..." >&2
|
||||||
|
skipped=$((skipped+1))
|
||||||
fi
|
fi
|
||||||
|
|
||||||
print_header "mode=root,variant=apt: test --dpkgopt"
|
print_header "mode=root,variant=apt: test --dpkgopt"
|
||||||
|
@ -1146,8 +1254,10 @@ rm -r /tmp/debian-chroot
|
||||||
END
|
END
|
||||||
if [ "$HAVE_QEMU" = "yes" ]; then
|
if [ "$HAVE_QEMU" = "yes" ]; then
|
||||||
./run_qemu.sh
|
./run_qemu.sh
|
||||||
|
runtests=$((runtests+1))
|
||||||
else
|
else
|
||||||
./run_null.sh SUDO
|
./run_null.sh SUDO
|
||||||
|
runtests=$((runtests+1))
|
||||||
fi
|
fi
|
||||||
|
|
||||||
print_header "mode=root,variant=apt: test --include"
|
print_header "mode=root,variant=apt: test --include"
|
||||||
|
@ -1167,8 +1277,10 @@ rm -r /tmp/debian-chroot
|
||||||
END
|
END
|
||||||
if [ "$HAVE_QEMU" = "yes" ]; then
|
if [ "$HAVE_QEMU" = "yes" ]; then
|
||||||
./run_qemu.sh
|
./run_qemu.sh
|
||||||
|
runtests=$((runtests+1))
|
||||||
else
|
else
|
||||||
./run_null.sh SUDO
|
./run_null.sh SUDO
|
||||||
|
runtests=$((runtests+1))
|
||||||
fi
|
fi
|
||||||
|
|
||||||
print_header "mode=root,variant=apt: test multiple --include"
|
print_header "mode=root,variant=apt: test multiple --include"
|
||||||
|
@ -1199,8 +1311,10 @@ rm -r /tmp/debian-chroot
|
||||||
END
|
END
|
||||||
if [ "$HAVE_QEMU" = "yes" ]; then
|
if [ "$HAVE_QEMU" = "yes" ]; then
|
||||||
./run_qemu.sh
|
./run_qemu.sh
|
||||||
|
runtests=$((runtests+1))
|
||||||
else
|
else
|
||||||
./run_null.sh SUDO
|
./run_null.sh SUDO
|
||||||
|
runtests=$((runtests+1))
|
||||||
fi
|
fi
|
||||||
|
|
||||||
print_header "mode=root,variant=apt: test --setup-hook"
|
print_header "mode=root,variant=apt: test --setup-hook"
|
||||||
|
@ -1221,8 +1335,10 @@ rm -r /tmp/debian-chroot
|
||||||
END
|
END
|
||||||
if [ "$HAVE_QEMU" = "yes" ]; then
|
if [ "$HAVE_QEMU" = "yes" ]; then
|
||||||
./run_qemu.sh
|
./run_qemu.sh
|
||||||
|
runtests=$((runtests+1))
|
||||||
else
|
else
|
||||||
./run_null.sh SUDO
|
./run_null.sh SUDO
|
||||||
|
runtests=$((runtests+1))
|
||||||
fi
|
fi
|
||||||
|
|
||||||
print_header "mode=root,variant=apt: test --essential-hook"
|
print_header "mode=root,variant=apt: test --essential-hook"
|
||||||
|
@ -1251,8 +1367,10 @@ rm -r /tmp/debian-chroot
|
||||||
END
|
END
|
||||||
if [ "$HAVE_QEMU" = "yes" ]; then
|
if [ "$HAVE_QEMU" = "yes" ]; then
|
||||||
./run_qemu.sh
|
./run_qemu.sh
|
||||||
|
runtests=$((runtests+1))
|
||||||
else
|
else
|
||||||
./run_null.sh SUDO
|
./run_null.sh SUDO
|
||||||
|
runtests=$((runtests+1))
|
||||||
fi
|
fi
|
||||||
|
|
||||||
print_header "mode=root,variant=apt: test --customize-hook"
|
print_header "mode=root,variant=apt: test --customize-hook"
|
||||||
|
@ -1277,8 +1395,10 @@ rm -r /tmp/debian-chroot
|
||||||
END
|
END
|
||||||
if [ "$HAVE_QEMU" = "yes" ]; then
|
if [ "$HAVE_QEMU" = "yes" ]; then
|
||||||
./run_qemu.sh
|
./run_qemu.sh
|
||||||
|
runtests=$((runtests+1))
|
||||||
else
|
else
|
||||||
./run_null.sh SUDO
|
./run_null.sh SUDO
|
||||||
|
runtests=$((runtests+1))
|
||||||
fi
|
fi
|
||||||
|
|
||||||
print_header "mode=root,variant=apt: test failing --customize-hook"
|
print_header "mode=root,variant=apt: test failing --customize-hook"
|
||||||
|
@ -1296,8 +1416,10 @@ fi
|
||||||
END
|
END
|
||||||
if [ "$HAVE_QEMU" = "yes" ]; then
|
if [ "$HAVE_QEMU" = "yes" ]; then
|
||||||
./run_qemu.sh
|
./run_qemu.sh
|
||||||
|
runtests=$((runtests+1))
|
||||||
else
|
else
|
||||||
./run_null.sh SUDO
|
./run_null.sh SUDO
|
||||||
|
runtests=$((runtests+1))
|
||||||
fi
|
fi
|
||||||
|
|
||||||
print_header "mode=root,variant=apt: test sigint during --customize-hook"
|
print_header "mode=root,variant=apt: test sigint during --customize-hook"
|
||||||
|
@ -1326,8 +1448,10 @@ fi
|
||||||
END
|
END
|
||||||
if [ "$HAVE_QEMU" = "yes" ]; then
|
if [ "$HAVE_QEMU" = "yes" ]; then
|
||||||
./run_qemu.sh
|
./run_qemu.sh
|
||||||
|
runtests=$((runtests+1))
|
||||||
else
|
else
|
||||||
./run_null.sh SUDO
|
./run_null.sh SUDO
|
||||||
|
runtests=$((runtests+1))
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# test special hooks
|
# test special hooks
|
||||||
|
@ -1335,10 +1459,12 @@ for mode in root unshare fakechroot proot; do
|
||||||
print_header "mode=$mode,variant=apt: test special hooks with $mode mode"
|
print_header "mode=$mode,variant=apt: test special hooks with $mode mode"
|
||||||
if [ "$mode" = "unshare" ] && [ "$HAVE_UNSHARE" != "yes" ]; then
|
if [ "$mode" = "unshare" ] && [ "$HAVE_UNSHARE" != "yes" ]; then
|
||||||
echo "HAVE_UNSHARE != yes -- Skipping test..." >&2
|
echo "HAVE_UNSHARE != yes -- Skipping test..." >&2
|
||||||
|
skipped=$((skipped+1))
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
if [ "$mode" = "proot" ] && [ "$HAVE_PROOT" != "yes" ]; then
|
if [ "$mode" = "proot" ] && [ "$HAVE_PROOT" != "yes" ]; then
|
||||||
echo "HAVE_PROOT != yes -- Skipping test..." >&2
|
echo "HAVE_PROOT != yes -- Skipping test..." >&2
|
||||||
|
skipped=$((skipped+1))
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
cat << END > shared/test.sh
|
cat << END > shared/test.sh
|
||||||
|
@ -1464,10 +1590,13 @@ rm /tmp/debian-chroot.tar \
|
||||||
END
|
END
|
||||||
if [ "$HAVE_QEMU" = "yes" ]; then
|
if [ "$HAVE_QEMU" = "yes" ]; then
|
||||||
./run_qemu.sh
|
./run_qemu.sh
|
||||||
|
runtests=$((runtests+1))
|
||||||
elif [ "$mode" = "root" ]; then
|
elif [ "$mode" = "root" ]; then
|
||||||
./run_null.sh SUDO
|
./run_null.sh SUDO
|
||||||
|
runtests=$((runtests+1))
|
||||||
else
|
else
|
||||||
./run_null.sh
|
./run_null.sh
|
||||||
|
runtests=$((runtests+1))
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
@ -1482,8 +1611,10 @@ rm -r /tmp/debian-chroot
|
||||||
END
|
END
|
||||||
if [ "$HAVE_QEMU" = "yes" ]; then
|
if [ "$HAVE_QEMU" = "yes" ]; then
|
||||||
./run_qemu.sh
|
./run_qemu.sh
|
||||||
|
runtests=$((runtests+1))
|
||||||
else
|
else
|
||||||
./run_null.sh SUDO
|
./run_null.sh SUDO
|
||||||
|
runtests=$((runtests+1))
|
||||||
fi
|
fi
|
||||||
|
|
||||||
print_header "mode=root,variant=apt: --verbose"
|
print_header "mode=root,variant=apt: --verbose"
|
||||||
|
@ -1497,8 +1628,10 @@ rm -r /tmp/debian-chroot
|
||||||
END
|
END
|
||||||
if [ "$HAVE_QEMU" = "yes" ]; then
|
if [ "$HAVE_QEMU" = "yes" ]; then
|
||||||
./run_qemu.sh
|
./run_qemu.sh
|
||||||
|
runtests=$((runtests+1))
|
||||||
else
|
else
|
||||||
./run_null.sh SUDO
|
./run_null.sh SUDO
|
||||||
|
runtests=$((runtests+1))
|
||||||
fi
|
fi
|
||||||
|
|
||||||
print_header "mode=root,variant=apt: --debug"
|
print_header "mode=root,variant=apt: --debug"
|
||||||
|
@ -1512,8 +1645,10 @@ rm -r /tmp/debian-chroot
|
||||||
END
|
END
|
||||||
if [ "$HAVE_QEMU" = "yes" ]; then
|
if [ "$HAVE_QEMU" = "yes" ]; then
|
||||||
./run_qemu.sh
|
./run_qemu.sh
|
||||||
|
runtests=$((runtests+1))
|
||||||
else
|
else
|
||||||
./run_null.sh SUDO
|
./run_null.sh SUDO
|
||||||
|
runtests=$((runtests+1))
|
||||||
fi
|
fi
|
||||||
|
|
||||||
print_header "mode=root,variant=apt: --quiet"
|
print_header "mode=root,variant=apt: --quiet"
|
||||||
|
@ -1527,8 +1662,10 @@ rm -r /tmp/debian-chroot
|
||||||
END
|
END
|
||||||
if [ "$HAVE_QEMU" = "yes" ]; then
|
if [ "$HAVE_QEMU" = "yes" ]; then
|
||||||
./run_qemu.sh
|
./run_qemu.sh
|
||||||
|
runtests=$((runtests+1))
|
||||||
else
|
else
|
||||||
./run_null.sh SUDO
|
./run_null.sh SUDO
|
||||||
|
runtests=$((runtests+1))
|
||||||
fi
|
fi
|
||||||
|
|
||||||
print_header "mode=root,variant=apt: --logfile"
|
print_header "mode=root,variant=apt: --logfile"
|
||||||
|
@ -1548,8 +1685,10 @@ rm log
|
||||||
END
|
END
|
||||||
if [ "$HAVE_QEMU" = "yes" ]; then
|
if [ "$HAVE_QEMU" = "yes" ]; then
|
||||||
./run_qemu.sh
|
./run_qemu.sh
|
||||||
|
runtests=$((runtests+1))
|
||||||
else
|
else
|
||||||
./run_null.sh SUDO
|
./run_null.sh SUDO
|
||||||
|
runtests=$((runtests+1))
|
||||||
fi
|
fi
|
||||||
|
|
||||||
print_header "mode=$defaultmode,variant=apt: without /etc/resolv.conf and /etc/hostname"
|
print_header "mode=$defaultmode,variant=apt: without /etc/resolv.conf and /etc/hostname"
|
||||||
|
@ -1571,8 +1710,10 @@ rm /tmp/debian-chroot.tar
|
||||||
END
|
END
|
||||||
if [ "$HAVE_QEMU" = "yes" ]; then
|
if [ "$HAVE_QEMU" = "yes" ]; then
|
||||||
./run_qemu.sh
|
./run_qemu.sh
|
||||||
|
runtests=$((runtests+1))
|
||||||
else
|
else
|
||||||
echo "HAVE_QEMU != yes -- Skipping test..." >&2
|
echo "HAVE_QEMU != yes -- Skipping test..." >&2
|
||||||
|
skipped=$((skipped+1))
|
||||||
fi
|
fi
|
||||||
|
|
||||||
print_header "mode=$defaultmode,variant=essential: test not having to installing apt with --include"
|
print_header "mode=$defaultmode,variant=essential: test not having to installing apt with --include"
|
||||||
|
@ -1586,10 +1727,13 @@ rm /tmp/debian-chroot.tar
|
||||||
END
|
END
|
||||||
if [ "$HAVE_QEMU" = "yes" ]; then
|
if [ "$HAVE_QEMU" = "yes" ]; then
|
||||||
./run_qemu.sh
|
./run_qemu.sh
|
||||||
|
runtests=$((runtests+1))
|
||||||
elif [ "$defaultmode" = "root" ]; then
|
elif [ "$defaultmode" = "root" ]; then
|
||||||
./run_null.sh SUDO
|
./run_null.sh SUDO
|
||||||
|
runtests=$((runtests+1))
|
||||||
else
|
else
|
||||||
./run_null.sh
|
./run_null.sh
|
||||||
|
runtests=$((runtests+1))
|
||||||
fi
|
fi
|
||||||
|
|
||||||
print_header "mode=$defaultmode,variant=apt: remove start-stop-daemon and policy-rc.d in hook"
|
print_header "mode=$defaultmode,variant=apt: remove start-stop-daemon and policy-rc.d in hook"
|
||||||
|
@ -1603,10 +1747,13 @@ rm /tmp/debian-chroot.tar
|
||||||
END
|
END
|
||||||
if [ "$HAVE_QEMU" = "yes" ]; then
|
if [ "$HAVE_QEMU" = "yes" ]; then
|
||||||
./run_qemu.sh
|
./run_qemu.sh
|
||||||
|
runtests=$((runtests+1))
|
||||||
elif [ "$defaultmode" = "root" ]; then
|
elif [ "$defaultmode" = "root" ]; then
|
||||||
./run_null.sh SUDO
|
./run_null.sh SUDO
|
||||||
|
runtests=$((runtests+1))
|
||||||
else
|
else
|
||||||
./run_null.sh
|
./run_null.sh
|
||||||
|
runtests=$((runtests+1))
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# test all variants
|
# test all variants
|
||||||
|
@ -1623,8 +1770,10 @@ rm /tmp/debian-chroot.tar
|
||||||
END
|
END
|
||||||
if [ "$HAVE_QEMU" = "yes" ]; then
|
if [ "$HAVE_QEMU" = "yes" ]; then
|
||||||
./run_qemu.sh
|
./run_qemu.sh
|
||||||
|
runtests=$((runtests+1))
|
||||||
else
|
else
|
||||||
./run_null.sh SUDO
|
./run_null.sh SUDO
|
||||||
|
runtests=$((runtests+1))
|
||||||
fi
|
fi
|
||||||
# check if the other modes produce the same result in each variant
|
# check if the other modes produce the same result in each variant
|
||||||
for mode in unshare fakechroot proot; do
|
for mode in unshare fakechroot proot; do
|
||||||
|
@ -1651,10 +1800,12 @@ END
|
||||||
print_header "mode=$mode,variant=$variant: create tarball"
|
print_header "mode=$mode,variant=$variant: create tarball"
|
||||||
if [ "$mode" = "unshare" ] && [ "$HAVE_UNSHARE" != "yes" ]; then
|
if [ "$mode" = "unshare" ] && [ "$HAVE_UNSHARE" != "yes" ]; then
|
||||||
echo "HAVE_UNSHARE != yes -- Skipping test..." >&2
|
echo "HAVE_UNSHARE != yes -- Skipping test..." >&2
|
||||||
|
skipped=$((skipped+1))
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
if [ "$mode" = "proot" ] && [ "$HAVE_PROOT" != "yes" ]; then
|
if [ "$mode" = "proot" ] && [ "$HAVE_PROOT" != "yes" ]; then
|
||||||
echo "HAVE_PROOT != yes -- Skipping test..." >&2
|
echo "HAVE_PROOT != yes -- Skipping test..." >&2
|
||||||
|
skipped=$((skipped+1))
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
cat << END > shared/test.sh
|
cat << END > shared/test.sh
|
||||||
|
@ -1676,8 +1827,10 @@ rm /tmp/debian-chroot.tar
|
||||||
END
|
END
|
||||||
if [ "$HAVE_QEMU" = "yes" ]; then
|
if [ "$HAVE_QEMU" = "yes" ]; then
|
||||||
./run_qemu.sh
|
./run_qemu.sh
|
||||||
|
runtests=$((runtests+1))
|
||||||
else
|
else
|
||||||
./run_null.sh
|
./run_null.sh
|
||||||
|
runtests=$((runtests+1))
|
||||||
fi
|
fi
|
||||||
# Devel::Cover doesn't survive mmdebstrap re-exec-ing itself
|
# Devel::Cover doesn't survive mmdebstrap re-exec-ing itself
|
||||||
# with fakechroot, thus, we do an additional run where we
|
# with fakechroot, thus, we do an additional run where we
|
||||||
|
@ -1700,8 +1853,10 @@ rm /tmp/debian-chroot.tar
|
||||||
END
|
END
|
||||||
if [ "$HAVE_QEMU" = "yes" ]; then
|
if [ "$HAVE_QEMU" = "yes" ]; then
|
||||||
./run_qemu.sh
|
./run_qemu.sh
|
||||||
|
runtests=$((runtests+1))
|
||||||
else
|
else
|
||||||
./run_null.sh
|
./run_null.sh
|
||||||
|
runtests=$((runtests+1))
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
@ -1755,10 +1910,12 @@ for mode in root unshare fakechroot proot chrootless; do
|
||||||
print_header "mode=$mode,variant=extract: unpack doc-debian"
|
print_header "mode=$mode,variant=extract: unpack doc-debian"
|
||||||
if [ "$mode" = "unshare" ] && [ "$HAVE_UNSHARE" != "yes" ]; then
|
if [ "$mode" = "unshare" ] && [ "$HAVE_UNSHARE" != "yes" ]; then
|
||||||
echo "HAVE_UNSHARE != yes -- Skipping test..." >&2
|
echo "HAVE_UNSHARE != yes -- Skipping test..." >&2
|
||||||
|
skipped=$((skipped+1))
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
if [ "$mode" = "proot" ] && [ "$HAVE_PROOT" != "yes" ]; then
|
if [ "$mode" = "proot" ] && [ "$HAVE_PROOT" != "yes" ]; then
|
||||||
echo "HAVE_PROOT != yes -- Skipping test..." >&2
|
echo "HAVE_PROOT != yes -- Skipping test..." >&2
|
||||||
|
skipped=$((skipped+1))
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
cat << END > shared/test.sh
|
cat << END > shared/test.sh
|
||||||
|
@ -1812,10 +1969,13 @@ find /tmp/debian-chroot -depth -print0 | xargs -0 rmdir
|
||||||
END
|
END
|
||||||
if [ "$HAVE_QEMU" = "yes" ]; then
|
if [ "$HAVE_QEMU" = "yes" ]; then
|
||||||
./run_qemu.sh
|
./run_qemu.sh
|
||||||
|
runtests=$((runtests+1))
|
||||||
elif [ "$mode" = "root" ]; then
|
elif [ "$mode" = "root" ]; then
|
||||||
./run_null.sh SUDO
|
./run_null.sh SUDO
|
||||||
|
runtests=$((runtests+1))
|
||||||
else
|
else
|
||||||
./run_null.sh
|
./run_null.sh
|
||||||
|
runtests=$((runtests+1))
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
@ -1869,8 +2029,10 @@ find /tmp/debian-chroot -depth -print0 | xargs -0 rmdir
|
||||||
END
|
END
|
||||||
if [ "$HAVE_QEMU" = "yes" ]; then
|
if [ "$HAVE_QEMU" = "yes" ]; then
|
||||||
./run_qemu.sh
|
./run_qemu.sh
|
||||||
|
runtests=$((runtests+1))
|
||||||
else
|
else
|
||||||
./run_null.sh
|
./run_null.sh
|
||||||
|
runtests=$((runtests+1))
|
||||||
fi
|
fi
|
||||||
|
|
||||||
print_header "mode=chrootless,variant=custom: install doc-debian and output tarball"
|
print_header "mode=chrootless,variant=custom: install doc-debian and output tarball"
|
||||||
|
@ -1888,8 +2050,10 @@ rm /tmp/debian-chroot.tar
|
||||||
END
|
END
|
||||||
if [ "$HAVE_QEMU" = "yes" ]; then
|
if [ "$HAVE_QEMU" = "yes" ]; then
|
||||||
./run_qemu.sh
|
./run_qemu.sh
|
||||||
|
runtests=$((runtests+1))
|
||||||
else
|
else
|
||||||
./run_null.sh
|
./run_null.sh
|
||||||
|
runtests=$((runtests+1))
|
||||||
fi
|
fi
|
||||||
|
|
||||||
print_header "mode=chrootless,variant=custom: install doc-debian and test hooks"
|
print_header "mode=chrootless,variant=custom: install doc-debian and test hooks"
|
||||||
|
@ -1944,8 +2108,10 @@ find /tmp/debian-chroot -depth -print0 | xargs -0 rmdir
|
||||||
END
|
END
|
||||||
if [ "$HAVE_QEMU" = "yes" ]; then
|
if [ "$HAVE_QEMU" = "yes" ]; then
|
||||||
./run_qemu.sh
|
./run_qemu.sh
|
||||||
|
runtests=$((runtests+1))
|
||||||
else
|
else
|
||||||
./run_null.sh
|
./run_null.sh
|
||||||
|
runtests=$((runtests+1))
|
||||||
fi
|
fi
|
||||||
|
|
||||||
print_header "mode=chrootless,variant=custom: install libmagic-mgc on armhf"
|
print_header "mode=chrootless,variant=custom: install libmagic-mgc on armhf"
|
||||||
|
@ -1998,14 +2164,18 @@ find /tmp/debian-chroot -depth -print0 | xargs -0 rmdir
|
||||||
END
|
END
|
||||||
if [ "$HOSTARCH" != amd64 ]; then
|
if [ "$HOSTARCH" != amd64 ]; then
|
||||||
echo "HOSTARCH != amd64 -- Skipping test..." >&2
|
echo "HOSTARCH != amd64 -- Skipping test..." >&2
|
||||||
|
skipped=$((skipped+1))
|
||||||
elif [ "$HAVE_BINFMT" = "yes" ]; then
|
elif [ "$HAVE_BINFMT" = "yes" ]; then
|
||||||
if [ "$HAVE_QEMU" = "yes" ]; then
|
if [ "$HAVE_QEMU" = "yes" ]; then
|
||||||
./run_qemu.sh
|
./run_qemu.sh
|
||||||
|
runtests=$((runtests+1))
|
||||||
else
|
else
|
||||||
./run_null.sh
|
./run_null.sh
|
||||||
|
runtests=$((runtests+1))
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo "HAVE_BINFMT != yes -- Skipping test..." >&2
|
echo "HAVE_BINFMT != yes -- Skipping test..." >&2
|
||||||
|
skipped=$((skipped+1))
|
||||||
fi
|
fi
|
||||||
|
|
||||||
print_header "mode=root,variant=custom: install busybox-based sub-essential system"
|
print_header "mode=root,variant=custom: install busybox-based sub-essential system"
|
||||||
|
@ -2039,8 +2209,10 @@ rm -r /tmp/debian-chroot
|
||||||
END
|
END
|
||||||
if [ "$HAVE_QEMU" = "yes" ]; then
|
if [ "$HAVE_QEMU" = "yes" ]; then
|
||||||
./run_qemu.sh
|
./run_qemu.sh
|
||||||
|
runtests=$((runtests+1))
|
||||||
else
|
else
|
||||||
./run_null.sh SUDO
|
./run_null.sh SUDO
|
||||||
|
runtests=$((runtests+1))
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# test foreign architecture with all modes
|
# test foreign architecture with all modes
|
||||||
|
@ -2050,18 +2222,22 @@ for mode in root unshare fakechroot proot; do
|
||||||
print_header "mode=$mode,variant=apt: create armhf tarball"
|
print_header "mode=$mode,variant=apt: create armhf tarball"
|
||||||
if [ "$HOSTARCH" != amd64 ]; then
|
if [ "$HOSTARCH" != amd64 ]; then
|
||||||
echo "HOSTARCH != amd64 -- Skipping test..." >&2
|
echo "HOSTARCH != amd64 -- Skipping test..." >&2
|
||||||
|
skipped=$((skipped+1))
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
if [ "$HAVE_BINFMT" != "yes" ]; then
|
if [ "$HAVE_BINFMT" != "yes" ]; then
|
||||||
echo "HAVE_BINFMT != yes -- Skipping test..." >&2
|
echo "HAVE_BINFMT != yes -- Skipping test..." >&2
|
||||||
|
skipped=$((skipped+1))
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
if [ "$mode" = "unshare" ] && [ "$HAVE_UNSHARE" != "yes" ]; then
|
if [ "$mode" = "unshare" ] && [ "$HAVE_UNSHARE" != "yes" ]; then
|
||||||
echo "HAVE_UNSHARE != yes -- Skipping test..." >&2
|
echo "HAVE_UNSHARE != yes -- Skipping test..." >&2
|
||||||
|
skipped=$((skipped+1))
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
if [ "$mode" = "proot" ] && [ "$HAVE_PROOT" != "yes" ]; then
|
if [ "$mode" = "proot" ] && [ "$HAVE_PROOT" != "yes" ]; then
|
||||||
echo "HAVE_PROOT != yes -- Skipping test..." >&2
|
echo "HAVE_PROOT != yes -- Skipping test..." >&2
|
||||||
|
skipped=$((skipped+1))
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
cat << END > shared/test.sh
|
cat << END > shared/test.sh
|
||||||
|
@ -2105,10 +2281,13 @@ rm /tmp/debian-chroot.tar
|
||||||
END
|
END
|
||||||
if [ "$HAVE_QEMU" = "yes" ]; then
|
if [ "$HAVE_QEMU" = "yes" ]; then
|
||||||
./run_qemu.sh
|
./run_qemu.sh
|
||||||
|
runtests=$((runtests+1))
|
||||||
elif [ "$mode" = "root" ]; then
|
elif [ "$mode" = "root" ]; then
|
||||||
./run_null.sh SUDO
|
./run_null.sh SUDO
|
||||||
|
runtests=$((runtests+1))
|
||||||
else
|
else
|
||||||
./run_null.sh
|
./run_null.sh
|
||||||
|
runtests=$((runtests+1))
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
@ -2117,6 +2296,19 @@ if [ "$((i-1))" -ne "$total" ]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ "$skipped" -gt 0 ]; then
|
||||||
|
echo "number of skipped tests: $skipped" >&2
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$runtests" -gt 0 ]; then
|
||||||
|
echo "number of executed tests: $runtests" >&2
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$((skipped+runtests))" -ne "$total" ]; then
|
||||||
|
echo "sum of skipped and executed tests is not equal to $total" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
if [ "$HAVE_QEMU" = "yes" ]; then
|
if [ "$HAVE_QEMU" = "yes" ]; then
|
||||||
guestfish add-ro shared/cover_db.img : run : mount /dev/sda / : tar-out / - \
|
guestfish add-ro shared/cover_db.img : run : mount /dev/sda / : tar-out / - \
|
||||||
| tar -C shared/cover_db --extract
|
| tar -C shared/cover_db --extract
|
||||||
|
|
Loading…
Reference in a new issue