[Dev] [dbscripts] [PATCH 16/31] Remove test for file database as this feature was moved to pacman/repo-add a long time ago

Luke Shumaker lukeshu at lukeshu.com
Fri Apr 6 18:43:49 GMT 2018


From: Pierre Schmitz <pierre at archlinux.de>

(cherry picked from commit f3cf9ff346afc960ccad843e44c1c71334cc84ee)
---
 test/cases/create-filelists.bats | 95 ----------------------------------------
 test/lib/common.bash             |  5 ---
 2 files changed, 100 deletions(-)
 delete mode 100755 test/cases/create-filelists.bats

diff --git a/test/cases/create-filelists.bats b/test/cases/create-filelists.bats
deleted file mode 100755
index b7fa015..0000000
--- a/test/cases/create-filelists.bats
+++ /dev/null
@@ -1,95 +0,0 @@
-load ../lib/common
-
- at test "create simple file lists" {
-	local pkgs=('pkg-simple-a' 'pkg-simple-b' 'pkg-simple-epoch')
-	local pkgbase
-	local arch
-
-	for pkgbase in "${pkgs[@]}"; do
-		for arch in "${ARCH_BUILD[@]}"; do
-			releasePackage extra "${pkgbase}" "${arch}"
-		done
-	done
-	db-update
-
-	for pkgbase in "${pkgs[@]}"; do
-		for arch in "${ARCH_BUILD[@]}"; do
-			if ! bsdtar -xOf "${FTP_BASE}/extra/os/${arch}/extra${FILESEXT}" | grep "usr/bin/${pkgbase}" &>/dev/null; then
-				die "usr/bin/${pkgbase} not found in ${arch}/extra${FILESEXT}"
-			fi
-		done
-	done
-}
-
- at test "create any file lists" {
-	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 "${ARCH_BUILD[@]}"; do
-			if ! bsdtar -xOf "${FTP_BASE}/extra/os/${arch}/extra${FILESEXT}" | grep "usr/share/${pkgbase}/test" &>/dev/null; then
-				die "usr/share/${pkgbase}/test not found in ${arch}/extra${FILESEXT}"
-			fi
-		done
-	done
-}
-
- at test "create split file lists" {
-	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 "${ARCH_BUILD[@]}"; 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 "${ARCH_BUILD[@]}"; do
-				if ! bsdtar -xOf "${FTP_BASE}/extra/os/${arch}/extra${FILESEXT}" | grep "usr/bin/${pkgname}" &>/dev/null; then
-					die "usr/bin/${pkgname} not found in ${arch}/extra${FILESEXT}"
-				fi
-			done
-		done
-	done
-}
-
- at test "cleanup file lists" {
-	local pkgs=('pkg-simple-a' 'pkg-simple-b')
-	local pkgbase
-	local arch
-
-	for pkgbase in "${pkgs[@]}"; do
-		for arch in "${ARCH_BUILD[@]}"; do
-			releasePackage extra "${pkgbase}" "${arch}"
-		done
-	done
-	db-update
-
-	for arch in "${ARCH_BUILD[@]}"; do
-		db-remove extra "${arch}" pkg-simple-a
-	done
-
-	for arch in "${ARCH_BUILD[@]}"; do
-		if ! bsdtar -xOf "${FTP_BASE}/extra/os/${arch}/extra${FILESEXT}" | grep "usr/bin/pkg-simple-b" &>/dev/null; then
-			die "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
-			die "usr/bin/pkg-simple-a still found in ${arch}/extra${FILESEXT}"
-		fi
-	done
-
-}
diff --git a/test/lib/common.bash b/test/lib/common.bash
index 936c7c5..e895fb3 100644
--- a/test/lib/common.bash
+++ b/test/lib/common.bash
@@ -3,11 +3,6 @@
 . /usr/share/makepkg/util.sh
 . "$(dirname "${BASH_SOURCE[0]}")"/../test.conf
 
-die() {
-	echo "$*" >&2
-	exit 1
-}
-
 __getCheckSum() {
 	local result
 	result="$(sha1sum "$1")"
-- 
2.16.2




More information about the Dev mailing list