From 14c69e309503662b709e4a066ca6b7deb8b27195 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Sun, 17 Apr 2016 12:25:50 -0400 Subject: Sync test/ with lukeshu/archlinux+cleanup+librelib again. --- test/lib/common.inc | 4 ++-- test/test.d/create-filelists.sh | 10 +++++----- test/test.d/db-update.sh | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/test/lib/common.inc b/test/lib/common.inc index 954868b..bef8749 100644 --- a/test/lib/common.inc +++ b/test/lib/common.inc @@ -35,7 +35,7 @@ oneTimeSetUp() { pushd "$d" >/dev/null pkgname=($(. PKGBUILD; echo "${pkgname[@]}")) pkgarch=($(. PKGBUILD; echo "${arch[@]}")) - pkgversion=$(. PKGBUILD; get_full_version "${epoch:-0}" "${pkgver}" "${pkgrel}") + pkgversion=$(. PKGBUILD; get_full_version) build=true for a in "${pkgarch[@]}"; do @@ -140,7 +140,7 @@ releasePackage() { pushd "${TMP}/svn-packages-copy/${pkgbase}/trunk/" >/dev/null archrelease "${repo}-${arch}" >/dev/null 2>&1 - pkgver=$(. PKGBUILD; get_full_version "${epoch:-0}" "${pkgver}" "${pkgrel}") + pkgver=$(. PKGBUILD; get_full_version) pkgname=($(. PKGBUILD; echo "${pkgname[@]}")) popd >/dev/null cp "${pkgdir}/${pkgbase}"/*-"${pkgver}-${arch}"${PKGEXT} "${STAGING}/${repo}/" diff --git a/test/test.d/create-filelists.sh b/test/test.d/create-filelists.sh index 21bf292..20dafc6 100755 --- a/test/test.d/create-filelists.sh +++ b/test/test.d/create-filelists.sh @@ -17,7 +17,7 @@ testCreateSimpleFileLists() { for pkgbase in "${pkgs[@]}"; do for arch in "${ARCH_BUILD[@]}"; do - if ! bsdtar -xOf "${FTP_BASE}/extra/os/${arch}/extra${FILESEXT}" | grep -q "usr/bin/${pkgbase}"; then + 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 @@ -36,7 +36,7 @@ testCreateAnyFileLists() { for pkgbase in "${pkgs[@]}"; do for arch in "${ARCH_BUILD[@]}"; do - if ! bsdtar -xOf "${FTP_BASE}/extra/os/${arch}/extra${FILESEXT}" | grep -q "usr/share/${pkgbase}/test"; then + 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 @@ -62,7 +62,7 @@ testCreateSplitFileLists() { 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 -q "usr/bin/${pkgname}"; then + 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 @@ -88,10 +88,10 @@ testCleanupFileLists() { done for arch in "${ARCH_BUILD[@]}"; do - if ! bsdtar -xOf "${FTP_BASE}/extra/os/${arch}/extra${FILESEXT}" | grep -q "usr/bin/pkg-simple-b"; then + 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 -q "usr/bin/pkg-simple-a"; then + 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 diff --git a/test/test.d/db-update.sh b/test/test.d/db-update.sh index ca4efe7..540eccf 100755 --- a/test/test.d/db-update.sh +++ b/test/test.d/db-update.sh @@ -132,7 +132,7 @@ testUpdateSameAnyPackageToDifferentRepositories() { local arch for arch in i686 x86_64; do ( [ -r "${FTP_BASE}/testing/os/${arch}/testing${DBEXT%.tar.*}" ] \ - && bsdtar -xf "${FTP_BASE}/testing/os/${arch}/testing${DBEXT%.tar.*}" -O | grep -q "${pkgbase}") \ + && bsdtar -xf "${FTP_BASE}/testing/os/${arch}/testing${DBEXT%.tar.*}" -O | grep "${pkgbase}" &>/dev/null) \ && fail "${pkgbase} should not be in testing/os/${arch}/testing${DBEXT%.tar.*}" done } @@ -154,7 +154,7 @@ testAddIncompleteSplitPackage() { 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}") \ + && bsdtar -xf "${FTP_BASE}/${repo}/os/${arch}/${repo}${DBEXT%.tar.*}" -O | grep "${pkgbase}" &>/dev/null) \ && fail "${pkgbase} should not be in ${repo}/os/${arch}/${repo}${DBEXT%.tar.*}" done } -- cgit v1.2.3