[jboss-cvs] JBossAS SVN: r91897 - trunk/testsuite.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Fri Jul 31 15:09:34 EDT 2009


Author: pgier
Date: 2009-07-31 15:09:33 -0400 (Fri, 31 Jul 2009)
New Revision: 91897

Modified:
   trunk/testsuite/build.xml
Log:
[JBBUILD-536] Remove testsuite dependency on build-common.xml.

Modified: trunk/testsuite/build.xml
===================================================================
--- trunk/testsuite/build.xml	2009-07-31 19:00:25 UTC (rev 91896)
+++ trunk/testsuite/build.xml	2009-07-31 19:09:33 UTC (rev 91897)
@@ -14,11 +14,76 @@
 <project default="main" name="JBoss/Testsuite"
          xmlns:server="http://jboss.org/ns/test/ant/server"
          xmlns:maven="antlib:org.apache.maven.artifact.ant">
-   <import file="../tools/etc/buildmagic/build-common.xml"/>
+   
+  <!-- Define the environment variable prefix. This needs to be first. -->
+  <property environment="env"/>
 
-   <!-- Tests requiring separate server configurations -->
-   <import file="imports/config/configs.xml"/>
+  <!-- Setup the project environment. -->
+  <dirname property="project.root" file="${basedir}"/>
+  <property name="project.tools" value="${project.root}/tools"/>
 
+  <import file="${project.tools}/etc/buildmagic/version-info.xml"/>
+
+  <!-- Load common task properties -->
+  <property file="${project.tools}/etc/buildmagic/task.properties"/>
+  
+  <!-- Setup the module environment. -->
+  <property name="module.root" value="${basedir}"/>
+  <property file="${module.root}/local.properties"/>
+  <property name="module.source" value="${module.root}/src"/>
+  <property name="module.output" value="${module.root}/output"/>
+  
+  <property name="/" value="${file.separator}"/>
+
+  <!-- Tests requiring separate server configurations -->
+  <import file="imports/config/configs.xml"/>
+
+  <!-- ======================================================== -->
+  <!-- Check current environment                                -->
+  <!-- ======================================================== -->
+ <target name="check-env">
+   
+   <!-- Make sure we have the right version of Ant -->
+   <property name="ant16.baseversion" value="1.6"/>
+   <property name="ant17.baseversion" value="1.7"/>
+
+   <!--
+      | Add new conditions for other supported Ant versions when they
+      | become avaialble.
+    -->
+
+   <condition property="ant.compatible">
+     <or>
+       <contains string="${ant.version}"
+             substring="Ant version ${ant16.baseversion}"/>
+       <contains string="${ant.version}"
+             substring="Ant version ${ant17.baseversion}"/>
+     </or>
+   </condition>
+
+   <fail unless="ant.compatible">
+   Unsupported Ant version: ${ant.version}
+   Please install a version which is compatible with Ant ${ant16.baseversion}.
+   </fail>
+
+   <!-- JDK Detection -->
+   <available classname="java.lang.StrictMath" property="HAVE_JDK_1.3"/>
+   <available classname="java.lang.StackTraceElement" property="HAVE_JDK_1.4"/>
+   <available classname="java.lang.Enum" property="HAVE_JDK_1.5"/>
+   <available classname="java.lang.management.LockInfo" property="HAVE_JDK_1.6"/>
+   
+   <!--JDK Vendor Detection -->
+   <condition property="IBM_JDK">
+     <not>
+       <available classname="com.sun.net.ssl.internal.ssl.Provider"/>
+     </not>
+   </condition>
+
+   <fail message="The testsuite build requires JDK1.6" unless="HAVE_JDK_1.6"/>
+     
+ </target>
+  
+  
    <!-- ======================================================== -->
    <!-- Initialization                                           -->
    <!-- ======================================================== -->
@@ -460,7 +525,6 @@
    </propertyset>
 
   <target name="init-maven-ant-tasks" unless="init-maven-ant-tasks.target.complete">
-    <fail message="You need to use JDK1.6" unless="HAVE_JDK_1.6"/>
     <path id="maven-ant-tasks.classpath" path="../tools/maven/ant-tasks/maven-ant-tasks-2.1.0-SNAPSHOT.jar" />
     <typedef resource="org/apache/maven/artifact/ant/antlib.xml"
              uri="antlib:org.apache.maven.artifact.ant"
@@ -506,7 +570,7 @@
     <property name="init-dependencies.target.complete" value="true"/>
   </target>
     
-   <target name="init" depends="init-paths, server-config" unless="init.target.complete">
+   <target name="init" depends="check-env, init-paths, server-config" unless="init.target.complete">
       <record name="${basedir}/build.log" append="yes" action="start" loglevel="error"/>
       <mkdir dir="${build.gen-src}/org/jboss/test/cts/ejb"/>
       <mkdir dir="${build.gen-src}/org/jboss/test/cts/interfaces"/>
@@ -703,19 +767,36 @@
    <!-- Propagate the dist directory as a jbosstest system property -->
    <property name="jbosstest.dist" value="${jboss.dist}"/>
 
-   <!-- ================================================================== -->
-   <!-- Cleaning                                                           -->
-   <!-- ================================================================== -->
+  <!-- ================================================================== -->
+  <!-- Cleaning                                             -->
+  <!-- ================================================================== -->
+  
+  <target name="clean" description="Cleans up most generated files.">
+    
+    <delete includeEmptyDirs="true" quiet="true">
+      <fileset dir="${module.output}">
+        <exclude name="eclipse-classes/**"/>
+      </fileset>
+    </delete>
 
-   <!-- Clean up all build output -->
-   <target name="clean" depends="_default:clean"
-      description="Cleans up most generated files."/>
+  </target>
 
-   <!-- Clean up all build output -->
-   <target name="clobber" depends="_default:clobber"
-     description="Cleans up all generated files.">
-   </target>
+  <!-- Clean up all build output -->
+  <target name="clobber" description="Cleans up all generated files.">
+    
+    <delete dir="${module.output}"/>
 
+    <!-- Try to stop the build log before we delete the file. -->
+    <record name="${module.root}/build.log" action="stop"/>
+
+    <!-- 
+       | This file may be opened still due and fail to be removed on win32
+       | systems, so lets just ignore those errors for now.
+     -->
+    <delete file="${module.root}/build.log" quiet="true" failonerror="false"/>
+
+  </target>
+
    <!-- ================================================================== -->
    <!-- Misc.                                                              -->
    <!-- ================================================================== -->




More information about the jboss-cvs-commits mailing list