summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorCiaran McCreesh <ciaranm@gentoo.org>2004-07-31 15:23:08 +0000
committerCiaran McCreesh <ciaranm@gentoo.org>2004-07-31 15:23:08 +0000
commit971e7c36420cf44ad082aab8c2525a163ab715a8 (patch)
tree4703b23c7030113c533d0c29c5e24d352752b419 /eclass
parentWrong bug number, real one was #44365. (Manifest recommit) (diff)
downloadgentoo-2-971e7c36420cf44ad082aab8c2525a163ab715a8.tar.gz
gentoo-2-971e7c36420cf44ad082aab8c2525a163ab715a8.tar.bz2
gentoo-2-971e7c36420cf44ad082aab8c2525a163ab715a8.zip
add in a src_test(), bug #55905
Diffstat (limited to 'eclass')
-rw-r--r--eclass/vim.eclass48
1 files changed, 47 insertions, 1 deletions
diff --git a/eclass/vim.eclass b/eclass/vim.eclass
index f432ac91daef..d93909698d8b 100644
--- a/eclass/vim.eclass
+++ b/eclass/vim.eclass
@@ -1,11 +1,12 @@
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/vim.eclass,v 1.62 2004/07/21 16:30:28 ciaranm Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/vim.eclass,v 1.63 2004/07/31 15:23:08 ciaranm Exp $
# Authors:
# Ryan Phillips <rphillips@gentoo.org>
# Seemant Kulleen <seemant@gentoo.org>
# Aron Griffis <agriffis@gentoo.org>
+# Ciaran McCreesh <ciaranm@gentoo.org>
inherit eutils vim-doc flag-o-matic
ECLASS=vim
@@ -386,3 +387,48 @@ pkg_postrm() {
# Make convenience symlinks
update_vim_symlinks
}
+
+src_test() {
+
+ if [ "${PN}" == "vim-core" ] ; then
+ einfo "No testing needs to be done for vim-core"
+ return
+ fi
+
+ einfo " "
+ einfo "Starting vim tests. Several error messages will be shown "
+ einfo "whilst the tests run. This is normal behaviour and does not "
+ einfo "indicate a fault."
+ einfo " "
+ ewarn "If the tests fail, your terminal may be left in a strange "
+ ewarn "state. Usually, running 'reset' will fix this."
+ ewarn " "
+ sleep 5
+
+ # Don't let vim talk to X
+ unset DISPLAY
+
+ if [ "${PN}" == "gvim" ] ; then
+ # Make gvim not try to connect to X. See :help gui-x11-start
+ # in vim for how this evil trickery works.
+ ln -s ${S}/src/gvim ${S}/src/testvim
+ testprog="../testvim"
+ else
+ testprog="../vim"
+ fi
+
+ # We've got to call make test from within testdir, since the Makefiles
+ # don't pass through our VIMPROG argument
+ cd ${S}/src/testdir
+
+ # Test 49 won't work inside a portage environment
+ sed -i -e 's~test49.out~~g' Makefile
+
+ # We don't want to rebuild vim before running the tests
+ sed -i -e 's,: \$(VIMPROG),: ,' Makefile
+
+ # Don't try to do the additional GUI test
+ make VIMPROG=${testprog} nongui \
+ || die "At least one test failed"
+}
+