diff options
author | coadde [Márcio Alexandre Silva Delgado] <coadde@parabola.nu> | 2015-08-26 03:41:50 -0300 |
---|---|---|
committer | coadde [Márcio Alexandre Silva Delgado] <coadde@parabola.nu> | 2015-08-26 03:41:50 -0300 |
commit | bf43cbddbccc51a1147eb37cd7a64762bde4f506 (patch) | |
tree | 3bfc609c9385b00ec9a3fdbfb79de1620c3f99db /extra/lukeshu-xbs/test/test.d/create-filelists.sh | |
parent | 50d2db5c271537d78ea0037fe285d081df38fa02 (diff) |
add copy from the lukeshu/xbs repo
Diffstat (limited to 'extra/lukeshu-xbs/test/test.d/create-filelists.sh')
-rwxr-xr-x | extra/lukeshu-xbs/test/test.d/create-filelists.sh | 105 |
1 files changed, 105 insertions, 0 deletions
diff --git a/extra/lukeshu-xbs/test/test.d/create-filelists.sh b/extra/lukeshu-xbs/test/test.d/create-filelists.sh new file mode 100755 index 0000000..b5ec5c8 --- /dev/null +++ b/extra/lukeshu-xbs/test/test.d/create-filelists.sh @@ -0,0 +1,105 @@ +#!/bin/bash + +curdir="$(readlink -e "$(dirname "$0")")" +. "${curdir}/../lib/common.inc" + +testCreateSimpleFileLists() { + local arches=(`arches`) + local pkgs=('pkg-simple-a' 'pkg-simple-b' 'pkg-simple-epoch') + local pkgbase + local arch + + for pkgbase in "${pkgs[@]}"; do + for arch in "${arches[@]}"; do + releasePackage extra "${pkgbase}" "${arch}" + done + done + ../db-update + + for pkgbase in "${pkgs[@]}"; do + for arch in "${arches[@]}"; do + if ! bsdtar -xOf "${FTP_BASE}/extra/os/${arch}/extra${FILESEXT}" | grep "usr/bin/${pkgbase}" &>/dev/null; then + fail "usr/bin/${pkgbase} not found in ${arch}/extra${FILESEXT}" + fi + done + done +} + +testCreateAnyFileLists() { + local arches=(`arches`) + local pkgs=('pkg-any-a' 'pkg-any-b') + local pkgbase + local arch + + for pkgbase in "${pkgs[@]}"; do + releasePackage extra "${pkgbase}" any + done + ../db-update + + for pkgbase in "${pkgs[@]}"; do + for arch in "${arches[@]}"; do + if ! bsdtar -xOf "${FTP_BASE}/extra/os/${arch}/extra${FILESEXT}" | grep "usr/share/${pkgbase}/test" &>/dev/null; then + fail "usr/share/${pkgbase}/test not found in ${arch}/extra${FILESEXT}" + fi + done + done +} + +testCreateSplitFileLists() { + local arches=(`arches`) + local pkgs=('pkg-split-a' 'pkg-split-b') + local pkg + local pkgbase + local pkgname + local pkgnames + local arch + + for pkgbase in "${pkgs[@]}"; do + for arch in "${arches[@]}"; do + releasePackage extra "${pkgbase}" "${arch}" + done + done + ../db-update + + for pkgbase in "${pkgs[@]}"; do + pkgnames=($(source "${TMP}/svn-packages-copy/${pkgbase}/trunk/PKGBUILD"; echo "${pkgname[@]}")) + for pkgname in "${pkgnames[@]}"; do + for arch in "${arches[@]}"; do + if ! bsdtar -xOf "${FTP_BASE}/extra/os/${arch}/extra${FILESEXT}" | grep "usr/bin/${pkgname}" &>/dev/null; then + fail "usr/bin/${pkgname} not found in ${arch}/extra${FILESEXT}" + fi + done + done + done +} + + +testCleanupFileLists() { + local arches=(`arches`) + local pkgs=('pkg-simple-a' 'pkg-simple-b') + local pkgbase + local arch + + for pkgbase in ${pkgs[@]}; do + for arch in ${arches[@]}; do + releasePackage extra ${pkgbase} ${arch} + done + done + ../db-update + + for arch in ${arches[@]}; do + ../db-remove extra ${arch} pkg-simple-a + done + + for arch in ${arches[@]}; do + if ! bsdtar -xOf "${FTP_BASE}/extra/os/${arch}/extra${FILESEXT}" | grep "usr/bin/pkg-simple-b" &>/dev/null; then + fail "usr/bin/pkg-simple-b not found in ${arch}/extra${FILESEXT}" + fi + if bsdtar -xOf "${FTP_BASE}/extra/os/${arch}/extra${FILESEXT}" | grep "usr/bin/pkg-simple-a" &>/dev/null; then + fail "usr/bin/pkg-simple-a still found in ${arch}/extra${FILESEXT}" + fi + done + +} + +. "${curdir}/../lib/shunit2" |