diff options
Diffstat (limited to 'test/test.d')
-rwxr-xr-x | test/test.d/create-filelists.sh | 20 | ||||
-rwxr-xr-x | test/test.d/db-move.sh | 22 | ||||
-rwxr-xr-x | test/test.d/db-remove.sh | 14 | ||||
-rwxr-xr-x | test/test.d/db-repo-add.sh | 10 | ||||
-rwxr-xr-x | test/test.d/db-repo-remove.sh | 14 | ||||
-rwxr-xr-x | test/test.d/db-update.sh | 15 | ||||
-rwxr-xr-x | test/test.d/ftpdir-cleanup.sh | 21 | ||||
-rwxr-xr-x | test/test.d/sourceballs.sh | 11 |
8 files changed, 52 insertions, 75 deletions
diff --git a/test/test.d/create-filelists.sh b/test/test.d/create-filelists.sh index e3a30d1..e16a8d1 100755 --- a/test/test.d/create-filelists.sh +++ b/test/test.d/create-filelists.sh @@ -4,20 +4,19 @@ curdir=$(readlink -e "$(dirname "$0")") . "${curdir}/../lib/common.inc" testCreateSimpleFileLists() { - local arches=('i686' 'x86_64') 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 + for arch in "${ARCH_BUILD[@]}"; do releasePackage extra "${pkgbase}" "${arch}" done done ../db-update for pkgbase in "${pkgs[@]}"; do - for arch in "${arches[@]}"; do + for arch in "${ARCH_BUILD[@]}"; do if ! bsdtar -xOf "${FTP_BASE}/extra/os/${arch}/extra${FILESEXT}" | grep -q "usr/bin/${pkgbase}"; then fail "usr/bin/${pkgbase} not found in ${arch}/extra${FILESEXT}" fi @@ -26,7 +25,6 @@ testCreateSimpleFileLists() { } testCreateAnyFileLists() { - local arches=('i686' 'x86_64') local pkgs=('pkg-any-a' 'pkg-any-b') local pkgbase local arch @@ -37,7 +35,7 @@ testCreateAnyFileLists() { ../db-update for pkgbase in "${pkgs[@]}"; do - for arch in "${arches[@]}"; do + for arch in "${ARCH_BUILD[@]}"; do if ! bsdtar -xOf "${FTP_BASE}/extra/os/${arch}/extra${FILESEXT}" | grep -q "usr/share/${pkgbase}/test"; then fail "usr/share/${pkgbase}/test not found in ${arch}/extra${FILESEXT}" fi @@ -46,7 +44,6 @@ testCreateAnyFileLists() { } testCreateSplitFileLists() { - local arches=('i686' 'x86_64') local pkgs=('pkg-split-a' 'pkg-split-b') local pkg local pkgbase @@ -55,7 +52,7 @@ testCreateSplitFileLists() { local arch for pkgbase in "${pkgs[@]}"; do - for arch in "${arches[@]}"; do + for arch in "${ARCH_BUILD[@]}"; do releasePackage extra "${pkgbase}" "${arch}" done done @@ -64,7 +61,7 @@ testCreateSplitFileLists() { 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 + for arch in "${ARCH_BUILD[@]}"; do if ! bsdtar -xOf "${FTP_BASE}/extra/os/${arch}/extra${FILESEXT}" | grep -q "usr/bin/${pkgname}"; then fail "usr/bin/${pkgname} not found in ${arch}/extra${FILESEXT}" fi @@ -75,23 +72,22 @@ testCreateSplitFileLists() { testCleanupFileLists() { - local arches=('i686' 'x86_64') local pkgs=('pkg-simple-a' 'pkg-simple-b') local pkgbase local arch for pkgbase in "${pkgs[@]}"; do - for arch in "${arches[@]}"; do + for arch in "${ARCH_BUILD[@]}"; do releasePackage extra "${pkgbase}" "${arch}" done done ../db-update - for arch in "${arches[@]}"; do + for arch in "${ARCH_BUILD[@]}"; do ../db-remove extra "${arch}" pkg-simple-a done - for arch in "${arches[@]}"; do + for arch in "${ARCH_BUILD[@]}"; do if ! bsdtar -xOf "${FTP_BASE}/extra/os/${arch}/extra${FILESEXT}" | grep -q "usr/bin/pkg-simple-b"; then fail "usr/bin/pkg-simple-b not found in ${arch}/extra${FILESEXT}" fi diff --git a/test/test.d/db-move.sh b/test/test.d/db-move.sh index e3207b6..410e222 100755 --- a/test/test.d/db-move.sh +++ b/test/test.d/db-move.sh @@ -4,13 +4,12 @@ curdir=$(readlink -e "$(dirname "$0")") . "${curdir}/../lib/common.inc" testMoveSimplePackages() { - local arches=('i686' 'x86_64') local pkgs=('pkg-simple-a' 'pkg-simple-b') local pkgbase local arch for pkgbase in "${pkgs[@]}"; do - for arch in "${arches[@]}"; do + for arch in "${ARCH_BUILD[@]}"; do releasePackage testing "${pkgbase}" "${arch}" done done @@ -19,7 +18,7 @@ testMoveSimplePackages() { ../db-move testing extra pkg-simple-a - for arch in "${arches[@]}"; do + for arch in "${ARCH_BUILD[@]}"; do checkPackage extra "pkg-simple-a-1-1-${arch}.pkg.tar.xz" "${arch}" checkRemovedPackage testing "pkg-simple-a-1-1-${arch}.pkg.tar.xz" "${arch}" @@ -28,13 +27,12 @@ testMoveSimplePackages() { } testMoveMultiplePackages() { - local arches=('i686' 'x86_64') local pkgs=('pkg-simple-a' 'pkg-simple-b') local pkgbase local arch for pkgbase in "${pkgs[@]}"; do - for arch in "${arches[@]}"; do + for arch in "${ARCH_BUILD[@]}"; do releasePackage testing "${pkgbase}" "${arch}" done done @@ -44,7 +42,7 @@ testMoveMultiplePackages() { ../db-move testing extra pkg-simple-a pkg-simple-b for pkgbase in "${pkgs[@]}"; do - for arch in "${arches[@]}"; do + for arch in "${ARCH_BUILD[@]}"; do checkPackage extra "${pkgbase}-1-1-${arch}.pkg.tar.xz" "${arch}" checkRemovedPackage testing "${pkgbase}-1-1-${arch}.pkg.tar.xz" "${arch}" done @@ -52,13 +50,12 @@ testMoveMultiplePackages() { } testMoveEpochPackages() { - local arches=('i686' 'x86_64') local pkgs=('pkg-simple-epoch') local pkgbase local arch for pkgbase in "${pkgs[@]}"; do - for arch in "${arches[@]}"; do + for arch in "${ARCH_BUILD[@]}"; do releasePackage testing "${pkgbase}" "${arch}" done done @@ -67,7 +64,7 @@ testMoveEpochPackages() { ../db-move testing extra pkg-simple-epoch - for arch in "${arches[@]}"; do + for arch in "${ARCH_BUILD[@]}"; do checkPackage extra "pkg-simple-epoch-1:1-1-${arch}.pkg.tar.xz" "${arch}" checkRemovedPackage testing "pkg-simple-epoch-1:1-1-${arch}.pkg.tar.xz" "${arch}" done @@ -90,14 +87,13 @@ testMoveAnyPackages() { } testMoveSplitPackages() { - local arches=('i686' 'x86_64') local pkgs=('pkg-split-a' 'pkg-split-b') local pkg local pkgbase local arch for pkgbase in "${pkgs[@]}"; do - for arch in "${arches[@]}"; do + for arch in "${ARCH_BUILD[@]}"; do releasePackage testing "${pkgbase}" "${arch}" done done @@ -105,12 +101,12 @@ testMoveSplitPackages() { ../db-update ../db-move testing extra pkg-split-a - for arch in "${arches[@]}"; do + for arch in "${ARCH_BUILD[@]}"; do for pkg in "${pkgdir}/pkg-split-a"/*-"${arch}"${PKGEXT}; do checkPackage extra "${pkg##*/}" "${arch}" done done - for arch in "${arches[@]}"; do + for arch in "${ARCH_BUILD[@]}"; do for pkg in "${pkgdir}/pkg-split-b"/*-"${arch}"${PKGEXT}; do checkPackage testing "${pkg##*/}" "${arch}" done diff --git a/test/test.d/db-remove.sh b/test/test.d/db-remove.sh index fca480c..4fd5548 100755 --- a/test/test.d/db-remove.sh +++ b/test/test.d/db-remove.sh @@ -4,13 +4,12 @@ curdir=$(readlink -e "$(dirname "$0")") . "${curdir}/../lib/common.inc" testRemovePackages() { - local arches=('i686' 'x86_64') local pkgs=('pkg-simple-a' 'pkg-simple-b' 'pkg-split-a' 'pkg-split-b' 'pkg-simple-epoch') local pkgbase local arch for pkgbase in "${pkgs[@]}"; do - for arch in "${arches[@]}"; do + for arch in "${ARCH_BUILD[@]}"; do releasePackage extra "${pkgbase}" "${arch}" done done @@ -18,38 +17,37 @@ testRemovePackages() { ../db-update for pkgbase in "${pkgs[@]}"; do - for arch in "${arches[@]}"; do + for arch in "${ARCH_BUILD[@]}"; do ../db-remove extra "${arch}" "${pkgbase}" done done for pkgbase in "${pkgs[@]}"; do - for arch in "${arches[@]}"; do + for arch in "${ARCH_BUILD[@]}"; do checkRemovedPackage extra "${pkgbase}" "${arch}" done done } testRemoveMultiplePackages() { - local arches=('i686' 'x86_64') local pkgs=('pkg-simple-a' 'pkg-simple-b' 'pkg-split-a' 'pkg-split-b' 'pkg-simple-epoch') local pkgbase local arch for pkgbase in "${pkgs[@]}"; do - for arch in "${arches[@]}"; do + for arch in "${ARCH_BUILD[@]}"; do releasePackage extra "${pkgbase}" "${arch}" done done ../db-update - for arch in "${arches[@]}"; do + for arch in "${ARCH_BUILD[@]}"; do ../db-remove extra "${arch}" "${pkgs[@]}" done for pkgbase in "${pkgs[@]}"; do - for arch in "${arches[@]}"; do + for arch in "${ARCH_BUILD[@]}"; do checkRemovedPackage extra "${pkgbase}" "${arch}" done done diff --git a/test/test.d/db-repo-add.sh b/test/test.d/db-repo-add.sh index 3d83007..776c0a2 100755 --- a/test/test.d/db-repo-add.sh +++ b/test/test.d/db-repo-add.sh @@ -4,13 +4,12 @@ curdir=$(readlink -e "$(dirname "$0")") . "${curdir}/../lib/common.inc" testAddSimplePackages() { - local arches=('i686' 'x86_64') local pkgs=('pkg-simple-a' 'pkg-simple-b') local pkgbase local arch for pkgbase in "${pkgs[@]}"; do - for arch in "${arches[@]}"; do + for arch in "${ARCH_BUILD[@]}"; do cp "${pkgdir}/${pkgbase}/${pkgbase}-1-1-${arch}.pkg.tar.xz" "${FTP_BASE}/${PKGPOOL}/" touch "${FTP_BASE}/${PKGPOOL}/${pkgbase}-1-1-${arch}.pkg.tar.xz.sig" ln -s "${FTP_BASE}/${PKGPOOL}/${pkgbase}-1-1-${arch}.pkg.tar.xz" "${FTP_BASE}/extra/os/${arch}/" @@ -20,19 +19,18 @@ testAddSimplePackages() { done for pkgbase in "${pkgs[@]}"; do - for arch in "${arches[@]}"; do + for arch in "${ARCH_BUILD[@]}"; do checkPackageDB extra "${pkgbase}-1-1-${arch}.pkg.tar.xz" "${arch}" done done } testAddMultiplePackages() { - local arches=('i686' 'x86_64') local pkgs=('pkg-simple-a' 'pkg-simple-b') local pkgbase local arch - for arch in "${arches[@]}"; do + for arch in "${ARCH_BUILD[@]}"; do add_pkgs=() for pkgbase in "${pkgs[@]}"; do cp "${pkgdir}/${pkgbase}/${pkgbase}-1-1-${arch}.pkg.tar.xz" "${FTP_BASE}/${PKGPOOL}/" @@ -45,7 +43,7 @@ testAddMultiplePackages() { done for pkgbase in "${pkgs[@]}"; do - for arch in "${arches[@]}"; do + for arch in "${ARCH_BUILD[@]}"; do checkPackageDB extra "${pkgbase}-1-1-${arch}.pkg.tar.xz" "${arch}" done done diff --git a/test/test.d/db-repo-remove.sh b/test/test.d/db-repo-remove.sh index ce13280..fd69fa7 100755 --- a/test/test.d/db-repo-remove.sh +++ b/test/test.d/db-repo-remove.sh @@ -4,13 +4,12 @@ curdir=$(readlink -e "$(dirname "$0")") . "${curdir}/../lib/common.inc" testRemovePackages() { - local arches=('i686' 'x86_64') 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 + for arch in "${ARCH_BUILD[@]}"; do releasePackage extra "${pkgbase}" "${arch}" done done @@ -18,38 +17,37 @@ testRemovePackages() { ../db-update for pkgbase in "${pkgs[@]}"; do - for arch in "${arches[@]}"; do + for arch in "${ARCH_BUILD[@]}"; do ../db-repo-remove extra "${arch}" "${pkgbase}" done done for pkgbase in "${pkgs[@]}"; do - for arch in "${arches[@]}"; do + for arch in "${ARCH_BUILD[@]}"; do checkRemovedPackageDB extra "${pkgbase}" "${arch}" done done } testRemoveMultiplePackages() { - local arches=('i686' 'x86_64') 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 + for arch in "${ARCH_BUILD[@]}"; do releasePackage extra "${pkgbase}" "${arch}" done done ../db-update - for arch in "${arches[@]}"; do + for arch in "${ARCH_BUILD[@]}"; do ../db-repo-remove extra "${arch}" "${pkgs[@]}" done for pkgbase in "${pkgs[@]}"; do - for arch in "${arches[@]}"; do + for arch in "${ARCH_BUILD[@]}"; do checkRemovedPackageDB extra "${pkgbase}" "${arch}" done done diff --git a/test/test.d/db-update.sh b/test/test.d/db-update.sh index c83d51b..48c243d 100755 --- a/test/test.d/db-update.sh +++ b/test/test.d/db-update.sh @@ -4,13 +4,12 @@ curdir=$(readlink -e "$(dirname "$0")") . "${curdir}/../lib/common.inc" testAddSimplePackages() { - local arches=('i686' 'x86_64') local pkgs=('pkg-simple-a' 'pkg-simple-b') local pkgbase local arch for pkgbase in "${pkgs[@]}"; do - for arch in "${arches[@]}"; do + for arch in "${ARCH_BUILD[@]}"; do releasePackage extra "${pkgbase}" "${arch}" done done @@ -18,7 +17,7 @@ testAddSimplePackages() { ../db-update for pkgbase in "${pkgs[@]}"; do - for arch in "${arches[@]}"; do + for arch in "${ARCH_BUILD[@]}"; do checkPackage extra "${pkgbase}-1-1-${arch}.pkg.tar.xz" "${arch}" done done @@ -52,14 +51,13 @@ testAddAnyPackages() { } testAddSplitPackages() { - local arches=('i686' 'x86_64') local pkgs=('pkg-split-a' 'pkg-split-b') local pkg local pkgbase local arch for pkgbase in "${pkgs[@]}"; do - for arch in "${arches[@]}"; do + for arch in "${ARCH_BUILD[@]}"; do releasePackage extra "${pkgbase}" "${arch}" done done @@ -67,7 +65,7 @@ testAddSplitPackages() { ../db-update for pkgbase in "${pkgs[@]}"; do - for arch in "${arches[@]}"; do + for arch in "${ARCH_BUILD[@]}"; do for pkg in "${pkgdir}/${pkgbase}"/*-"${arch}"${PKGEXT}; do checkPackage extra "${pkg##*/}" "${arch}" done @@ -141,12 +139,11 @@ testUpdateSameAnyPackageToDifferentRepositories() { testAddIncompleteSplitPackage() { - local arches=('i686' 'x86_64') local repo='extra' local pkgbase='pkg-split-a' local arch - for arch in "${arches[@]}"; do + for arch in "${ARCH_BUILD[@]}"; do releasePackage "${repo}" "${pkgbase}" "${arch}" done @@ -155,7 +152,7 @@ testAddIncompleteSplitPackage() { ../db-update >/dev/null 2>&1 && fail "db-update should fail when a split package is missing!" - for arch in "${arches[@]}"; do + for arch in "${ARCH_BUILD[@]}"; do ( [ -r "${FTP_BASE}/${repo}/os/${arch}/${repo}${DBEXT%.tar.*}" ] \ && bsdtar -xf "${FTP_BASE}/${repo}/os/${arch}/${repo}${DBEXT%.tar.*}" -O | grep -q "${pkgbase}") \ && fail "${pkgbase} should not be in ${repo}/os/${arch}/${repo}${DBEXT%.tar.*}" diff --git a/test/test.d/ftpdir-cleanup.sh b/test/test.d/ftpdir-cleanup.sh index 1b075da..6902b9b 100755 --- a/test/test.d/ftpdir-cleanup.sh +++ b/test/test.d/ftpdir-cleanup.sh @@ -4,26 +4,25 @@ curdir=$(readlink -e "$(dirname "$0")") . "${curdir}/../lib/common.inc" testCleanupSimplePackages() { - local arches=('i686' 'x86_64') local pkgs=('pkg-simple-a' 'pkg-simple-b') local pkgbase local arch for pkgbase in "${pkgs[@]}"; do - for arch in "${arches[@]}"; do + for arch in "${ARCH_BUILD[@]}"; do releasePackage extra "${pkgbase}" "${arch}" done done ../db-update - for arch in "${arches[@]}"; do + for arch in "${ARCH_BUILD[@]}"; do ../db-remove extra "${arch}" pkg-simple-a done ../cron-jobs/ftpdir-cleanup >/dev/null - for arch in "${arches[@]}"; do + for arch in "${ARCH_BUILD[@]}"; do local pkg1="pkg-simple-a-1-1-${arch}.pkg.tar.xz" checkRemovedPackage extra 'pkg-simple-a' "${arch}" [ -f "${FTP_BASE}/${PKGPOOL}/${pkg1}" ] && fail "${PKGPOOL}/${pkg1} found" @@ -35,26 +34,25 @@ testCleanupSimplePackages() { } testCleanupEpochPackages() { - local arches=('i686' 'x86_64') local pkgs=('pkg-simple-epoch') local pkgbase local arch for pkgbase in "${pkgs[@]}"; do - for arch in "${arches[@]}"; do + for arch in "${ARCH_BUILD[@]}"; do releasePackage extra "${pkgbase}" "${arch}" done done ../db-update - for arch in "${arches[@]}"; do + for arch in "${ARCH_BUILD[@]}"; do ../db-remove extra "${arch}" pkg-simple-epoch done ../cron-jobs/ftpdir-cleanup >/dev/null - for arch in "${arches[@]}"; do + for arch in "${ARCH_BUILD[@]}"; do local pkg1="pkg-simple-epoch-1:1-1-${arch}.pkg.tar.xz" checkRemovedPackage extra 'pkg-simple-epoch' "${arch}" [ -f "${FTP_BASE}/${PKGPOOL}/${pkg1}" ] && fail "${PKGPOOL}/${pkg1} found" @@ -85,27 +83,26 @@ testCleanupAnyPackages() { } testCleanupSplitPackages() { - local arches=('i686' 'x86_64') local pkgs=('pkg-split-a' 'pkg-split-b') local pkg local pkgbase local arch for pkgbase in "${pkgs[@]}"; do - for arch in "${arches[@]}"; do + for arch in "${ARCH_BUILD[@]}"; do releasePackage extra "${pkgbase}" "${arch}" done done ../db-update - for arch in "${arches[@]}"; do + for arch in "${ARCH_BUILD[@]}"; do ../db-remove extra "${arch}" "${pkgs[0]}" done ../cron-jobs/ftpdir-cleanup >/dev/null - for arch in "${arches[@]}"; do + for arch in "${ARCH_BUILD[@]}"; do for pkg in "${pkgdir}/${pkgs[0]}"/*-"${arch}"${PKGEXT}; do checkRemovedPackage extra "${pkgs[0]}" "${arch}" [ -f "${FTP_BASE}/${PKGPOOL}/${pkg}" ] && fail "${PKGPOOL}/${pkg} found" diff --git a/test/test.d/sourceballs.sh b/test/test.d/sourceballs.sh index 1097ae0..561169e 100755 --- a/test/test.d/sourceballs.sh +++ b/test/test.d/sourceballs.sh @@ -4,13 +4,12 @@ curdir=$(readlink -e "$(dirname "$0")") . "${curdir}/../lib/common.inc" testSourceballs() { - local arches=('i686' 'x86_64') 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 + for arch in "${ARCH_BUILD[@]}"; do releasePackage extra "${pkgbase}" "${arch}" done done @@ -38,14 +37,13 @@ testAnySourceballs() { } testSplitSourceballs() { - local arches=('i686' 'x86_64') local pkgs=('pkg-split-a' 'pkg-split-b') local pkg local pkgbase local arch for pkgbase in "${pkgs[@]}"; do - for arch in "${arches[@]}"; do + for arch in "${ARCH_BUILD[@]}"; do releasePackage extra "${pkgbase}" "${arch}" done done @@ -59,20 +57,19 @@ testSplitSourceballs() { } testSourceballsCleanup() { - local arches=('i686' 'x86_64') local pkgs=('pkg-simple-a' 'pkg-simple-b') local pkgbase local arch for pkgbase in "${pkgs[@]}"; do - for arch in "${arches[@]}"; do + for arch in "${ARCH_BUILD[@]}"; do releasePackage extra "${pkgbase}" "${arch}" done done ../db-update ../cron-jobs/sourceballs - for arch in "${arches[@]}"; do + for arch in "${ARCH_BUILD[@]}"; do ../db-remove extra "${arch}" pkg-simple-a done |