changeset 340:b743144c5e11

8166870: javapackager support for -Djava-extension-type while executing single test case in testsuite Reviewed-by: cbensen
author rgangadhar
date Mon, 03 Oct 2016 10:56:23 +0530
parents 74f333c4d22a
children be0c0e2d0d31
files functional/appBundlerTestsJDK9/appBundlerTestsJDK9/build.xml functional/appBundlerTestsJDK9/appBundlerTestsJDK9/nbproject/build-impl.xml functional/appBundlerTestsJDK9/appBundlerTestsJDK9/nbproject/project.xml functional/appBundlerTestsJDK9/appBundlerTestsJDK9/src/com/oracle/appbundlers/utils/Config.java functional/appBundlerTestsJDK9/appBundlerTestsJDK9/src/com/oracle/appbundlers/utils/Constants.java functional/appBundlerTestsJDK9/appBundlerTestsJDK9/src/com/oracle/appbundlers/utils/ExtensionType.java functional/appBundlerTestsJDK9/appBundlerTestsJDK9/src/com/oracle/appbundlers/utils/JavaExtensionTypeFilter.java functional/appBundlerTestsJDK9/appBundlerTestsJDK9/src/com/oracle/appbundlers/utils/installers/LinuxRPMBundlerUtils.java functional/appBundlerTestsJDK9/appBundlerTestsJDK9/test/com/oracle/appbundlers/tests/functionality/TestBase.java
diffstat 9 files changed, 184 insertions(+), 132 deletions(-) [+]
line wrap: on
line diff
--- a/functional/appBundlerTestsJDK9/appBundlerTestsJDK9/build.xml	Tue Sep 06 13:30:50 2016 +0300
+++ b/functional/appBundlerTestsJDK9/appBundlerTestsJDK9/build.xml	Mon Oct 03 10:56:23 2016 +0530
@@ -8,43 +8,32 @@
 <!-- You can turn off the Compile on Save (or Deploy on Save) setting -->
 <!-- in the project's Project Properties dialog box.-->
 <project name="appBundlerTests" default="default" basedir="." xmlns:unless="ant:unless">
-    <description>Builds, tests, and runs the project appBundlerTests.</description>
-    <import file="nbproject/build-impl.xml"/>
-    <property name="aurora.sentinel" value="http://aurora.ru.oracle.com/feeder-gw/central/system"/>
+	<description>Builds, tests, and runs the project appBundlerTests.</description>
+	<import file="nbproject/build-impl.xml"/>
+	<property name="aurora.sentinel" value="http://aurora.ru.oracle.com/feeder-gw/central/system"/>
 
-    <condition property="resultsDirectory" value="results/">
-    <not>  
-        <isset property="resultsDirectory"/>
-    </not>
-    </condition>
+	<condition property="resultsDirectory" value="results/">
+		<not>
+			<isset property="resultsDirectory"/>
+		</not>
+	</condition>
 
-    <target name="copy-packager-jars">
-        <copy todir="lib">
-            <fileset file="${java.home}/lib/ant-javafx.jar">
-                <present targetdir="lib" present="srconly"/>
-            </fileset>
-        </copy>
-    	<!--
-    	   no need to copy packager.jar jar files as it exists already in javapackager product
-    	-->
-        <!--<copy todir="lib">
-            <fileset file="${java.home}/lib/packager.jar">
-                <present targetdir="lib" present="srconly"/>
-            </fileset>
-        </copy>
-        <copy todir="src/com/oracle/appbundlers/utils/resources">
-            <fileset file="lib/packager.jar"/>
-        </copy>-->
-    </target>
+	<target name="copy-packager-jars">
+		<copy todir="lib">
+			<fileset file="${java.home}/lib/ant-javafx.jar">
+				<present targetdir="lib" present="srconly"/>
+			</fileset>
+		</copy>
+	</target>
 
-    <target name="-post-clean">
-        <delete>
-            <fileset dir="lib" includes="ant-javafx.jar,packager.jar"/>
-        </delete>
-    </target>
+	<target name="-post-clean">
+		<delete>
+			<fileset dir="lib" includes="ant-javafx.jar,packager.jar"/>
+		</delete>
+	</target>
 
-    <target name="-pre-compile" depends="copy-packager-jars" />
-    <!--
+	<target name="-pre-compile" depends="copy-packager-jars" />
+	<!--
 
     There exist several targets which are by default empty and which can be 
     used for execution of your tasks. These targets are usually executed 
@@ -104,88 +93,102 @@
     nbproject/build-impl.xml file. 
 
     -->
-    <target name="aurora-prepare">
-        <get src="${aurora.sentinel}/parser-system.jar" dest="lib/parser-system.jar"/>
-        <get src="${aurora.sentinel}/parser-jre.jar" dest="lib/parser-jre.jar"/>
-        <get src="${aurora.sentinel}/parser-jfx.jar" dest="lib/parser-jfx.jar"/>
-        <get src="${aurora.sentinel}/manual-submit.jar" dest="lib/manual-submit.jar"/>
+	<target name="aurora-prepare">
+		<get src="${aurora.sentinel}/parser-system.jar" dest="lib/parser-system.jar"/>
+		<get src="${aurora.sentinel}/parser-jre.jar" dest="lib/parser-jre.jar"/>
+		<get src="${aurora.sentinel}/parser-jfx.jar" dest="lib/parser-jfx.jar"/>
+		<get src="${aurora.sentinel}/manual-submit.jar" dest="lib/manual-submit.jar"/>
 
-        <mkdir dir="${resultsDirectory}"/>
+		<mkdir dir="${resultsDirectory}"/>
 
-        <mkdir dir="${resultsDirectory}/xml-system"/>
-        <mkdir dir="${resultsDirectory}/xml-jre"/>
-        <mkdir dir="${resultsDirectory}/xml-jfx"/>
+		<mkdir dir="${resultsDirectory}/xml-system"/>
+		<mkdir dir="${resultsDirectory}/xml-jre"/>
+		<mkdir dir="${resultsDirectory}/xml-jfx"/>
 
-        <java fork="true" jar="lib/parser-system.jar" dir="${resultsDirectory}/xml-system"/>
-        <java fork="true" jar="lib/parser-jre.jar" dir="${resultsDirectory}/xml-jre"/>
-        <java fork="true" jar="lib/parser-jfx.jar" dir="${resultsDirectory}/xml-jfx"/>
+		<java fork="true" jar="lib/parser-system.jar" dir="${resultsDirectory}/xml-system"/>
+		<java fork="true" jar="lib/parser-jre.jar" dir="${resultsDirectory}/xml-jre"/>
+		<java fork="true" jar="lib/parser-jfx.jar" dir="${resultsDirectory}/xml-jfx"/>
 
-        <property name="java.version" value="${ant.java.version}" />
-        <script language="javascript">
+		<property name="java.version" value="${ant.java.version}" />
+		<script language="javascript">
             //First line of java -version output.
             var version = project.getProperty("java.version");
             project.setProperty("java.version", version.replaceAll(".*1.([0-9]*).*_([0-9]+).*", "$1u$2"));
         </script>
-        <echo message="${java.version}" />
-             
-        <propertyfile file="${resultsDirectory}/component_info.txt">
-            <entry  key="test_component" value="appBundlerTestsJDK9"/>
-            <entry  key="test_harness" value="testng"/>
-            <entry  key="test_suitename" value="appBundlerTestsJDK9"/>
-            <entry  key="testbase_location" value="http://hg.openjdk.java.net/openjfx/9-dev/tests/functional/appBundlerTestsJDK9/appBundlerTestsJDK9"/>
-            <entry  key="testbase_name" value="appBundlerTestsJDK9"/>
-            <entry  key="testbase_version" value="${java.version}"/>
-        </propertyfile>
-        
-        <copy file="build/test/results/testng-results.xml" todir="${resultsDirectory}" verbose="true"/>
-    </target>
-	
+		<echo message="${java.version}" />
+
+		<propertyfile file="${resultsDirectory}/component_info.txt">
+			<entry  key="test_component" value="appBundlerTestsJDK9"/>
+			<entry  key="test_harness" value="testng"/>
+			<entry  key="test_suitename" value="appBundlerTestsJDK9"/>
+			<entry  key="testbase_location" value="http://hg.openjdk.java.net/openjfx/9-dev/tests/functional/appBundlerTestsJDK9/appBundlerTestsJDK9"/>
+			<entry  key="testbase_name" value="appBundlerTestsJDK9"/>
+			<entry  key="testbase_version" value="${java.version}"/>
+		</propertyfile>
+
+		<copy file="build/test/results/testng-results.xml" todir="${resultsDirectory}" verbose="true"/>
+	</target>
+
 	<!-- merge from JDK8 -->
-    
-    <target name="aurora-submit" depends="aurora-prepare">
-        <property name="aurora.param.stid" value=""/>
-	<property name="aurora.merge.plan" value="ST_ID_PASS_WINS"/>
-	<java fork="true" jar="lib/manual-submit.jar" dir="${resultsDirectory}">
-		<arg line="-address=http://aurora.ru.oracle.com"/>
-		<arg line="-batch ManualSubmit"/>
-		<arg line="-userName 0"/>
-		<arg line="-resultDirectory ."/>
-		<arg line="${aurora.param.stid}"/>
-		<arg line="-ext.mergePlan=${aurora.merge.plan}"/>
-		<jvmarg line="-Djava.net.preferIPv4Stack=true"/>
-	</java>
-    </target>
-		
-    <target name="run-single-test-method">
-        <fail unless="class-name" message="Please, specify the class containing tests methods.${line.separator}
+
+	<target name="aurora-submit" depends="aurora-prepare">
+		<property name="aurora.param.stid" value=""/>
+		<property name="aurora.merge.plan" value="ST_ID_PASS_WINS"/>
+		<java fork="true" jar="lib/manual-submit.jar" dir="${resultsDirectory}">
+			<arg line="-address=http://aurora.ru.oracle.com"/>
+			<arg line="-batch ManualSubmit"/>
+			<arg line="-userName 0"/>
+			<arg line="-resultDirectory ."/>
+			<arg line="${aurora.param.stid}"/>
+			<arg line="-ext.mergePlan=${aurora.merge.plan}"/>
+			<jvmarg line="-Djava.net.preferIPv4Stack=true"/>
+		</java>
+	</target>
+
+	<!--
+	   Sample Usage of executing Single TestCase
+	   ant -Dclass-name=com.oracle.appbundlers.tests.functionality.SimpleExecutablesTest -Dinstallation-package-type=exe -Dpackager-interface=cli -Djava-extension-type=NormalJar "run-single-test-method" -f build.xml
+	-->
+
+	<target name="run-single-test-method">
+		<fail unless="class-name" message="Please, specify the class containing tests methods.${line.separator}
 For example -Dclass-name=com.oracle.appbundlers.tests.functionality.SimpleExecutablesTest" />
-        <echo unless:set="installation-package-type">You may want to specify the type of the package:${line.separator}
+		<echo unless:set="installation-package-type">You may want to specify the type of the package:${line.separator}
 -Dinstallation-package-type=${line.separator}
 [win_app     | exe | msi |${line.separator}
  linux_app   | deb | rpm |${line.separator}
  mac_app     | dmg | pkg ]${line.separator}</echo>
-            
-        <echo unless:set="packager-interface">You may want to specify the way of creating the package:${line.separator}
+
+		<echo unless:set="packager-interface">You may want to specify the way of creating the package:${line.separator}
 -Dpackager-interface=[ant | cli | java_api] </echo>
-            
-        <property name="run.jvmargs" value="-Dtest-run-mode=single-method -Dinstallation-package-type=${installation-package-type} -Dpackager-interface=${packager-interface} -Dmanual-only=${manual-only}" />
-        
-        <antcall target="-do-compile-single">
-            <param  name="javac.includes" value="${class-name}" />
-        </antcall>
-        
-        <antcall target="test-single-method">
-            <param  name="test.class" value="${class-name}" />
-            <param  name="test.method" value="runTest" />
-            <param  name="javac.includes" value="${class-name}" />
-            <param  name="test.includes" value="${class-name}" />
-        </antcall>
-    </target>
 
-    <target name="test-manual">
-        <property name="run.jvmargs" value="-Dmanual-only=true" />
-        <antcall target="test">
-            <param name="manual-only" value="true" />
-        </antcall>
-    </target>
+		<echo>You may want to filter out java-extension-type using -Djava-extension-type=[ NormalJar | ModularJar | ExplodedModules | Jmods ]</echo>
+
+		<condition property="java-extension-type" value="">
+			<not>
+				<isset property="java-extension-type" />
+			</not>
+		</condition>
+
+		<property name="run.jvmargs" value="-Dtest-run-mode=single-method -Dinstallation-package-type=${installation-package-type} -Dpackager-interface=${packager-interface} -Djava-extension-type=${java-extension-type}
+			-Dmanual-only=${manual-only}" />
+
+		<antcall target="-do-compile-single">
+			<param  name="javac.includes" value="${class-name}" />
+		</antcall>
+
+		<antcall target="test-single-method">
+			<param  name="test.class" value="${class-name}" />
+			<param  name="test.method" value="runTest" />
+			<param  name="javac.includes" value="${class-name}" />
+			<param  name="test.includes" value="${class-name}" />
+		</antcall>
+	</target>
+
+	<target name="test-manual">
+		<property name="run.jvmargs" value="-Dmanual-only=true" />
+		<antcall target="test">
+			<param name="manual-only" value="true" />
+		</antcall>
+	</target>
 </project>
--- a/functional/appBundlerTestsJDK9/appBundlerTestsJDK9/nbproject/build-impl.xml	Tue Sep 06 13:30:50 2016 +0300
+++ b/functional/appBundlerTestsJDK9/appBundlerTestsJDK9/nbproject/build-impl.xml	Mon Oct 03 10:56:23 2016 +0530
@@ -20,10 +20,10 @@
 
         -->
 <project xmlns:j2seproject1="http://www.netbeans.org/ns/j2se-project/1" xmlns:j2seproject3="http://www.netbeans.org/ns/j2se-project/3" xmlns:jaxrpc="http://www.netbeans.org/ns/j2se-project/jax-rpc" basedir=".." default="default" name="appBundlerTests-impl">
-    <fail message="Please build using Ant 1.8.0 or higher.">
+    <fail message="Please build using Ant 1.9.4 or higher.">
         <condition>
             <not>
-                <antversion atleast="1.8.0"/>
+                <antversion atleast="1.9.4"/>
             </not>
         </condition>
     </fail>
@@ -260,7 +260,6 @@
                 <property location="${build.dir}/empty" name="empty.dir"/>
                 <mkdir dir="${empty.dir}"/>
                 <mkdir dir="@{apgeneratedsrcdir}"/>
-            	<echoproperties destfile="abc.properties"/>
                 <javac debug="true" verbose="true" deprecation="${javac.deprecation}" destdir="@{destdir}" encoding="${source.encoding}" excludes="@{excludes}" fork="${javac.fork}" includeantruntime="false" includes="@{includes}" source="${javac.source}" sourcepath="@{sourcepath}" srcdir="@{srcdir}" target="${javac.target}" tempdir="${java.io.tmpdir}">
                     <src>
                         <dirset dir="@{gensrcdir}" erroronmissingdir="false">
@@ -284,15 +283,15 @@
                 	<!--
                 	   Test Framework uses exported packages of jdk.packager and jdk.packager.services module. 
                 	-->
-                	<compilerarg value="-XaddExports:jdk.packager/com.oracle.tools.packager=ALL-UNNAMED"/>
-                	<compilerarg value="-XaddExports:jdk.packager/com.sun.javafx.tools.packager=ALL-UNNAMED"/>
-                	<compilerarg value="-XaddExports:jdk.packager/com.sun.javafx.tools.packager.bundlers=ALL-UNNAMED"/>
-                	<compilerarg value="-XaddExports:jdk.packager/com.sun.javafx.tools.resource=ALL-UNNAMED"/>
-                	<compilerarg value="-XaddExports:jdk.packager.services/jdk.packager.services=ALL-UNNAMED"/>
-                	<compilerarg value="-XaddExports:jdk.packager/com.oracle.tools.packager.linux=ALL-UNNAMED"/>
-                	<compilerarg value="-XaddExports:jdk.packager/com.oracle.tools.packager.windows=ALL-UNNAMED"/>
-                	<compilerarg value="-XaddExports:jdk.packager/com.oracle.tools.packager.mac=ALL-UNNAMED"/>
-                	<compilerarg value="-XaddExports:jdk.packager/com.oracle.tools.packager.jnlp=ALL-UNNAMED"/>
+                    <compilerarg value="--add-exports"/> <compilerarg value="jdk.packager/com.oracle.tools.packager=ALL-UNNAMED"/>
+                    <compilerarg value="--add-exports"/> <compilerarg value="jdk.packager/com.sun.javafx.tools.packager=ALL-UNNAMED"/>
+                    <compilerarg value="--add-exports"/> <compilerarg value="jdk.packager/com.sun.javafx.tools.packager.bundlers=ALL-UNNAMED"/>
+                    <compilerarg value="--add-exports"/> <compilerarg value="jdk.packager/com.sun.javafx.tools.resource=ALL-UNNAMED"/>
+                    <compilerarg value="--add-exports"/> <compilerarg value="jdk.packager.services/jdk.packager.services=ALL-UNNAMED"/>
+                    <compilerarg value="--add-exports"/> <compilerarg value="jdk.packager/com.oracle.tools.packager.linux=ALL-UNNAMED"/>
+                    <compilerarg value="--add-exports"/> <compilerarg value="jdk.packager/com.oracle.tools.packager.windows=ALL-UNNAMED"/>
+                    <compilerarg value="--add-exports"/> <compilerarg value="jdk.packager/com.oracle.tools.packager.mac=ALL-UNNAMED"/>
+                    <compilerarg value="--add-exports"/> <compilerarg value="jdk.packager/com.oracle.tools.packager.jnlp=ALL-UNNAMED"/>
                     <customize/>
                 </javac>
             </sequential>
@@ -459,8 +458,9 @@
             	<echo>======================================================</echo>
             	<echo>===============TESTNG EXECUTION BEGINS================</echo>
             	<echo>======================================================</echo>
+            	<echoproperties destfile="abc.properties"/>
                 <taskdef classname="org.testng.TestNGAntTask" classpath="${run.test.classpath}" name="testng"/>
-                <testng classfilesetref="test.set" failureProperty="tests.failed" listeners="org.testng.reporters.VerboseReporter" methods="${testng.methods.arg}" mode="${testng.mode}" outputdir="${build.test.results.dir}" suitename="appBundlerTests" testname="TestNG tests" workingDir="${work.dir}">
+                <testng classfilesetref="test.set" configFailurePolicy="continue" failureProperty="tests.failed" listeners="org.testng.reporters.VerboseReporter" methods="${testng.methods.arg}" mode="${testng.mode}" outputdir="${build.test.results.dir}" suitename="appBundlerTests" testname="TestNGtests" workingDir="${work.dir}" dumpCommand="true">
                     <xmlfileset dir="${build.test.classes.dir}" includes="@{testincludes}"/>
                     <propertyset>
                         <propertyref prefix="test-sys-prop."/>
@@ -796,11 +796,11 @@
                 	<!--
                 	   Test Framework uses exported packages of jdk.packager and jdk.packager.services modules. 
                 	-->
-                	<compilerarg value="-XaddExports:jdk.packager/com.oracle.tools.packager=ALL-UNNAMED"/>
-                	<compilerarg value="-XaddExports:jdk.packager/com.sun.javafx.tools.packager=ALL-UNNAMED"/>
-                	<compilerarg value="-XaddExports:jdk.packager/com.sun.javafx.tools.packager.bundlers=ALL-UNNAMED"/>
-                	<compilerarg value="-XaddExports:jdk.packager/com.sun.javafx.tools.resource=ALL-UNNAMED"/>
-                	<compilerarg value="-XaddExports:jdk.packager.services/jdk.packager.services=ALL-UNNAMED"/>
+                	<compilerarg value="--add-exports"/> <compilerarg value="jdk.packager/com.oracle.tools.packager=ALL-UNNAMED"/>
+                	<compilerarg value="--add-exports"/> <compilerarg value="jdk.packager/com.sun.javafx.tools.packager=ALL-UNNAMED"/>
+                	<compilerarg value="--add-exports"/> <compilerarg value="jdk.packager/com.sun.javafx.tools.packager.bundlers=ALL-UNNAMED"/>
+                	<compilerarg value="--add-exports"/> <compilerarg value="jdk.packager/com.sun.javafx.tools.resource=ALL-UNNAMED"/>
+                	<compilerarg value="--add-exports"/> <compilerarg value="jdk.packager.services/jdk.packager.services=ALL-UNNAMED"/>
                     <classpath>
                         <path path="@{classpath}"/>
                     </classpath>
--- a/functional/appBundlerTestsJDK9/appBundlerTestsJDK9/nbproject/project.xml	Tue Sep 06 13:30:50 2016 +0300
+++ b/functional/appBundlerTestsJDK9/appBundlerTestsJDK9/nbproject/project.xml	Mon Oct 03 10:56:23 2016 +0530
@@ -3,7 +3,7 @@
     <type>org.netbeans.modules.java.j2seproject</type>
     <configuration>
         <data xmlns="http://www.netbeans.org/ns/j2se-project/3">
-            <name>appBundlerTests-8u60</name>
+            <name>appBundlerTests-9</name>
             <source-roots>
                 <root id="src.dir"/>
             </source-roots>
--- a/functional/appBundlerTestsJDK9/appBundlerTestsJDK9/src/com/oracle/appbundlers/utils/Config.java	Tue Sep 06 13:30:50 2016 +0300
+++ b/functional/appBundlerTestsJDK9/appBundlerTestsJDK9/src/com/oracle/appbundlers/utils/Config.java	Mon Oct 03 10:56:23 2016 +0530
@@ -33,6 +33,7 @@
     private boolean manualOnly = false;
     private BundlerUtils acceptedInstallationPackagerType;
     private BundlingManagers acceptedPackagerInterface;
+    private ExtensionType javaExtensionType;
 
     private Config() {
         tryLoadTestSuiteProperties();
@@ -82,6 +83,7 @@
             tryDefinePackagerInterface();
         }
         tryFilterManual();
+        isJavaExtensionTypeDefined();
     }
 
     private void tryFilterManual() {
@@ -124,6 +126,23 @@
         }
     }
 
+    private void isJavaExtensionTypeDefined() {
+        try {
+            String javaExtensionString = System
+                    .getProperty("java-extension-type");
+            if(!javaExtensionString.trim().equals("")) {
+                javaExtensionType = getEnumInstance(ExtensionType.class,
+                        javaExtensionString);
+                System.out.println(
+                        "[Filtered java extension type: " + javaExtensionString+"]");
+            } else {
+                System.out.println("[Java Extension Type won't be Filtered]");
+            }
+        } catch (Exception e) {
+            System.out.println("[Java Extension Type won't be Filtered]");
+        }
+    }
+
     private static <T extends Enum<T>> T getEnumInstance(Class<T> type,
             String value) {
         return T.valueOf(type, value);
@@ -210,6 +229,10 @@
         return acceptedPackagerInterface;
     }
 
+    public ExtensionType getAcceptedJavaExtensionType() {
+        return this.javaExtensionType;
+    }
+
     public boolean manualOnly() {
         return manualOnly;
     }
--- a/functional/appBundlerTestsJDK9/appBundlerTestsJDK9/src/com/oracle/appbundlers/utils/Constants.java	Tue Sep 06 13:30:50 2016 +0300
+++ b/functional/appBundlerTestsJDK9/appBundlerTestsJDK9/src/com/oracle/appbundlers/utils/Constants.java	Mon Oct 03 10:56:23 2016 +0530
@@ -64,11 +64,10 @@
     String ADD_MODS = "add-modules";
     String LIMIT_MODS = "limit-modules";
     String MODULEPATH = "module-path";
+    String LIST_MODULES = "list-modules";
     String STRIP_NATIVE_COMMANDS = "strip-native-commands";
     String SPACE = " ";
     char QUOTE = '\"';
-    String DETECT_JRE_MODS = "detectjremods";
-    String JDKMODULEPATH = "jdkmodulepath";
     String APPCLASS = "appclass";
     String APPLICATION_CLASS = "applicationClass";
     String WORK_DIRECTORY = "testBundlerWorkDir";
--- a/functional/appBundlerTestsJDK9/appBundlerTestsJDK9/src/com/oracle/appbundlers/utils/ExtensionType.java	Tue Sep 06 13:30:50 2016 +0300
+++ b/functional/appBundlerTestsJDK9/appBundlerTestsJDK9/src/com/oracle/appbundlers/utils/ExtensionType.java	Mon Oct 03 10:56:23 2016 +0530
@@ -5,7 +5,7 @@
 package com.oracle.appbundlers.utils;
 
 /**
- * This class represents java extension product.
+ * This class represents java extension type.
  * @author Ramesh BG
  */
 public enum ExtensionType implements Constants {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/functional/appBundlerTestsJDK9/appBundlerTestsJDK9/src/com/oracle/appbundlers/utils/JavaExtensionTypeFilter.java	Mon Oct 03 10:56:23 2016 +0530
@@ -0,0 +1,16 @@
+package com.oracle.appbundlers.utils;
+
+import static com.oracle.appbundlers.utils.Config.CONFIG_INSTANCE;
+
+public class JavaExtensionTypeFilter {
+
+    private JavaExtensionTypeFilter() {
+
+    }
+
+    public static boolean accept(ExtensionType javaExtensionType) {
+        return CONFIG_INSTANCE.getAcceptedJavaExtensionType() == null
+                || CONFIG_INSTANCE
+                        .getAcceptedJavaExtensionType() == javaExtensionType;
+    }
+}
--- a/functional/appBundlerTestsJDK9/appBundlerTestsJDK9/src/com/oracle/appbundlers/utils/installers/LinuxRPMBundlerUtils.java	Tue Sep 06 13:30:50 2016 +0300
+++ b/functional/appBundlerTestsJDK9/appBundlerTestsJDK9/src/com/oracle/appbundlers/utils/installers/LinuxRPMBundlerUtils.java	Mon Oct 03 10:56:23 2016 +0530
@@ -138,9 +138,7 @@
 
     @Override
     public String getAppName(Map<String, Object> params) {
-        String fetchFrom = LinuxRpmBundler.BUNDLE_NAME.fetchFrom(params);
-        System.out.println("Linux RPM Bundle Name is "+fetchFrom);
-        return fetchFrom;
+        return LinuxRpmBundler.BUNDLE_NAME.fetchFrom(params);
     }
 
     @Override
--- a/functional/appBundlerTestsJDK9/appBundlerTestsJDK9/test/com/oracle/appbundlers/tests/functionality/TestBase.java	Tue Sep 06 13:30:50 2016 +0300
+++ b/functional/appBundlerTestsJDK9/appBundlerTestsJDK9/test/com/oracle/appbundlers/tests/functionality/TestBase.java	Mon Oct 03 10:56:23 2016 +0530
@@ -30,7 +30,6 @@
 
 import java.io.IOException;
 import java.lang.reflect.Method;
-import java.util.Arrays;
 import java.util.HashMap;
 import java.util.Iterator;
 import java.util.List;
@@ -61,6 +60,7 @@
 import com.oracle.appbundlers.utils.BundlingManagers;
 import com.oracle.appbundlers.utils.Constants;
 import com.oracle.appbundlers.utils.ExtensionType;
+import com.oracle.appbundlers.utils.JavaExtensionTypeFilter;
 import com.oracle.appbundlers.utils.PackageTypeFilter;
 import com.oracle.appbundlers.utils.PackagerApiFilter;
 import com.oracle.appbundlers.utils.Utils;
@@ -204,7 +204,7 @@
         }
 
         try {
-            bundlingManager.execute(allParams, this.currentParameter.getApp());
+            executeJavaPackager(bundlingManager, allParams);
             String path = bundlingManager.install(
                     this.currentParameter.getApp(), getResultingAppName(),
                     false);
@@ -222,13 +222,20 @@
         }
     }
 
+    protected void executeJavaPackager(BundlingManager bundlingManager,
+            Map<String, Object> allParams) throws IOException {
+        bundlingManager.execute(allParams, this.currentParameter.getApp());
+    }
+
     public boolean isTestCaseApplicableForExtensionType(
             ExtensionType extension) {
         return true;
     }
 
     public ExtensionType[] getExtensionArray() {
-        return ExtensionType.values();
+        return Stream
+                .of(ExtensionType.values()).filter(JavaExtensionTypeFilter::accept)
+                .collect(toList()).toArray(new ExtensionType[0]);
     }
 
     protected void uninstallApp() throws Exception {
@@ -244,7 +251,9 @@
             LOG.log(Level.INFO, "Removing temporary files: ");
         } finally {
             for (Parameters parameters : intermediateToParametersMap.values()) {
-                Utils.tryRemoveRecursive(parameters.getApp().getWorkDir());
+                if(parameters.getApp() != null && parameters.getApp().getWorkDir() != null) {
+                    Utils.tryRemoveRecursive(parameters.getApp().getWorkDir());
+                }
             }
         }
     }
@@ -261,13 +270,17 @@
                 .of(getBundlingManagers()).filter(PackagerApiFilter::accept)
                 .collect(Collectors.toList());
 
-        final List<AbstractBundlerUtils> installationPackageTypes = Stream
+        List<AbstractBundlerUtils> installationPackageTypes = Stream
                 .of(getBundlerUtils()).filter(BundlerUtils::isSupported)
                 .filter(PackageTypeFilter::accept)
                 .map(BundlerUtils::getBundlerUtils).collect(toList());
 
+        List<ExtensionType> javaExtensionTypeList = Stream
+                .of(getExtensionArray()).filter(JavaExtensionTypeFilter::accept)
+                .collect(toList());
+
         return BundlerProvider.createBundlingManagers(installationPackageTypes,
-                packagerInterfaces, Arrays.asList(getExtensionArray()));
+                packagerInterfaces, javaExtensionTypeList);
     }
 
     public boolean mustBeSupported(String bundlerId) {