8184075: Make run-test-prebuilt profile more robust
authorerikj
Tue, 11 Jul 2017 14:04:05 +0200
changeset 45824 d161a843e941
parent 45823 f3cf2ee05985
child 45828 49b020ee2a6a
8184075: Make run-test-prebuilt profile more robust Reviewed-by: tbell
common/conf/jib-profiles.js
--- a/common/conf/jib-profiles.js	Thu Jul 06 16:03:54 2017 +0200
+++ b/common/conf/jib-profiles.js	Tue Jul 11 14:04:05 2017 +0200
@@ -615,6 +615,8 @@
     }
     var testOnlyProfilesPrebuilt = {
         "run-test-prebuilt": {
+            target_os: input.build_os,
+            target_cpu: input.build_cpu,
             src: "src.conf",
             dependencies: [ "jtreg", "gnumake", "boot_jdk", testedProfile + ".jdk",
                 testedProfile + ".test", "src.full"
@@ -635,13 +637,14 @@
     if (input.profile == "run-test-prebuilt") {
         if (profiles[testedProfile] == null) {
             error("testedProfile is not defined: " + testedProfile);
-        } else {
-            testOnlyProfilesPrebuilt["run-test-prebuilt"]["target_os"]
-                = profiles[testedProfile]["target_os"];
-            testOnlyProfilesPrebuilt["run-test-prebuilt"]["target_cpu"]
-                = profiles[testedProfile]["target_cpu"];
         }
     }
+    if (profiles[testedProfile] != null) {
+        testOnlyProfilesPrebuilt["run-test-prebuilt"]["target_os"]
+            = profiles[testedProfile]["target_os"];
+        testOnlyProfilesPrebuilt["run-test-prebuilt"]["target_cpu"]
+            = profiles[testedProfile]["target_cpu"];
+    }
     profiles = concatObjects(profiles, testOnlyProfilesPrebuilt);
 
     // On macosx add the devkit bin dir to the path in all the run-test profiles.