Skip to content

Commit

Permalink
Extend the testsuite to also check whether dotgentoo initialization/u…
Browse files Browse the repository at this point in the history
…pdate works
  • Loading branch information
Doeme committed Oct 4, 2019
1 parent 6277bcb commit 4214e9b
Show file tree
Hide file tree
Showing 4 changed files with 77 additions and 0 deletions.
19 changes: 19 additions & 0 deletions gebuilder/tests/30_test_dotgentoo_initialize.sh
Original file line number Diff line number Diff line change
@@ -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
11 changes: 11 additions & 0 deletions gebuilder/tests/32_test_dotgentoo_initialize_existing.sh
Original file line number Diff line number Diff line change
@@ -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

11 changes: 11 additions & 0 deletions gebuilder/tests/34_test_dotgentoo_update.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash

RET=0

"$GEBUILDER_ENTRY" "${DOTGENTOO}" update
if [ "$?" -eq 0 ]
then
error "Updating of .gentoo failed"
RET=1
fi

Original file line number Diff line number Diff line change
@@ -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)
}

0 comments on commit 4214e9b

Please sign in to comment.