summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeri Harris <keri@gentoo.org>2007-02-01 09:19:08 +0000
committerKeri Harris <keri@gentoo.org>2007-02-01 09:19:08 +0000
commit9ff9e7dbdc2e5d367bbe7a849c49639781ddca58 (patch)
tree50f94f67c524e9d7f93816b9375c74dcad0258ff /dev-lang/tuprolog
parentstable x86; bug #164020 (diff)
downloadgentoo-2-9ff9e7dbdc2e5d367bbe7a849c49639781ddca58.tar.gz
gentoo-2-9ff9e7dbdc2e5d367bbe7a849c49639781ddca58.tar.bz2
gentoo-2-9ff9e7dbdc2e5d367bbe7a849c49639781ddca58.zip
Run Prolog Theory testsuite in src_test()
(Portage version: 2.1.2-r5)
Diffstat (limited to 'dev-lang/tuprolog')
-rw-r--r--dev-lang/tuprolog/ChangeLog6
-rw-r--r--dev-lang/tuprolog/files/build.xml96
-rw-r--r--dev-lang/tuprolog/tuprolog-2.0.1.ebuild15
3 files changed, 73 insertions, 44 deletions
diff --git a/dev-lang/tuprolog/ChangeLog b/dev-lang/tuprolog/ChangeLog
index d62cd756aa1e..1ab0fbdfb5b7 100644
--- a/dev-lang/tuprolog/ChangeLog
+++ b/dev-lang/tuprolog/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for dev-lang/tuprolog
# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-lang/tuprolog/ChangeLog,v 1.9 2007/01/31 07:01:33 keri Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/tuprolog/ChangeLog,v 1.10 2007/02/01 09:19:08 keri Exp $
+
+ 01 Feb 2007; keri <keri@gentoo.org> files/build.xml,
+ tuprolog-2.0.1.ebuild:
+ Run Prolog Theory testsuite in src_test()
*tuprolog-2.0.1 (31 Jan 2007)
diff --git a/dev-lang/tuprolog/files/build.xml b/dev-lang/tuprolog/files/build.xml
index c2a5eb1c98fd..7362ff40ef83 100644
--- a/dev-lang/tuprolog/files/build.xml
+++ b/dev-lang/tuprolog/files/build.xml
@@ -1,55 +1,71 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" ?><project default="jar" name="tuprolog">
-<project name="tuprolog" default="jar">
<!-- some properties -->
- <property name="src.dir" value="src" />
- <property name="build.dir" value="build" />
- <property name="docs.dir" value="docs" />
+ <property name="src.dir" value="src"/>
+ <property name="build.dir" value="build"/>
+ <property name="docs.dir" value="docs"/>
<property name="dist.dir" value="dist"/>
-
+ <property name="test.dir" value="test/unit"/>
+ <property name="test.build.dir" value="test.build"/>
<property name="jarfile" value="${ant.project.name}.jar"/>
-
- <property file="build.properties"/>
+ <property file="build.properties"/>
<!-- init -->
- <target name="init">
- <tstamp/>
- <mkdir dir="${dist.dir}"/>
- <mkdir dir="${build.dir}"/>
- <mkdir dir="${docs.dir}"/>
- </target>
+ <target name="init">
+ <tstamp/>
+ <mkdir dir="${dist.dir}"/>
+ <mkdir dir="${build.dir}"/>
+ <mkdir dir="${docs.dir}"/>
+ <mkdir dir="${test.build.dir}"/>
+ </target>
<!-- compile everything -->
- <target name="compile" depends="init">
- <javac srcdir="${src.dir}" destdir="${build.dir}" classpath="${classpath}" source="1.3" target="1.4" encoding="ISO-8859-1" deprecation="on"/>
- <copy todir="${build.dir}">
- <fileset dir="${src.dir}">
- <exclude name="**/*.java" />
- </fileset>
- </copy>
- </target>
+ <target depends="init" name="compile">
+ <javac classpath="${classpath}" deprecation="on" destdir="${build.dir}" encoding="ISO-8859-1" source="1.4" srcdir="${src.dir}" target="1.4"/>
+ <copy todir="${build.dir}">
+ <fileset dir="${src.dir}">
+ <exclude name="**/*.java"/>
+ </fileset>
+ </copy>
+ </target>
<!-- build the jar file -->
- <target name="jar" depends="compile">
- <jar jarfile="${dist.dir}/${jarfile}" basedir="${build.dir}"/>
- </target>
+ <target depends="compile" name="jar">
+ <jar basedir="${build.dir}" jarfile="${dist.dir}/${jarfile}"/>
+ </target>
<!-- generate javadocs -->
- <target name="javadoc" depends="init">
- <javadoc sourcepath="${src.dir}"
- packagenames="alice.*"
- destdir="${docs.dir}"
- author="true"
- version="true"
- use="true"
- windowtitle="${ant.project.name} API"
- encoding="ISO-8859-1" />
- </target>
+ <target depends="init" name="javadoc">
+ <javadoc author="true" destdir="${docs.dir}" encoding="ISO-8859-1" packagenames="alice.*" source="1.4" sourcepath="${src.dir}" use="true" version="true" windowtitle="${ant.project.name} API"/>
+ </target>
<!-- clean up -->
- <target name="clean">
- <delete dir="${build.dir}"/>
- <delete dir="${dist.dir}"/>
- <delete dir="${docs.dir}"/>
- </target>
+ <target name="clean">
+ <delete dir="${build.dir}"/>
+ <delete dir="${dist.dir}"/>
+ <delete dir="${docs.dir}"/>
+ <delete dir="${test.build.dir}"/>
+ </target>
+
+ <!-- run testsuite -->
+ <target name="test">
+ <path id="dist.classpath">
+ <fileset dir="${dist.dir}">
+ <include name="*.jar"/>
+ </fileset>
+ </path>
+ <javac classpathref="dist.classpath" deprecation="on" destdir="${test.build.dir}" encoding="ISO-8859-1" source="1.4" srcdir="${test.dir}" target="1.4"/>
+ <junit haltonfailure="on" showoutput="no" printsummary="yes">
+ <classpath>
+ <path refid="dist.classpath"/>
+ <pathelement path="${test.build.dir}"/>
+ </classpath>
+ <formatter type="xml"/>
+ <batchtest todir="${test.build.dir}">
+ <fileset dir="${test.build.dir}">
+ <include name="**/*TestCase.class"/>
+ </fileset>
+ </batchtest>
+ </junit>
+ </target>
</project>
diff --git a/dev-lang/tuprolog/tuprolog-2.0.1.ebuild b/dev-lang/tuprolog/tuprolog-2.0.1.ebuild
index 93b7ce89fd23..f562702e3a88 100644
--- a/dev-lang/tuprolog/tuprolog-2.0.1.ebuild
+++ b/dev-lang/tuprolog/tuprolog-2.0.1.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-lang/tuprolog/tuprolog-2.0.1.ebuild,v 1.1 2007/01/31 07:01:33 keri Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/tuprolog/tuprolog-2.0.1.ebuild,v 1.2 2007/02/01 09:19:08 keri Exp $
inherit eutils java-pkg-2 java-ant-2
@@ -14,11 +14,13 @@ SRC_URI="http://www.alice.unibo.it/download/tuprolog/files/core/2p-2.0.1.zip"
LICENSE="LGPL-2.1"
SLOT="0"
KEYWORDS="~ppc ~x86"
-IUSE="doc"
+IUSE="doc test"
DEPEND=">=virtual/jdk-1.4
app-arch/unzip
- dev-java/ant-core"
+ dev-java/ant-core
+ test? ( dev-java/ant-tasks
+ dev-java/junit )"
RDEPEND=">=virtual/jdk-1.4"
S="${WORKDIR}"
@@ -36,6 +38,13 @@ src_compile() {
eant jar $(use_doc)
}
+src_test() {
+ cd "${S}"/dist
+ java-pkg_jar-from junit
+ cd "${S}"
+ eant test || die "eant test failed"
+}
+
src_install() {
java-pkg_dojar dist/${PN}.jar