diff --git a/config/global_config.py b/config/global_config.py index d492a61..e258738 100644 --- a/config/global_config.py +++ b/config/global_config.py @@ -162,11 +162,11 @@ def get_32b_arch_identifiers_in_scriptlets(arch): TEMURIN = "temurin" LIST_OF_PROPRIETARY_VENDORS = [IBM, ORACLE] -LIST_OF_OPEN_VENDORS_EXCEPT_ITW = [OPENJDK, ADOPTIUM] +LIST_OF_OPEN_VENDORS_EXCEPT_ITW = [OPENJDK, TEMURIN] LIST_OF_OPEN_VENDORS = LIST_OF_OPEN_VENDORS_EXCEPT_ITW + [ITW] LIST_OF_POSSIBLE_VENDORS = LIST_OF_PROPRIETARY_VENDORS + LIST_OF_OPEN_VENDORS LIST_OF_POSSIBLE_VENDORS_WITHOUT_ITW = LIST_OF_PROPRIETARY_VENDORS + LIST_OF_OPEN_VENDORS_EXCEPT_ITW -LIST_OF_LEGACY_VERSIONS = ["1.7.0", "1.8.0"] -LIST_OF_NEW_VERSIONS = ["11", "17", "latest"] +LIST_OF_LEGACY_VERSIONS = ["1.7.0", "1.8.0", "8", "11"] +LIST_OF_NEW_VERSIONS = ["17", "21", "25", "latest"] LIST_OF_POSSIBLE_VERSIONS = [ITW] + LIST_OF_LEGACY_VERSIONS + LIST_OF_NEW_VERSIONS LIST_OF_POSSIBLE_VERSIONS_WITHOUT_ITW = LIST_OF_LEGACY_VERSIONS + LIST_OF_NEW_VERSIONS diff --git a/testcases/alternativesTests/binaries_test.py b/testcases/alternativesTests/binaries_test.py index 8365434..e2eb292 100644 --- a/testcases/alternativesTests/binaries_test.py +++ b/testcases/alternativesTests/binaries_test.py @@ -161,7 +161,7 @@ def setCSCH(self): return else: raise ex.UnknownJavaVersionException("Unknown Oracle java version") - elif rpms.getVendor() == gc.ADOPTIUM: + elif rpms.getVendor() == gc.TEMURIN: if int(rpms.getMajorVersionSimplified()) == 8: self.csch = tcc.Temurin8(BinariesTest.instance) return diff --git a/testcases/alternativesTests/binaries_test_config_classes.py b/testcases/alternativesTests/binaries_test_config_classes.py index 6352a14..a2e28af 100644 --- a/testcases/alternativesTests/binaries_test_config_classes.py +++ b/testcases/alternativesTests/binaries_test_config_classes.py @@ -539,8 +539,8 @@ class Temurin8(bsm.BinarySlaveTestMethods): def _get_subpackages_with_binaries(self): return [tc.JRE, tc.JDK] - def _get_binary_directory_name(self, name): - return tc.JVM_DIR + "/{}/bin".format(ns.get_package_name(name)) + def _get_binary_directory_path(self, name): + return tc.JVM_DIR + "/" + ns.get_package_name(name) def _get_jre_subpackage(self): return [tc.JRE] @@ -565,12 +565,12 @@ def _check_binaries_against_hardcoded_list(self, binaries, subpackage): if not tu.passed_or_failed(self, subpackage in hardcoded_binaries.keys(), "Binaries in unexpected subpackage: " + subpackage): return - tu.passed_or_failed(self, sorted(binaries) == sorted(hardcoded_binaries[subpackage]), + missing_binaries = tu.two_lists_diff(hardcoded_binaries[subpackage], binaries) + extra_binaries = tu.two_lists_diff(binaries, hardcoded_binaries[subpackage]) + is_same = sorted(binaries) == sorted(hardcoded_binaries[subpackage]) + tu.passed_or_failed(self, is_same, "Hardcode check: binaries are not as expected in {} subpackage. Missing binaries: {}." - " Extra binaries: {}".format(subpackage, tu.two_lists_diff(hardcoded_binaries[subpackage], - binaries), - tu.two_lists_diff(binaries, - hardcoded_binaries[subpackage]))) + " Extra binaries: {}".format(subpackage, missing_binaries,extra_binaries)) return @@ -584,6 +584,9 @@ class Temurin11(Temurin8): JRE_BINARIES = ["java", "keytool", "pack200", "rmid", "unpack200", "jjs", "rmiregistry", "jfr", "jrunscript", "jaotc"] + def check_java_cgi(self, args=None): + return + class Temurin17(Temurin11): JDK_BINARIES = ["javac", "jdeps", "javadoc", "jfr", "jstack", "jstat", diff --git a/testcases/alternativesTests/binaries_test_methods.py b/testcases/alternativesTests/binaries_test_methods.py index da04a1f..a31c28c 100644 --- a/testcases/alternativesTests/binaries_test_methods.py +++ b/testcases/alternativesTests/binaries_test_methods.py @@ -166,7 +166,7 @@ def all_jre_in_sdk_check(self, args=None): tu.passed_or_failed(self, True, "") except ValueError: tu.passed_or_failed(self, False, "Binary " + j + " is present in JRE, but is missing in SDK.") - self.installed_binaries[current_subpkg] = sdk + #self.installed_binaries[current_subpkg] = sdk return def _extract_suffix_from_subpkg(self, subpkg): diff --git a/testcases/alternativesTests/permissions_test.py b/testcases/alternativesTests/permissions_test.py index 76c3889..3a0897a 100644 --- a/testcases/alternativesTests/permissions_test.py +++ b/testcases/alternativesTests/permissions_test.py @@ -271,6 +271,38 @@ class OpenJdkPostChange(OpenJdk8): def _get_target_java_directory(self, name): return pkgsplit.get_jvm_dir_post_change(name) +class Temurin(BaseTest): + def _get_target_java_directory(self, name): + return "-".join(["java", pkgsplit.get_major_ver(name), pkgsplit.get_vendor(name), pkgsplit.get_subpackage_only(name)]) + + def _test_fill_in(self, file, filetype, expected_permission): + """ + This method takes as an argument path to a file, type of the file for logs, expected permission and checks, + if it matches results from chroot. It also documents any fails or successful checks. + For Temurin I decided to be more permissive and allow it to have either same or lower permission for a file, then openjdk counterpart. + """ + out, res = DefaultPodman().executeCommand(['stat -c "%a" ' + file]) + if out == "775" and "ibm" in file: + PermissionTest.instance.log("Skipping " + file + ". Some unzipped Ibm packages are acting wierdly in podman. " + "Howewer, in installed JDK, the permissions are correct.", + vc.Verbosity.TEST) + return + if res != 0: + passed_or_failed(self, False, filetype + " link is broken, could not find " + file) + return + else: + PermissionTest.instance.log(filetype + " {} exists. Checking permissions... ".format(file), + vc.Verbosity.PODMAN) + for p in range(3): + if not (int(out[p]) <= int(expected_permission[p])): + passed_or_failed(self, False, "Permissions of {} not as expected, should be {} but is " + "{}.".format(file, expected_permission, out)) + return + PermissionTest.instance.log(filetype + " {} with permissions {}. Check " + "successful.".format(file, out), vc.Verbosity.PODMAN) + passed_or_failed(self, True, "") + return + class Oracle(BaseTest): pass @@ -319,8 +351,8 @@ def setCSCH(self): # TODO might be worth to check also other subdirectories self.csch = BaseTest() return - if rpms.getVendor() == gc.ADOPTIUM: - self.csch = BaseTest() + if rpms.getVendor() == gc.TEMURIN: + self.csch = Temurin() return raise UnknownJavaVersionException("Unknown JDK version!!!") diff --git a/testcases/linkTests/subdirectory_test.py b/testcases/linkTests/subdirectory_test.py index 4c8dac5..1aa4e5a 100644 --- a/testcases/linkTests/subdirectory_test.py +++ b/testcases/linkTests/subdirectory_test.py @@ -128,7 +128,7 @@ def _subdirectory_test(self, pkgs): name = os.path.basename(pkg) _subpkg = rename_default_subpkg(pkgsplit.get_subpackage_only(name)) if _subpkg not in self._get_expected_subdirectories(name).keys(): - continue + pass if not DefaultPodman().run_all_scriptlets_for_install(pkg): SubdirectoryTest.instance.log("Skipping subdirectory test for {}".format(_subpkg), vc.Verbosity.TEST) continue @@ -212,8 +212,10 @@ def _get_main_subdir(self, name): return "java" + "-" + self._get_major_version() + "-" + self.rpms.getVendor() class Temurin(OpenJdk11): def _get_expected_subdirectories(self, name): - subdirs = {JRE: ["-".join([gc.TEMURIN, self.rpms.getMajorVersionSimplified(), JRE])], - JDK: ["-".join([gc.TEMURIN, self.rpms.getMajorVersionSimplified(), JDK])]} + subdirs = {} + for subpkg in [JRE, JDK]: + subdirs[subpkg] =["-".join([gc.JAVA_STRING, self.rpms.getMajorVersionSimplified(), gc.TEMURIN, subpkg]), + "-".join([gc.TEMURIN, self.rpms.getMajorVersionSimplified(), subpkg.lower()])] return subdirs def _get_expected_link(self, name): @@ -334,7 +336,7 @@ def setCSCH(self): elif rpms.getVendor() == gc.ITW: self.csch = ITW() return - elif rpms.getVendor() == gc.ADOPTIUM: + elif rpms.getVendor() == gc.TEMURIN: self.csch = Temurin() return diff --git a/testcases/manpagesTests/manpage_test.py b/testcases/manpagesTests/manpage_test.py index dc77675..01ccfa4 100644 --- a/testcases/manpagesTests/manpage_test.py +++ b/testcases/manpagesTests/manpage_test.py @@ -14,7 +14,6 @@ import config.global_config as gc import utils.test_constants as tc import config.verbosity_config as vc -import utils.pkg_name_split as ns MANPAGE_SUFFIX = ".1.gz" @@ -538,7 +537,7 @@ def manpage_file_check(self, bins, subpackage=None, plugin_bin_content=None, man def _get_manpages_without_postscript(self, default_mans, subpkg): return self._clean_default_mpges(default_mans, - mexe.DefaultPodman().execute_ls(tc.JVM_DIR + "/" + self.rpms.getMajorPackage() + "-" + subpkg + "/man/man1")[0] + mexe.DefaultPodman().execute_ls(tc.JVM_DIR + "/" + "-".join([gc.JAVA_STRING, self.rpms.getMajorVersionSimplified(), self.rpms.getVendor(), subpkg]) + "/man/man1")[0] .split()) @@ -628,7 +627,7 @@ def setCSCH(self): elif rpms.getVendor() == gc.IBM_SEMERU: self.csch = OpenJdk21Semeru() return - elif rpms.getVendor() == gc.ADOPTIUM: + elif rpms.getVendor() == gc.TEMURIN: if int(rpms.getMajorVersionSimplified()) == 8: self.csch = Temurin8() return diff --git a/testcases/nameTest/initibuild_test.py b/testcases/nameTest/initibuild_test.py index 9405bee..bd8c8b5 100644 --- a/testcases/nameTest/initibuild_test.py +++ b/testcases/nameTest/initibuild_test.py @@ -169,7 +169,7 @@ def setCSCH(self): if rpms.getJava() == gc.ITW: self.log("Set ItwVersionCheck") self.csch = testcases.nameTest.connfigs.initbuild_config.ItwVersionCheck() - elif rpms.getVendor() == gc.ADOPTIUM: + elif rpms.getVendor() == gc.TEMURIN: self.log("Set TemurinCheck") self.csch = testcases.nameTest.connfigs.initbuild_config.TemurinCheck() else: diff --git a/testcases/nameTest/name_test.py b/testcases/nameTest/name_test.py index 68cb8b8..9112dda 100644 --- a/testcases/nameTest/name_test.py +++ b/testcases/nameTest/name_test.py @@ -33,7 +33,7 @@ def __init__(self): super().__init__() def aMatchesB(self, a, b): - return self.csch.checkRegex(a) + return self.csch.checkRegex(a) def checkFilesAgainstValues(self, values, function): return self.checkFilesAgainstComparator(values, function, aInB) @@ -107,7 +107,7 @@ def setCSCH(self): self.log("Set ItwRegexCheck") self.csch = testcases.nameTest.connfigs.nametest_config.ItwRegexCheck() return - if config.runtime_config.RuntimeConfig().getRpmList().getJava() == gc.TEMURIN: + if config.runtime_config.RuntimeConfig().getRpmList().getVendor() == gc.TEMURIN: self.log("Set Temurin Regex Check") self.csch = testcases.nameTest.connfigs.nametest_config.TemurinRegexCheck() return diff --git a/testcases/nameTest/subpackages_test.py b/testcases/nameTest/subpackages_test.py index 9b91a58..c59697c 100644 --- a/testcases/nameTest/subpackages_test.py +++ b/testcases/nameTest/subpackages_test.py @@ -448,7 +448,7 @@ def setCSCH(self): elif rpms.getVendor() == gc.IBM_SEMERU: self.csch = OpenJdkLatest() return - elif rpms.getVendor() == gc.ADOPTIUM: + elif rpms.getVendor() == gc.TEMURIN: self.csch = BaseTemurinPackages() return raise ex.UnknownJavaVersionException("Java version or OS was not recognized by this framework.") diff --git a/testcases/priorityTest/postinstall_master_test.py b/testcases/priorityTest/postinstall_master_test.py index c308a15..4e99597 100644 --- a/testcases/priorityTest/postinstall_master_test.py +++ b/testcases/priorityTest/postinstall_master_test.py @@ -510,7 +510,7 @@ def setCSCH(self): return else: raise ex.UnknownJavaVersionException("Unknown Oracle java version.") - elif rpms.getVendor() == gc.ADOPTIUM: + elif rpms.getVendor() == gc.TEMURIN: self.csch = Temurin() return else: diff --git a/testcases/priorityTest/priority_test.py b/testcases/priorityTest/priority_test.py index 87dc3f6..7262242 100644 --- a/testcases/priorityTest/priority_test.py +++ b/testcases/priorityTest/priority_test.py @@ -24,6 +24,8 @@ PREFIX_210 = "210" PREFIX_1700 = "1700" PREFIX_2100 = "2100" +PREFIX_1161 = "1161" +PREFIX_1712 = "1712" LEN_4 = 4 LEN_5 = 5 LEN_6 = 6 @@ -224,6 +226,11 @@ def __init__(self): super().__init__(LEN_4, PREFIX_111) +class Temurin17(MajorCheck): + def __init__(self): + super().__init__(LEN_4, PREFIX_1712) + + class PriorityCheck(utils.core.base_xtest.BaseTest): instance = None @@ -273,8 +280,8 @@ def setCSCH(self): elif rpms.getVendor() == gc.ITW: self.csch = IcedTeaWeb() return - elif rpms.getVendor() == gc.ADOPTIUM: - self.csch = Temurin() + elif rpms.getVendor() == gc.TEMURIN: + self.csch = Temurin17() return else: raise ex.UnknownJavaVersionException("Unknown platform, java was not identified.") diff --git a/testcases/rpmTests/ghost_test.py b/testcases/rpmTests/ghost_test.py index e002eb9..c5de64f 100644 --- a/testcases/rpmTests/ghost_test.py +++ b/testcases/rpmTests/ghost_test.py @@ -8,6 +8,8 @@ import utils.test_constants as tc import utils.core.configuration_specific as cs import config.runtime_config as rc +import config.global_config as gc + class GhostTest(bt.BaseTest): @@ -21,15 +23,19 @@ def test_ghosts(self): def setCSCH(self): arch = self.getCurrentArch() rpms = rc.RuntimeConfig().getRpmList() - if int(rpms.getMajorVersionSimplified()) == 8: - if tc.is_arch_jitarch(arch) and "ppc" not in arch: - self.csch = Ojdk8JIT() - return - else: - self.csch = Ojdk8NonJIT() + if rpms.getVendor() == gc.OPENJDK: + if int(rpms.getMajorVersionSimplified()) == 8: + if tc.is_arch_jitarch(arch) and "ppc" not in arch: + self.csch = Ojdk8JIT() + return + else: + self.csch = Ojdk8NonJIT() + return + elif int(rpms.getMajorVersionSimplified()) == 11: + self.csch = Ojdk11JIT() return - elif int(rpms.getMajorVersionSimplified()) == 11: - self.csch = Ojdk11JIT() + elif rpms.getVendor() == gc.TEMURIN: + self.csch = Temurin() return else: self.csch = OjdklatestJIT() @@ -186,6 +192,12 @@ def _get_hardcoded_ghosts(self, file): # ghosts.add("/usr/lib/jvm/" + nvra + debugsuffix + "/lib/server/classes.jsa") return ghosts +class Temurin(OjdklatestJIT): + def _get_hardcoded_ghosts(self, file): + ghosts = super(Temurin, self)._get_hardcoded_ghosts(file) + ghosts.add("/usr/lib/jvm/java-{}-temurin-{}".format(ns.get_major_ver(file), ns.get_subpackage_only(file))) + return ghosts + def testAll(): return GhostTest().execute_tests() diff --git a/testcases/rpmTests/provides_test.py b/testcases/rpmTests/provides_test.py index 6d9ba6d..d8de99c 100644 --- a/testcases/rpmTests/provides_test.py +++ b/testcases/rpmTests/provides_test.py @@ -234,7 +234,7 @@ def setCSCH(self): self.log("Set ItwVersionCheck") self.csch = ITWeb(ProvidesTest.instance) return - elif rpms.getVendor() == gc.ADOPTIUM: + elif rpms.getVendor() == gc.TEMURIN: self.csch = Temurin(ProvidesTest.instance) return else: diff --git a/testcases/rpmTests/requires_test.py b/testcases/rpmTests/requires_test.py index 62946ea..f511da2 100644 --- a/testcases/rpmTests/requires_test.py +++ b/testcases/rpmTests/requires_test.py @@ -90,7 +90,7 @@ def __init__(self): def setCSCH(self): rpms = rc.RuntimeConfig().getRpmList() - if rpms.getVendor() == gc.ADOPTIUM: + if rpms.getVendor() == gc.TEMURIN: self.csch = Temurin(self) return self.csch = Default(self) diff --git a/testcases/scripletTests/scriplet_test.py b/testcases/scripletTests/scriplet_test.py index fcfa9e4..9286ff3 100644 --- a/testcases/scripletTests/scriplet_test.py +++ b/testcases/scripletTests/scriplet_test.py @@ -45,7 +45,7 @@ def _get_expected_scriptlets(self, pkg): class TemurinScriptletCsch(GenericScriptletCsch): def _get_expected_scriptlets(self, pkg): - return [rpmbu.POSTINSTALL, rpmbu.PREUNINSTALL] + return [rpmbu.POSTINSTALL, rpmbu.PREUNINSTALL, rpmbu.POSTTRANS] class SemeruSriptletCsch(GenericScriptletCsch): @@ -101,7 +101,7 @@ def check_allScripletsPReturnsZero(self, pkgs): self.log("is " + str(len(content)) + " lines long") self.log("executing " + scriplet + " in " + ntpath.basename(pkg)) arg = "1" if scriplet in ScripletStarterFinisher.installScriptlets else "0" - o, r = DefaultPodman().executeScriptlet(pkg, scriplet, arg) + o, r = DefaultPodman().executeScriptlet(pkg, scriplet, script_arg=arg) self.log(scriplet + " returned " + str(r) + " of " + ntpath.basename(pkg)) tu.passed_or_failed(self, r == 0, "scriptlet {} returning non zero value for {}".format(scriplet, pkg) @@ -110,7 +110,7 @@ def check_allScripletsPReturnsZero(self, pkgs): def setCSCH(self): rpms = rc.RuntimeConfig().getRpmList() - if rpms.getVendor() == gc.ADOPTIUM: + if rpms.getVendor() == gc.TEMURIN: self.csch = TemurinScriptletCsch() elif rpms.getVendor() == gc.IBM and int(rpms.getMajorVersionSimplified()) >= 21: self.csch = SemeruSriptletCsch() diff --git a/testcases/virtualDeps/obsolete_test.py b/testcases/virtualDeps/obsolete_test.py index ce4a943..c77385d 100644 --- a/testcases/virtualDeps/obsolete_test.py +++ b/testcases/virtualDeps/obsolete_test.py @@ -7,6 +7,8 @@ import utils.core.base_xtest import outputControl.logging_access as la import utils.test_utils as tu +import utils.test_constants as tc +import config.global_config as gc class Base(cs.JdkConfiguration): @@ -48,11 +50,15 @@ class JdkRhel(Base): def _checkJreObsolete(self, obsoletes=None): self._document("Jdks in rhel must NOT obsolete anything. Possible exceptions: " + ",".join(JdkRhel.jreExceptionsObsolete)) - tu.passed_or_failed(self, len(set(obsoletes)-set(JdkRhel.jreExceptionsObsolete)) == 0, + tu.passed_or_failed(self, len(set(obsoletes)-set(self.jreExceptionsObsolete)) == 0, "Number of obsoletes and obsoleteExceptions is not same.", "this test is checking only count of obsoletes vs count of exceptions, needs rework") return self.passed, self.failed +class TemurinRhel(JdkRhel): + jreExceptionsObsolete = ["-".join([gc.TEMURIN, config.runtime_config.RuntimeConfig().getRpmList().getMajorVersionSimplified(), tc.JRE]), + "-".join([gc.TEMURIN, config.runtime_config.RuntimeConfig().getRpmList().getMajorVersionSimplified(), tc.JDK])] + class ObsolateTest(utils.core.base_xtest.BaseTest): @@ -67,6 +73,9 @@ def setCSCH(self): if config.runtime_config.RuntimeConfig().getRpmList().isItw() : self.csch = ITW() return + elif config.runtime_config.RuntimeConfig().getRpmList().getVendor() == gc.TEMURIN: + self.csch = TemurinRhel() + return else: self.csch = JdkRhel() diff --git a/utils/pkg_name_split.py b/utils/pkg_name_split.py index 9a66c8b..99a4fa2 100644 --- a/utils/pkg_name_split.py +++ b/utils/pkg_name_split.py @@ -14,8 +14,8 @@ def _rpmname_split_mapper(name): parts1 = _hyphen_split(name) parts2 = _dot_split(name) - if gc.TEMURIN in name: - return RpmNameParts(gc.TEMURIN, parts1[1], gc.ADOPTIUM, parts1[2], parts1[4], parts2[1], parts2[0], parts2[2]) + #if gc.TEMURIN in name: + # return RpmNameParts(gc.TEMURIN, parts1[1], gc.ADOPTIUM, parts1[3], parts1[4], parts2[1], parts2[0], parts2[2]) return RpmNameParts(parts1[0], parts1[1], parts1[2], parts1[3], parts1[4], parts2[0], parts2[1], parts2[2]) @@ -42,6 +42,10 @@ def _hyphen_split(name): pkg = '-'.join(pkg) java_ver = version.split(".")[0] return [java, java_ver, vendor, pkg, version, whole_end] + elif name.startswith(gc.TEMURIN): + vendor, java_ver, *pkg, version, whole_end = hyphen_parts + pkg= '-'.join(pkg) + return [gc.JAVA_STRING, java_ver, vendor, pkg, version, whole_end] else: java, java_ver, vendor, *pkg, version, whole_end = hyphen_parts pkg = '-'.join(pkg) @@ -223,6 +227,8 @@ def get_jvm_dir_pre_change(name): def get_jvm_dir_post_change(name): dir_name_no_suffix = get_major_package_name(name) + if get_vendor(name) == gc.ADOPTIUM: + dir_name_no_suffix = "-".join([gc.JAVA_STRING, get_major_ver(name), get_javaprefix(name)]) for suffix in tc.get_debug_suffixes(): if suffix in name: return dir_name_no_suffix + suffix diff --git a/utils/podman/dockerfiles/RunScriptlet b/utils/podman/dockerfiles/RunScriptlet index eda285d..a3118c6 100644 --- a/utils/podman/dockerfiles/RunScriptlet +++ b/utils/podman/dockerfiles/RunScriptlet @@ -10,6 +10,7 @@ COPY $FILE /tmp/$FILE # Example of an operation that will be run on any base image ARG EXECUTOR -RUN $EXECUTOR /tmp/$FILE || echo "$FILE failed!!" +ARG SCRIPTARG +RUN $EXECUTOR /tmp/$FILE $SCRIPTARG || echo "$FILE failed!!" CMD ["bash"] \ No newline at end of file diff --git a/utils/podman/podman_executor.py b/utils/podman/podman_executor.py index 0486875..03309f2 100644 --- a/utils/podman/podman_executor.py +++ b/utils/podman/podman_executor.py @@ -120,12 +120,13 @@ def provideCleanUsefullRoot(self): self.inited = True self.current_snapshot = initName - def executeScriptlet(self, rpmFile, scriptletName, extraFlag=""): + def executeScriptlet(self, rpmFile, scriptletName, extraFlag="", script_arg=None): executor, scriptletFile = self.saveScriptlet(rpmFile, scriptletName) scriptletFileName = scriptletFile.split("/")[-1] containerName = self.current_snapshot.split("_")[0] + "_" + scriptletName + (("_" + extraFlag) if extraFlag != "" else "") + script_arg_addition = [] if script_arg is None else ["--build-arg", "SCRIPTARG=" + script_arg] o, e, r = exxec.processToStringsWithResult( - self.mainCommand() + [containerName, "-f", "utils/podman/dockerfiles/RunScriptlet", ".", "--build-arg", "BASE_IMAGE=" + self.current_snapshot, "--build-arg", "EXECUTOR=" + executor, "--build-arg", "FILE=" + self.scriptletTmpDir + "/" + scriptletFileName]) + self.mainCommand() + [containerName, "-f", "utils/podman/dockerfiles/RunScriptlet", ".", "--build-arg", "BASE_IMAGE=" + self.current_snapshot, "--build-arg", "EXECUTOR=" + executor, "--build-arg", "FILE=" + self.scriptletTmpDir + "/" + scriptletFileName] + script_arg_addition) if scriptletFileName + " failed!!" in o: r = 1 if r != 0: @@ -155,7 +156,7 @@ def run_all_scriptlets_for_install(self, pkg): os.path.basename(pkg), vc.Verbosity.TEST) try: - self.executeScriptlet(pkg, script, "a") + self.executeScriptlet(pkg, script, "a", "1") except utils.podman.podman_execution_exception.PodmanExecutionException: la.LoggingAccess().log(" " + script + " script not found in " + os.path.basename(pkg), diff --git a/utils/rpm_list.py b/utils/rpm_list.py index aee2a14..12d8308 100644 --- a/utils/rpm_list.py +++ b/utils/rpm_list.py @@ -4,7 +4,6 @@ import config.global_config import config.runtime_config import outputControl.logging_access as la -import utils.process_utils import utils.test_utils as tu import utils.test_constants as tc import config.verbosity_config as vc @@ -211,7 +210,7 @@ def is_system_jdk(self): return int(self.getMajorVersionSimplified()) == 11 else: return int(self.getMajorVersionSimplified()) == 8 - elif self.getVendor() == gc.ADOPTIUM: + elif self.getVendor() == gc.TEMURIN: return False else: if int(self.getOsVersionMajor()) <= 8: