changeset 3:b3f1ec02cea7

7902091: Enhance Jemmy v3 infrastructure
author shurailine
date Wed, 03 Jan 2018 08:05:06 -0800
parents 5c1eb9ef0c6a
children 1d98600736c5
files core/JemmyAWTInput/build.xml core/JemmyCore/build.xml core/make/build_template.xml core/make/jemmy-v3-ii/.idea/compiler.xml core/make/jemmy-v3-ii/.idea/copyright/Oracle.xml core/make/jemmy-v3-ii/.idea/encodings.xml core/make/jemmy-v3-ii/.idea/misc.xml core/make/jemmy-v3-ii/.idea/modules.xml core/make/jemmy-v3-ii/awt-input/awt-input.iml core/make/jemmy-v3-ii/core/core.iml core/make/jemmy-v3-ii/jemmy-v3-ii.iml
diffstat 11 files changed, 194 insertions(+), 124 deletions(-) [+]
line wrap: on
line diff
--- a/core/JemmyAWTInput/build.xml	Tue Jan 02 08:41:20 2018 -0800
+++ b/core/JemmyAWTInput/build.xml	Wed Jan 03 08:05:06 2018 -0800
@@ -21,73 +21,20 @@
  or visit www.oracle.com if you need additional information or have any
  questions.
  -->
-<project name="jemmy" default="compile" basedir=".">
-    <property name="src.dir" location="src"/>
-    <property name="test.dir" location="test"/>
-    <property name="build.dir" location="build"/>
-    <property name="build.classes.dir" location="${build.dir}/classes"/>
-    <property name="build.test.dir" location="${build.dir}/test"/>
-    <property name="dist.jar" location="${build.dir}/JemmyCore.jar"/>
-    <property name="test.list" location="${build.dir}/testlist"/>
-    <property name="test.workdir" location="${build.dir}/test_wd"/>
-    <property name="test.report" location="${build.dir}/test_report"/>
+<project name="jemmy-awt-input" default="compile" basedir=".">
+    <import file="${basedir}/../make/build_template.xml"/>
     <property name="core.jar" location="../JemmyCore/build/JemmyCore.jar"/>
-    <target name="timestamp" unless="buildnumber">
-        <tstamp>
-            <format property="buildnumber" pattern="yyyyMMdd"/>
-        </tstamp>
-    </target>
-    <target name="check-core">
+    <property name="version.file" value="org/jemmy/input/jemmy.properties"/>
+    <property name="version.class" value="org.jemmy.input.Version"/>
+    <property name="dependencies.classpath" value="${core.jar}"/>
+    <target name="check-dependecies-impl">
         <available file="${core.jar}" property="dependencies.are.built"/>
     </target>
-    <target name="build-dependencies" depends="check-core" unless="dependencies.are.built">
-        <ant dir="../JemmyCore" target="jar"/>
+    <target name="build-dependecies-impl">
+        <ant dir="${basedir}/../JemmyCore" target="jar" inheritAll="false"/>
     </target>
-    <target name="compile" depends="timestamp,build-dependencies">
-        <mkdir dir="${build.classes.dir}"/>
-        <javac srcdir="${src.dir}" classpath="${core.jar}" destdir="${build.classes.dir}" debug="on" includeantruntime="false"/>
-        <copy file="${src.dir}/org/jemmy/input/jemmy.properties" tofile="${build.classes.dir}/org/jemmy/input/jemmy.properties" filtering="on"/>
-        <echo message="build=${buildnumber}" file="${build.classes.dir}/org/jemmy/input/jemmy.properties" append="true"/>
-    </target>
-    <target name="compile-test" depends="compile">
-        <fail message="Please specify jtreg.home" unless="jtreg.home"/>
-        <mkdir dir="${build.test.dir}"/>
-        <javac srcdir="${test.dir}" destdir="${build.test.dir}" debug="on" includeantruntime="false"
-               classpath="${build.classes.dir}:${core.jar}:${jtreg.home}/lib/testng.jar"/>
-    </target>
-    <target name="find-tests" unless="tests">
-        <fileset id="testset" dir="${test.dir}">
-            <include name="**/*Test.java" />
-        </fileset>
-        <pathconvert pathsep="${line.separator}" property="testlist" refid="testset">
-            <globmapper from="${test.dir}/*" to="*"/>
-        </pathconvert>
-        <echo file="${test.list}">${testlist}</echo>
-        <property name="tests" value="@${test.list}"/>
-    </target>
-    <target name="test" depends="compile-test,find-tests">
-        <exec executable="${jtreg.home}/bin/jtreg">
-            <arg value="-cpa:${build.classes.dir}:${core.jar}"/>
-            <arg value="-w:${test.workdir}"/>
-            <arg value="-r:${test.report}"/>
-            <arg value="-conc:1"/>
-            <arg value="-ovm"/>
-            <arg value="-v:default"/>
-            <arg value="-dir:test"/>
-            <arg value="${tests}"/>
-        </exec>
-    </target>
-    <target name="jar" depends="compile">
-        <mkdir dir="${build.dir}"/>
-        <jar jarfile="${dist.jar}" basedir="${build.classes.dir}">
-            <manifest>
-                <attribute name="Main-Class"
-                    value="org.jemmy.input.Version"/>
-            </manifest>
-        </jar>
-    </target>
-    <target name="clean">
-        <delete dir="${build.dir}"/>
+    <target name="test-dependecies-impl">
+        <ant dir="${basedir}/../JemmyCore" target="test" inheritAll="false"/>
     </target>
 </project>
 
--- a/core/JemmyCore/build.xml	Tue Jan 02 08:41:20 2018 -0800
+++ b/core/JemmyCore/build.xml	Wed Jan 03 08:05:06 2018 -0800
@@ -21,67 +21,14 @@
  or visit www.oracle.com if you need additional information or have any
  questions.
  -->
-<project name="jemmy" default="compile" basedir=".">
-    <property name="src.dir" location="src"/>
-    <property name="test.dir" location="test"/>
-    <property name="build.dir" location="build"/>
-    <property name="build.classes.dir" location="${build.dir}/classes"/>
-    <property name="build.test.dir" location="${build.dir}/test"/>
-    <property name="dist.jar" location="${build.dir}/JemmyCore.jar"/>
-    <property name="test.list" location="${build.dir}/testlist"/>
-    <property name="test.workdir" location="${build.dir}/test_wd"/>
-    <property name="test.report" location="${build.dir}/test_report"/>
-    <target name="timestamp" unless="buildnumber">
-        <tstamp>
-            <format property="buildnumber" pattern="yyyyMMdd"/>
-        </tstamp>
-    </target>
-    <target name="compile" depends="timestamp">
-        <mkdir dir="${build.classes.dir}"/>
-        <javac srcdir="${src.dir}" destdir="${build.classes.dir}" debug="on" includeantruntime="false"/>
-        <copy file="${src.dir}/org/jemmy/jemmy.properties" tofile="${build.classes.dir}/org/jemmy/jemmy.properties" filtering="on"/>
-        <echo message="build=${buildnumber}" file="${build.classes.dir}/org/jemmy/jemmy.properties" append="true"/>
-    </target>
-    <target name="compile-test" depends="compile">
-        <fail message="Please specify jtreg.home" unless="jtreg.home"/>
-        <mkdir dir="${build.test.dir}"/>
-        <javac srcdir="${test.dir}" destdir="${build.test.dir}" debug="on" includeantruntime="false"
-               classpath="${build.classes.dir}:${jtreg.home}/lib/testng.jar"/>
-    </target>
-    <target name="find-tests" unless="tests">
-        <fileset id="testset" dir="${test.dir}">
-            <include name="**/*Test.java" />
-        </fileset>
-        <pathconvert pathsep="${line.separator}" property="testlist" refid="testset">
-            <globmapper from="${test.dir}/*" to="*"/>
-        </pathconvert>
-        <echo file="${test.list}">${testlist}</echo>
-        <property name="tests" value="@${test.list}"/>
-    </target>
-    <target name="test" depends="compile-test,find-tests">
-        <exec executable="${jtreg.home}/bin/jtreg">
-            <arg value="-cpa:${build.classes.dir}"/>
-            <arg value="-w:${test.workdir}"/>
-            <arg value="-r:${test.report}"/>
-            <arg value="-conc:1"/>
-            <arg value="-ovm"/>
-            <arg value="-v:default"/>
-            <arg value="-dir:test"/>
-            <arg value="${tests}"/>
-        </exec>
-    </target>
-    <target name="jar" depends="compile">
-        <mkdir dir="${build.dir}"/>
-        <jar jarfile="${dist.jar}" basedir="${build.classes.dir}">
-            <manifest>
-                <attribute name="Main-Class"
-                    value="org.jemmy.Version"/>
-            </manifest>
-        </jar>
-    </target>
-    <target name="clean">
-        <delete dir="${build.dir}"/>
-    </target>
+<project name="jemmy-core" default="compile" basedir=".">
+    <import file="${basedir}/../make/build_template.xml"/>
+    <property name="version.file" value="org/jemmy/jemmy.properties"/>
+    <property name="version.class" value="org.jemmy.Version"/>
+    <property name="dependencies.classpath" value=""/>
+    <target name="check-dependecies-impl"/>
+    <target name="build-dependecies-impl"/>
+    <target name="test-dependecies-impl"/>
 </project>
 
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/core/make/build_template.xml	Wed Jan 03 08:05:06 2018 -0800
@@ -0,0 +1,92 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
+ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+
+ This code is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License version 2 only, as
+ published by the Free Software Foundation.
+
+ This code is distributed in the hope that it will be useful, but WITHOUT
+ ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ version 2 for more details (a copy is included in the LICENSE file that
+ accompanied this code).
+
+ You should have received a copy of the GNU General Public License version
+ 2 along with this work; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ or visit www.oracle.com if you need additional information or have any
+ questions.
+ -->
+<project name="jemmy.v3.template">
+    <basename file="${basedir}" property="jemmy.project.name"/>
+    <property name="src.dir" location="${basedir}/src"/>
+    <property name="test.dir" location="${basedir}/test"/>
+    <property name="build.dir" location="${basedir}/build"/>
+    <property name="build.classes.dir" location="${build.dir}/classes"/>
+    <property name="build.test.dir" location="${build.dir}/test"/>
+    <property name="dist.jar" location="${build.dir}/${jemmy.project.name}.jar"/>
+    <property name="test.list" location="${build.dir}/testlist"/>
+    <property name="test.workdir" location="${build.dir}/test_wd"/>
+    <property name="test.report" location="${build.dir}/test_report"/>
+    <target name="timestamp" unless="buildnumber">
+        <tstamp>
+            <format property="buildnumber" pattern="yyyyMMdd"/>
+        </tstamp>
+    </target>
+    <target name="build-dependencies" depends="check-dependecies-impl"
+            unless="dependencies.are.built">
+        <antcall target="build-dependecies-impl"/>
+    </target>
+    <target name="compile" depends="timestamp,build-dependencies">
+        <mkdir dir="${build.classes.dir}"/>
+        <javac srcdir="${src.dir}" classpath="${dependencies.classpath}" destdir="${build.classes.dir}" debug="on" includeantruntime="false"/>
+        <copy file="${src.dir}/${version.file}" tofile="${build.classes.dir}/${version.file}"/>
+        <echo message="build=${buildnumber}" file="${build.classes.dir}/${version.file}" append="true"/>
+    </target>
+    <target name="compile-test" depends="compile">
+        <fail message="Please specify jtreg.home" unless="jtreg.home"/>
+        <mkdir dir="${build.test.dir}"/>
+        <javac srcdir="${test.dir}" destdir="${build.test.dir}" debug="on" includeantruntime="false"
+               classpath="${build.classes.dir}:${dependencies.classpath}:${jtreg.home}/lib/testng.jar"/>
+    </target>
+    <target name="find-tests" unless="tests">
+        <fileset id="testset" dir="${test.dir}">
+            <include name="**/*Test.java" />
+        </fileset>
+        <pathconvert pathsep="${line.separator}" property="testlist" refid="testset">
+            <globmapper from="${test.dir}/*" to="*"/>
+        </pathconvert>
+        <echo file="${test.list}">${testlist}</echo>
+        <property name="tests" value="@${test.list}"/>
+    </target>
+    <target name="test" depends="compile-test,find-tests">
+        <exec executable="${jtreg.home}/bin/jtreg">
+            <arg value="-cpa:${build.classes.dir}:${dependencies.classpath}"/>
+            <arg value="-w:${test.workdir}"/>
+            <arg value="-r:${test.report}"/>
+            <arg value="-conc:1"/>
+            <arg value="-ovm"/>
+            <arg value="-v:default"/>
+            <arg value="-dir:test"/>
+            <arg value="${tests}"/>
+        </exec>
+    </target>
+    <target name="full-test" depends="test-dependecies-impl, test"/>
+    <target name="jar" depends="compile">
+        <mkdir dir="${build.dir}"/>
+        <jar jarfile="${dist.jar}" basedir="${build.classes.dir}">
+            <manifest>
+                <attribute name="Main-Class" value="${version.class}"/>
+            </manifest>
+        </jar>
+    </target>
+    <target name="clean">
+        <delete dir="${build.dir}"/>
+    </target>
+</project>
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/core/make/jemmy-v3-ii/.idea/compiler.xml	Wed Jan 03 08:05:06 2018 -0800
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="CompilerConfiguration">
+    <wildcardResourcePatterns>
+      <entry name="!?*.java" />
+      <entry name="!?*.form" />
+      <entry name="!?*.class" />
+      <entry name="!?*.groovy" />
+      <entry name="!?*.scala" />
+      <entry name="!?*.flex" />
+      <entry name="!?*.kt" />
+      <entry name="!?*.clj" />
+    </wildcardResourcePatterns>
+  </component>
+</project>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/core/make/jemmy-v3-ii/.idea/copyright/Oracle.xml	Wed Jan 03 08:05:06 2018 -0800
@@ -0,0 +1,6 @@
+<component name="CopyrightManager">
+  <copyright>
+    <option name="notice" value="Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved.&#10;DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.&#10;&#10;This code is free software; you can redistribute it and/or modify it&#10;under the terms of the GNU General Public License version 2 only, as&#10;published by the Free Software Foundation.&#10;&#10;This code is distributed in the hope that it will be useful, but WITHOUT&#10;ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or&#10;FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License&#10;version 2 for more details (a copy is included in the LICENSE file that&#10;accompanied this code).&#10;&#10;You should have received a copy of the GNU General Public License version&#10;2 along with this work; if not, write to the Free Software Foundation,&#10;Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.&#10;&#10;Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA&#10;or visit www.oracle.com if you need additional information or have any&#10;questions." />
+    <option name="myName" value="Oracle" />
+  </copyright>
+</component>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/core/make/jemmy-v3-ii/.idea/encodings.xml	Wed Jan 03 08:05:06 2018 -0800
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="Encoding">
+    <file url="PROJECT" charset="UTF-8" />
+  </component>
+</project>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/core/make/jemmy-v3-ii/.idea/misc.xml	Wed Jan 03 08:05:06 2018 -0800
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="ProjectRootManager" version="2" languageLevel="JDK_1_9" default="true" project-jdk-name="1.9" project-jdk-type="JavaSDK">
+    <output url="file://$PROJECT_DIR$/out" />
+  </component>
+</project>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/core/make/jemmy-v3-ii/.idea/modules.xml	Wed Jan 03 08:05:06 2018 -0800
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="ProjectModuleManager">
+    <modules>
+      <module fileurl="file://$PROJECT_DIR$/awt-input/awt-input.iml" filepath="$PROJECT_DIR$/awt-input/awt-input.iml" />
+      <module fileurl="file://$PROJECT_DIR$/core/core.iml" filepath="$PROJECT_DIR$/core/core.iml" />
+    </modules>
+  </component>
+</project>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/core/make/jemmy-v3-ii/awt-input/awt-input.iml	Wed Jan 03 08:05:06 2018 -0800
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module type="JAVA_MODULE" version="4">
+  <component name="NewModuleRootManager" inherit-compiler-output="true">
+    <exclude-output />
+    <content url="file://$MODULE_DIR$/../../../JemmyAWTInput/src">
+      <sourceFolder url="file://$MODULE_DIR$/../../../JemmyAWTInput/src" isTestSource="false" />
+    </content>
+    <content url="file://$MODULE_DIR$/../../../JemmyAWTInput/test">
+      <sourceFolder url="file://$MODULE_DIR$/../../../JemmyAWTInput/test" isTestSource="true" />
+    </content>
+    <content url="file://$MODULE_DIR$/../..">
+      <sourceFolder url="file://$MODULE_DIR$/../.." isTestSource="false" />
+    </content>
+    <orderEntry type="inheritedJdk" />
+    <orderEntry type="sourceFolder" forTests="false" />
+    <orderEntry type="module" module-name="core" />
+    <orderEntry type="library" scope="TEST" name="testng" level="application" />
+  </component>
+</module>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/core/make/jemmy-v3-ii/core/core.iml	Wed Jan 03 08:05:06 2018 -0800
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module type="JAVA_MODULE" version="4">
+  <component name="NewModuleRootManager" inherit-compiler-output="true">
+    <exclude-output />
+    <content url="file://$MODULE_DIR$/../../../JemmyCore/src">
+      <sourceFolder url="file://$MODULE_DIR$/../../../JemmyCore/src" isTestSource="false" />
+    </content>
+    <content url="file://$MODULE_DIR$/../../../JemmyCore/test">
+      <sourceFolder url="file://$MODULE_DIR$/../../../JemmyCore/test" isTestSource="true" />
+    </content>
+    <orderEntry type="inheritedJdk" />
+    <orderEntry type="sourceFolder" forTests="false" />
+    <orderEntry type="library" scope="TEST" name="testng" level="application" />
+  </component>
+</module>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/core/make/jemmy-v3-ii/jemmy-v3-ii.iml	Wed Jan 03 08:05:06 2018 -0800
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module type="JAVA_MODULE" version="4">
+  <component name="NewModuleRootManager" inherit-compiler-output="true">
+    <exclude-output />
+    <orderEntry type="inheritedJdk" />
+    <orderEntry type="sourceFolder" forTests="false" />
+  </component>
+</module>
\ No newline at end of file