summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2005-12-26 06:46:58 +0000
committerRobin H. Johnson <robbat2@gentoo.org>2005-12-26 06:46:58 +0000
commitde02d3004fafecf5b04076acb8c7310778cd768b (patch)
treea94b32607499e640ed522bb13fde97b6c117d685 /eclass/db.eclass
parentneeds stock icons to run correctly (bug #116746) (diff)
downloadhistorical-de02d3004fafecf5b04076acb8c7310778cd768b.tar.gz
historical-de02d3004fafecf5b04076acb8c7310778cd768b.tar.bz2
historical-de02d3004fafecf5b04076acb8c7310778cd768b.zip
Add src_test support for sys-libs/db. WARNING this can take 6+ hours!.
Diffstat (limited to 'eclass/db.eclass')
-rw-r--r--eclass/db.eclass22
1 files changed, 21 insertions, 1 deletions
diff --git a/eclass/db.eclass b/eclass/db.eclass
index 2511c12d67b1..30c31d3562a4 100644
--- a/eclass/db.eclass
+++ b/eclass/db.eclass
@@ -1,10 +1,12 @@
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/db.eclass,v 1.20 2005/07/11 15:08:06 swegener Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/db.eclass,v 1.21 2005/12/26 06:46:58 robbat2 Exp $
# This is a common location for functions used in the sys-libs/db ebuilds
IUSE="doc"
+EXPORT_FUNCTIONS src_test
+
db_fix_so () {
cd ${ROOT}/usr/lib
@@ -92,3 +94,21 @@ db_src_install_usrlibcleanup() {
rm -f ${D}/usr/include/db.h ${D}/usr/include/db_185.h
}
+
+db_src_test() {
+ if has test $FEATURES; then
+ if useq tcltk; then
+ einfo "Running sys-libs/db testsuite"
+ ewarn "This can take 6+ hours on modern machines"
+ cd ${S}
+ echo 'source ../test/test.tcl' >testrunner.tcl
+ echo 'run_std' >>testrunner.tcl
+ tclsh testrunner.tcl
+ egrep -sv '^FAIL' ALL.OUT
+ ret=$?
+ [ $ret -gt 0 ] && die "Some tests failed, please see ${S}/ALL.OUT"
+ else
+ eerror "You must have USE=tcltk to run the sys-libs/db testsuite."
+ fi
+ fi
+}