8151726: Introduce a JPRT testset buildinfra
authorerikj
Tue, 15 Mar 2016 11:08:47 +0100
changeset 36532 2f10ab82d0a8
parent 36531 ef4e1ca50af8
child 36533 ba0c9b9b2675
8151726: Introduce a JPRT testset buildinfra Reviewed-by: tbell, dholmes
common/conf/jib-profiles.js
make/jprt.properties
--- a/common/conf/jib-profiles.js	Mon Mar 14 12:00:24 2016 +0100
+++ b/common/conf/jib-profiles.js	Tue Mar 15 11:08:47 2016 +0100
@@ -217,6 +217,7 @@
         configure_args: ["--with-default-make-target=all"],
         configure_args_32bit: ["--with-target-bits=32", "--with-jvm-variants=client,server"],
         configure_args_debug: ["--enable-debug"],
+        configure_args_slowdebug: ["--with-debug-level=slowdebug"],
         organization: "jpg.infra.builddeps"
     };
 
@@ -297,50 +298,12 @@
     profiles = concatObjects(profiles, mainProfiles);
     // Generate debug versions of all the main profiles
     profiles = concatObjects(profiles, generateDebugProfiles(common, mainProfiles));
-
-    // Specific open profiles needed for JPRT testing
-    var jprtOpenProfiles = {
-
-        "linux-x64-open": {
-            target_os: mainProfiles["linux-x64"].target_os,
-            target_cpu: mainProfiles["linux-x64"].target_cpu,
-            dependencies: mainProfiles["linux-x64"].dependencies,
-            configure_args: concat(mainProfiles["linux-x64"].configure_args,
-                "--enable-openjdk-only"),
-            make_args: mainProfiles["linux-x64"].make_args,
-            labels: [ "open" ]
-        },
+    // Generate slowdebug versions of all the main profiles
+    profiles = concatObjects(profiles, generateSlowdebugProfiles(common, mainProfiles));
 
-        "linux-x86-open": {
-            target_os: mainProfiles["linux-x86"].target_os,
-            target_cpu: mainProfiles["linux-x86"].target_cpu,
-            dependencies: mainProfiles["linux-x86"].dependencies,
-            configure_args: concat(mainProfiles["linux-x86"].configure_args,
-                "--enable-openjdk-only"),
-            make_args: mainProfiles["linux-x86"].make_args,
-            labels: [ "open" ]
-        },
-
-        "solaris-x64-open": {
-            target_os: mainProfiles["solaris-x64"].target_os,
-            target_cpu: mainProfiles["solaris-x64"].target_cpu,
-            dependencies: mainProfiles["solaris-x64"].dependencies,
-            configure_args: concat(mainProfiles["solaris-x64"].configure_args,
-                "--enable-openjdk-only"),
-            make_args: mainProfiles["solaris-x64"].make_args,
-            labels: [ "open" ]
-        },
-
-        "windows-x86-open": {
-            target_os: mainProfiles["windows-x86"].target_os,
-            target_cpu: mainProfiles["windows-x86"].target_cpu,
-            dependencies: mainProfiles["windows-x86"].dependencies,
-            configure_args: concat(mainProfiles["windows-x86"].configure_args,
-                "--enable-openjdk-only"),
-            make_args: mainProfiles["windows-x86"].make_args,
-            labels: [ "open" ]
-        }
-    };
+    // Generate open only profiles for all the main profiles for JPRT and reference
+    // implementation builds.
+    var jprtOpenProfiles = generateOpenOnlyProfiles(common, mainProfiles);
     profiles = concatObjects(profiles, jprtOpenProfiles);
     // Generate debug profiles for the open jprt profiles
     profiles = concatObjects(profiles, generateDebugProfiles(common, jprtOpenProfiles));
@@ -502,6 +465,51 @@
 };
 
 /**
+ * Generates slowdebug versions of profiles. Clones the given profiles and adds
+ * debug metadata.
+ *
+ * @param common Common values
+ * @param profiles Profiles map to generate debug profiles for
+ * @returns {{}} New map of profiles containing debug profiles
+ */
+var generateSlowdebugProfiles = function (common, profiles) {
+    var newProfiles = {};
+    for (var profile in profiles) {
+        var debugProfile = profile + "-slowdebug";
+        newProfiles[debugProfile] = clone(profiles[profile]);
+        newProfiles[debugProfile].debug_level = "slowdebug";
+        newProfiles[debugProfile].labels
+            = concat(newProfiles[debugProfile].labels || [], "slowdebug"),
+            newProfiles[debugProfile].configure_args
+                = concat(newProfiles[debugProfile].configure_args,
+                common.configure_args_slowdebug);
+    }
+    return newProfiles;
+};
+
+/**
+ * Generates open only versions of profiles. Clones the given profiles and adds
+ * open metadata.
+ *
+ * @param common Common values
+ * @param profiles Profiles map to generate open only profiles for
+ * @returns {{}} New map of profiles containing open only profiles
+ */
+var generateOpenOnlyProfiles = function (common, profiles) {
+    var newProfiles = {};
+    for (var profile in profiles) {
+        var openProfile = profile + "-open";
+        newProfiles[openProfile] = clone(profiles[profile]);
+        newProfiles[openProfile].labels
+            = concat(newProfiles[openProfile].labels || [], "open"),
+            newProfiles[openProfile].configure_args
+                = concat(newProfiles[openProfile].configure_args,
+                "--enable-openjdk-only");
+    }
+    return newProfiles;
+};
+
+/**
  * Deep clones an object tree.
  *
  * @param o Object to clone
--- a/make/jprt.properties	Mon Mar 14 12:00:24 2016 +0100
+++ b/make/jprt.properties	Tue Mar 15 11:08:47 2016 +0100
@@ -79,12 +79,12 @@
 
 # Setup jib profiles
 jprt.linux_i586.product.build.jib.profile=linux-x86
-jprt.linux_x64.build.jib.profile=linux-x64
-jprt.macosx_x64.build.jib.profile=macosx-x64
-jprt.solaris_sparcv9.build.jib.profile=solaris-sparcv9
-jprt.solaris_x64.build.jib.profile=solaris-x64
-jprt.windows_i586.build.jib.profile=windows-x86
-jprt.windows_x64.build.jib.profile=windows-x64
+jprt.linux_x64.product.build.jib.profile=linux-x64
+jprt.macosx_x64.product.build.jib.profile=macosx-x64
+jprt.solaris_sparcv9.product.build.jib.profile=solaris-sparcv9
+jprt.solaris_x64.product.build.jib.profile=solaris-x64
+jprt.windows_i586.product.build.jib.profile=windows-x86
+jprt.windows_x64.product.build.jib.profile=windows-x64
 
 jprt.linux_i586.fastdebug.build.jib.profile=linux-x86-debug
 jprt.linux_x64.fastdebug.build.jib.profile=linux-x64-debug
@@ -94,25 +94,47 @@
 jprt.windows_i586.fastdebug.build.jib.profile=windows-x86-debug
 jprt.windows_x64.fastdebug.build.jib.profile=windows-x64-debug
 
-jprt.solaris_x64.debugOpen.build.jib.profile=solaris-x64-open-debug
+jprt.linux_i586.slowdebug.build.jib.profile=linux-x86-slowdebug
+jprt.linux_x64.slowdebug.build.jib.profile=linux-x64-slowdebug
+jprt.macosx_x64.slowdebug.build.jib.profile=macosx-x64-slowdebug
+jprt.solaris_sparcv9.slowdebug.build.jib.profile=solaris-sparcv9-slowdebug
+jprt.solaris_x64.slowdebug.build.jib.profile=solaris-x64-slowdebug
+jprt.windows_i586.slowdebug.build.jib.profile=windows-x86-slowdebug
+jprt.windows_x64.slowdebug.build.jib.profile=windows-x64-slowdebug
+
+jprt.linux_i586.productOpen.build.jib.profile=linux-x86-open
 jprt.linux_x64.productOpen.build.jib.profile=linux-x64-open
+jprt.macosx_x64.productOpen.build.jib.profile=macosx-x64-open
+jprt.solaris_sparcv9.productOpen.build.jib.profile=solaris-sparcv9-open
+jprt.solaris_x64.productOpen.build.jib.profile=solaris-x64-open
+jprt.windows_i586.productOpen.build.jib.profile=windows-x86-open
+jprt.windows_x64.productOpen.build.jib.profile=windows-x64-open
+
+jprt.linux_i586.fastdebugOpen.build.jib.profile=linux-x86-open-debug
+jprt.linux_x64.fastdebugOpen.build.jib.profile=linux-x64-open-debug
+jprt.macosx_x64.fastdebugOpen.build.jib.profile=macosx-x64-open-debug
+jprt.solaris_sparcv9.fastdebugOpen.build.jib.profile=solaris-sparcv9-open-debug
+jprt.solaris_x64.fastdebugOpen.build.jib.profile=solaris-x64-open-debug
+jprt.windows_i586.fastdebugOpen.build.jib.profile=windows-x86-open-debug
+jprt.windows_x64.fastdebugOpen.build.jib.profile=windows-x64-open-debug
 
 jprt.test.jib.profile=run-test
 
 # Set make target to use for different build flavors
-jprt.build.flavor.debugOpen.target=jprt_bundle
+jprt.build.flavor.fastdebugOpen.target=jprt_bundle
 jprt.build.flavor.fastdebug.target=jprt_bundle
 jprt.build.flavor.product.target=jprt_bundle
 jprt.build.flavor.productOpen.target=jprt_bundle
 jprt.build.flavor.optimized.target=jprt_bundle
 jprt.build.flavor.optimizedOpen.target=jprt_bundle
+jprt.build.flavor.slowdebug.target=jprt_bundle
 
 # Use these configure args to define debug level
-jprt.debug.build.configure.args=
+jprt.slowdebug.build.configure.args=
 jprt.fastdebug.build.configure.args=--disable-precompiled-headers
 jprt.product.build.configure.args=
 jprt.optimized.build.configure.args=--with-debug-level=optimized
-jprt.debugOpen.build.configure.args=${jprt.debug.build.configure.args}
+jprt.slowdebugOpen.build.configure.args=${jprt.slowdebug.build.configure.args}
 jprt.fastdebugOpen.build.configure.args=${jprt.fastdebug.build.configure.args}
 jprt.productOpen.build.configure.args=${jprt.product.build.configure.args}
 jprt.optimizedOpen.build.configure.args=${jprt.product.build.configure.args}
@@ -121,6 +143,8 @@
 # hotspot testset has custom build flavors and build targets
 my.jprt.testsetHasCustomBuildFlavors.hotspot=true
 my.jprt.testsetHasCustomBuildTargets.hotspot=true
+my.jprt.testsetHasCustomBuildFlavors.buildinfra=true
+my.jprt.testsetHasCustomBuildTargets.buildinfra=true
 
 # determine if the specified testset has custom build flavors or build targets
 my.jprt.testsetHasCustomBuildFlavors=${my.jprt.testsetHasCustomBuildFlavors.${jprt.test.set}}
@@ -282,7 +306,7 @@
 
 # The hotspot build flavors
 my.build.flavors.hotspot=						\
-    debugOpen,fastdebug,product,productOpen,optimized,optimizedOpen \
+    fastdebugOpen,fastdebug,product,productOpen,optimized,optimizedOpen \
     ${my.additional.build.flavors.hotspot}
 
 # Platforms built for hotspot push jobs
@@ -294,7 +318,7 @@
     macosx_x64_10.9-{product|fastdebug},				\
     windows_i586_6.3-{product|fastdebug},				\
     windows_x64_6.3-{product|fastdebug},			\
-    solaris_x64_5.11-{debugOpen},					\
+    solaris_x64_5.11-{fastdebugOpen},					\
     linux_x64_3.8-{productOpen},					\
     ${my.additional.build.targets.hotspot}
 
@@ -458,3 +482,28 @@
 
 # Install the test bundle for the nativesanity jtreg tests
 my.jprt.test.bundle.targets.nativesanity=${my.make.rule.test.targets.nativesanity}
+
+################################################################################
+# Testset buildinfra
+my.build.flavors.buildinfra = \
+    product,fastdebug,slowdebug, \
+    ${my.additional.build.flavors.buildinfra}
+
+# Platforms built for hotspot push jobs
+my.build.targets.buildinfra = \
+    solaris_sparcv9_5.11-{product|fastdebug|slowdebug}, \
+    solaris_x64_5.11-{product|fastdebug|slowdebug}, \
+    linux_i586_3.8-{product|fastdebug|slowdebug}, \
+    linux_x64_3.8-{product|fastdebug|slowdebug}, \
+    macosx_x64_10.9-{product|fastdebug|slowdebug}, \
+    windows_i586_6.3-{product|fastdebug|slowdebug}, \
+    windows_x64_6.3-{product|fastdebug|slowdebug}, \
+    ${my.additional.build.targets.buildinfra}
+
+my.test.targets.buildinfra = \
+    ${my.test.targets.default}, \
+    ${my.test.targets.hotspot}
+
+my.make.rule.test.targets.buildinfra = \
+    ${my.make.rule.test.targets.default}, \
+    ${my.make.rule.test.targets.hotspot}