From 4214e9bfe0c17c5d39be63457cba8c537a14e96c Mon Sep 17 00:00:00 2001 From: Dominik Schmidt Date: Fri, 4 Oct 2019 14:39:08 +0000 Subject: [PATCH] Extend the testsuite to also check whether dotgentoo initialization/update works --- .../tests/30_test_dotgentoo_initialize.sh | 19 ++++++++++ .../32_test_dotgentoo_initialize_existing.sh | 11 ++++++ gebuilder/tests/34_test_dotgentoo_update.sh | 11 ++++++ .../dev-util/numdiff/numdiff-5.9.0.ebuild | 36 +++++++++++++++++++ 4 files changed, 77 insertions(+) create mode 100755 gebuilder/tests/30_test_dotgentoo_initialize.sh create mode 100755 gebuilder/tests/32_test_dotgentoo_initialize_existing.sh create mode 100755 gebuilder/tests/34_test_dotgentoo_update.sh create mode 100755 gebuilder/tests/dotgentoos/.gentoo/dev-util/numdiff/numdiff-5.9.0.ebuild diff --git a/gebuilder/tests/30_test_dotgentoo_initialize.sh b/gebuilder/tests/30_test_dotgentoo_initialize.sh new file mode 100755 index 0000000..af7fb08 --- /dev/null +++ b/gebuilder/tests/30_test_dotgentoo_initialize.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +RET=0 + +DOTGENTOO="${GEBUILDER_ROOT}/tests/dotgentoos/.gentoo" + +DOTGENTOO_ID="$(get_dotgentoo_id "${DOTGENTOO}")" +"$GEBUILDER_ENTRY" "${DOTGENTOO}" initialize +if [ "$?" -eq 0 ] +then + error "Initialization of .gentoo failed" + RET=1 +fi + +if [ "roots/${DOTGENTOO_ID}/root/usr/include/gmp.h" ] +then + error "GMP dependency not pulled in" + RET=1 +fi diff --git a/gebuilder/tests/32_test_dotgentoo_initialize_existing.sh b/gebuilder/tests/32_test_dotgentoo_initialize_existing.sh new file mode 100755 index 0000000..4bab831 --- /dev/null +++ b/gebuilder/tests/32_test_dotgentoo_initialize_existing.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +RET=0 + +"$GEBUILDER_ENTRY" "${DOTGENTOO}" initialize +if [ "$?" -eq 1 ] +then + error "Second initialization of .gentoo succeeded where it should have failed" + RET=1 +fi + diff --git a/gebuilder/tests/34_test_dotgentoo_update.sh b/gebuilder/tests/34_test_dotgentoo_update.sh new file mode 100755 index 0000000..16e6462 --- /dev/null +++ b/gebuilder/tests/34_test_dotgentoo_update.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +RET=0 + +"$GEBUILDER_ENTRY" "${DOTGENTOO}" update +if [ "$?" -eq 0 ] +then + error "Updating of .gentoo failed" + RET=1 +fi + diff --git a/gebuilder/tests/dotgentoos/.gentoo/dev-util/numdiff/numdiff-5.9.0.ebuild b/gebuilder/tests/dotgentoos/.gentoo/dev-util/numdiff/numdiff-5.9.0.ebuild new file mode 100755 index 0000000..bc2cd00 --- /dev/null +++ b/gebuilder/tests/dotgentoos/.gentoo/dev-util/numdiff/numdiff-5.9.0.ebuild @@ -0,0 +1,36 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit autotools + +DESCRIPTION="File comparision, ignoring small numeric differences and formats" +HOMEPAGE="http://www.nongnu.org/numdiff/" +SRC_URI="http://savannah.nongnu.org/download/numdiff/${P}.tar.gz" + +LICENSE="GPL-3+" +SLOT="0" +KEYWORDS="amd64 x86" +IUSE="+nls +gmp" + +RDEPEND=" + gmp? ( dev-libs/gmp:0= ) + nls? ( sys-devel/gettext ) + !dev-util/ndiff" +DEPEND="${RDEPEND}" + +src_prepare() { + default + # yes, it really only needs eautoconf, due to the + # config.h being hand-written, which would be bulldozered + # when running eautoreconf (due to it invoking autoheader) + eautoconf +} + +src_configure() { + econf \ + --enable-optimization \ + $(use_enable gmp) \ + $(use_enable nls) +}