コード例 #1
0
    def setCSCH(self):
        SubpackagesTest.instance = self
        rpms = config.runtime_config.RuntimeConfig().getRpmList()
        if rpms.getJava() == gc.ITW:
            if rpms.getOsVersionMajor() == 7:
                self.csch = ItwEl7Subpackages()
                return
            self.csch = ItwSubpackages()
            return

        if rpms.getVendor() == gc.OPENJDK or rpms.getVendor() == gc.OPENJ9:
            if rpms.getMajorVersionSimplified() == "8":
                if rpms.isRhel():
                    if self.getCurrentArch() in gc.getPpc32Arch(
                    ) + gc.getS390Arch() + gc.getS390xArch():
                        self.csch = OpenJdk8Debuginfo()
                        return
                    else:
                        self.csch = OpenJdk8DebugDebuginfo()
                        return
                elif rpms.isFedora():
                    if int(rpms.getOsVersion()) < 27:
                        if self.getCurrentArch() in gc.getArm32Achs():
                            self.csch = OpenJdk8()
                            return
                        elif self.getCurrentArch(
                        ) in gc.getAarch64Arch() + gc.getPower64Achs():
                            self.csch = OpenJdk8Debug()
                            return
                        elif self.getCurrentArch(
                        ) in gc.getIx86archs() + gc.getX86_64Arch():
                            self.csch = OpenJdk8JFX()
                            return
                        else:
                            raise ex.UnknownJavaVersionException(
                                "Check for this arch is not implemented for given OS."
                            )
                    if int(rpms.getOsVersion()) > 26:
                        if self.getCurrentArch(
                        ) in gc.getIx86archs() + gc.getX86_64Arch():
                            self.csch = OpenJdk8JFXDebuginfo()
                            return
                        elif self.getCurrentArch(
                        ) in gc.getArm32Achs() + gc.getS390xArch():
                            self.csch = OpenJdk8Debuginfo()
                            return
                        elif self.getCurrentArch(
                        ) in gc.getAarch64Arch() + gc.getPower64Achs():
                            self.csch = OpenJdk8DebugDebuginfo()
                            return
                        else:
                            raise ex.UnknownJavaVersionException(
                                "Check for this arch is not implemented for given OS."
                            )

                else:
                    raise ex.UnknownJavaVersionException("Unrecognized OS.")

            elif rpms.getMajorVersionSimplified() == '11':
                if self.getCurrentArch(
                ) in gc.getPpc32Arch() + gc.getS390Arch():
                    self.csch = OpenJdk11()
                    return
                elif self.getCurrentArch() in gc.getArm32Achs():
                    self.csch = OpenJdk11armv7hl()
                    return
                elif rpms.getOs() == gc.RHEL:
                    self.csch = OpenJdk11DebugRhel()
                    return
                else:
                    self.csch = OpenJdk11DebugFc()
                    return
            elif int(rpms.getMajorVersionSimplified()) >= 13:
                if self.getCurrentArch() in gc.getArm32Achs():
                    self.csch = OpenJdkLatestarmv7hl()
                    return
                elif rpms.getOs() == gc.RHEL:
                    if rpms.getOsVersionMajor() == 7:
                        self.csch = OpenJdkLatestel7()
                        return
                self.csch = OpenJdkLatest()
                return
            else:
                raise ex.UnknownJavaVersionException(
                    "Unknown OpenJDK version.")

        if rpms.getVendor() == gc.SUN:
            self.csch = OracleAndIbmAddPlugin()
            return
        if rpms.getVendor() == gc.ORACLE:
            self.csch = Oracle7and8()
            return
        if rpms.getVendor() == gc.IBM:
            if rpms.getMajorVersionSimplified() == "7":
                if self.getCurrentArch() in gc.getPpc32Arch(
                ) + gc.getIx86archs() + gc.getX86_64Arch():
                    self.csch = OracleAndIbmAddPlugin()
                    return
                else:
                    self.csch = OracleAndIbmBase()
                    return
            elif rpms.getMajorVersionSimplified() == "8":
                if rpms.getOs() == "RHEL" and rpms.getOsVersionMajor() == 7:
                    if self.getCurrentArch() in gc.getPpc32Arch() + gc.getIx86archs() + gc.getX86_64Arch() + \
                         gc.getPower64BeAchs():
                        self.csch = Ibm8El7withPlugin()
                        return
                    self.csch = Ibm8El7()
                    return
                elif self.getCurrentArch() in gc.getPpc32Arch() + gc.getIx86archs() + gc.getX86_64Arch() +\
                                            gc.getPower64BeAchs() + gc.getPower64LeAchs():
                    self.csch = Ibm8withWS()
                    return
                else:
                    self.csch = OracleAndIbmBase()
                    return
            else:
                raise ex.UnknownJavaVersionException(
                    "Ibm java version unknown.")

        raise ex.UnknownJavaVersionException(
            "Java version or OS was not recognized by this framework.")
コード例 #2
0
    def setCSCH(self):
        ManpageTests.instance = self
        rpms = rc.RuntimeConfig().getRpmList()
        self.log("Checking man pages for " + rpms.getMajorPackage(), vc.Verbosity.TEST)

        if rpms.getVendor() == gc.OPENJDK or rpms.getVendor() == gc.OPENJ9:
            if rpms.getMajorVersionSimplified() == "6":
                self.csch = OpenJdk6()
                return

            elif rpms.getMajorVersionSimplified() == "7":
                self.csch = OpenJdk7()
                return

            elif rpms.getMajorVersionSimplified() == "8"\
                    or rpms.getMajorVersionSimplified() == "9":
                if self.getCurrentArch() in gc.getX86_64Arch() + gc.getIx86archs():
                    self.csch = OpenJdk8WithDebug()
                    return
                else:
                    self.csch = OpenJdk8()
                    return
            elif int(rpms.getMajorVersionSimplified()) == 10:
                if self.getCurrentArch() in gc.getArm32Achs():
                    self.csch = OpenJdk10()
                    return
                elif self.getCurrentArch() in gc.getX86_64Arch():
                    self.csch = OpenJdk10Debugx64()
                    return
                else:
                    self.csch = OpenJdk10Debug()
                    return
            elif int(rpms.getMajorVersionSimplified()) == 11:
                if self.getCurrentArch() in gc.getArm32Achs():
                    self.csch = OpenJdk11armv7hl()
                    return
                elif self.getCurrentArch() in gc.getX86_64Arch() + gc.getAarch64Arch():
                    self.csch = OpenJdk11Debugx64()
                    return
                else:
                    if rpms.isRhel() and self.getCurrentArch() in gc.getS390Arch() + gc.getPpc32Arch():
                        self.csch = OpenJdk11()
                    elif self.getCurrentArch() in gc.getS390xArch():
                        self.csch = OpenJdk11s390x()
                    else:
                        self.csch = OpenJdk11Debug()
                    return
            elif int(rpms.getMajorVersionSimplified()) >= 12:
                if self.getCurrentArch() in gc.getArm32Achs():
                    self.csch = OpenJdk12()
                    return
                elif self.getCurrentArch() in gc.getX86_64Arch() + gc.getAarch64Arch():
                    self.csch = OpenJdk12Debugx64()
                    return
                else:
                    if rpms.isRhel() and self.getCurrentArch() in gc.getS390Arch() + gc.getPpc32Arch():
                        self.csch = OpenJdk12()
                    elif self.getCurrentArch() in gc.getS390xArch() + gc.getPpc32Arch():
                        self.csch = OpenJdk12s390x()
                    else:
                        self.csch = OpenJdk12Debug()
                    return
            else:
                raise ex.UnknownJavaVersionException("Unknown java version.")

        elif rpms.getVendor() == gc.ITW:
            if self.getCurrentArch() in gc.getX86_64Arch() + gc.getPower64Achs() + \
                    gc.getAarch64Arch() + gc.getS390xArch():
                self.csch = Itw64Bit()
                return
            else:
                self.csch = ITW()
                return
        elif rpms.getVendor() == gc.SUN or rpms.getVendor() == gc.ORACLE:
            if rpms.getMajorVersionSimplified() == "6":
                self.csch = Oracle6()
                return
            elif rpms.getMajorVersionSimplified() == "7" or rpms.getMajorVersionSimplified() == "8":
                self.csch = Oracle()
                return
            else:
                raise ex.UnknownJavaVersionException("Unknown java version.")

        elif rpms.getVendor() == gc.IBM:
            self.csch = Ibm()
            return

        else:
            raise ex.UnknownJavaVersionException("Unknown platform, java was not identified.")
コード例 #3
0
    def setCSCH(self):
        SubdirectoryTest.instance = self
        rpms = rc.RuntimeConfig().getRpmList()
        self.log("Checking subdirectories for: " + rpms.getMajorPackage(), vc.Verbosity.TEST)
        if rpms.getVendor() == gc.OPENJDK or rpms.getVendor() == gc.OPENJ9:
            if rpms.getMajorVersionSimplified() == "6":
                if self.current_arch in (gc.getPower64BeAchs() + gc.getX86_64Arch()):
                    self.csch = OpenJdk6PowerBeArchAndX86()
                    return
                else:
                    self.csch = OpenJdk6()
                    return
            elif rpms.getMajorVersionSimplified() == "7":
                self.csch = OpenJdk7()
                return
            elif rpms.getMajorVersionSimplified() == "8":
                if self.getCurrentArch() in gc.getIx86archs() + gc.getX86_64Arch() + gc.getPower64LeAchs() \
                        + gc.getAarch64Arch() + gc.getPower64BeAchs():
                    self.csch = OpenJdk8Debug()
                    return
                else:
                    self.csch = OpenJdk7()
                    return
            elif int(rpms.getMajorVersionSimplified()) >= 9:
                if self.getCurrentArch() in gc.getIx86archs() + gc.getX86_64Arch() + gc.getPower64LeAchs() \
                        + gc.getAarch64Arch() + gc.getPower64BeAchs():
                    self.csch = OpenJdk9D()
                    return
                else:
                    self.csch = OpenJdk9()
                    return
            else:
                raise UnknownJavaVersionException("Unknown OpenJDK version.")
        elif rpms.getVendor() == gc.SUN:
            if self.getCurrentArch() in gc.getX86_64Arch():
                self.csch = OpenJdk6PowerBeArchAndX86()
                return
            else:
                self.csch = OpenJdk6()
                return
        elif rpms.getVendor() == gc.ORACLE:
            if rpms.getMajorVersionSimplified() == "7":
                self.csch = Oracle7()
                return
            elif rpms.getMajorVersionSimplified() == "8":
                self.csch = Oracle7()
                return
            else:
                raise UnknownJavaVersionException("Unknown Oracle java version.")
        elif rpms.getVendor() == gc.IBM:
            if rpms.getOsVersionMajor() < 8:
                if rpms.getMajorVersionSimplified() == "7":
                    self.csch = Ibm7()
                    return
                elif rpms.getMajorVersionSimplified() == "8":
                    self.csch = Ibm8()
                    return
                else:
                    raise UnknownJavaVersionException("Unknown IBM java version.")
            else:
                self.csch = Ibm8Rhel8()
                return

        elif rpms.getVendor() == gc.ITW:
            self.csch = ITW()
            return

        else:
            raise UnknownJavaVersionException("Unknown vendor, configuration specific check could not be set.")
コード例 #4
0
    def setCSCH(self):
        PostinstallScriptTest.instance = self
        rpms = rc.RuntimeConfig().getRpmList()
        self.log("Checking post_script and master for " + rpms.getVendor(),
                 vc.Verbosity.TEST)

        if rpms.getVendor() == gc.OPENJDK or rpms.getVendor() == gc.OPENJ9:
            if rpms.getMajorVersionSimplified() == "6":
                self.csch = OpenJdk6()
                return
            elif rpms.getMajorVersionSimplified() == "7":
                self.csch = OpenJdk7()
                return
            elif rpms.getMajorVersionSimplified() == "8":
                if self.getCurrentArch() in gc.getIx86archs() + gc.getX86_64Arch() + \
                        gc.getPower64Achs() + gc.getAarch64Arch():
                    self.csch = OpenJdk8Intel()
                    return
                elif self.getCurrentArch(
                ) in gc.getS390xArch() + gc.getS390Arch() + gc.getArm32Achs(
                ) or self.getCurrentArch() == "armv7hl":
                    self.csch = OpenJdk8S390()
                    return
                else:
                    self.csch = OpenJdk8OtherArchs()
                    return
            elif rpms.getMajorVersionSimplified() in ["9", "10"]:
                if rpms.getOs() == gc.RHEL and rpms.getOsVersionMajor() == 7:
                    if self.getCurrentArch() in gc.getArm32Achs(
                    ) + gc.getPpc32Arch() + gc.getS390Arch():
                        self.csch = OpenJdk9Armvhl()
                        return
                    else:
                        self.csch = OpenJdk9OtherArchs()
                        return
                else:
                    if self.getCurrentArch() in gc.getArm32Achs():
                        self.csch = OpenJdk9Armvhl()
                        return
                    else:
                        self.csch = OpenJdk9OtherArchs()
                        return
            elif rpms.getMajorVersionSimplified() == "11":
                if self.getCurrentArch() in gc.getArm32Achs():
                    self.csch = OpenJdk11Armv7hl()
                    return
                if rpms.getOs() == gc.RHEL:
                    self.csch = OpenJdk11OtherArchesRhel()
                    return
                self.csch = OpenJdk11OtherArches()
                return
            elif int(rpms.getMajorVersionSimplified()) == 12:
                self.csch = OpenJdk12OtherArches()
                return
            elif int(rpms.getMajorVersionSimplified()) >= 13:
                if self.getCurrentArch() in gc.getArm32Achs():
                    self.csch = OpenJdk13arm7vhl()
                    return
                self.csch = OpenJdk13()
                return
            else:
                raise ex.UnknownJavaVersionException("Unknown JDK version.")

        elif rpms.getVendor() == gc.ITW:
            self.csch = IcedTeaWeb()
            return

        elif rpms.getVendor() == gc.IBM:
            if rpms.getOsVersionMajor() < 8:
                if rpms.getMajorVersionSimplified() == "7":
                    if self.getCurrentArch() in gc.getS390xArch() + gc.getS390Arch() + \
                            gc.getPower64LeAchs() + gc.getPower64BeAchs():
                        self.csch = Ibm7WithoutPlugin()
                        return
                    elif self.getCurrentArch() in gc.getX86_64Arch():
                        self.csch = Ibm7x86()
                        return
                    else:
                        self.csch = Ibm7()
                        return
                elif rpms.getMajorVersionSimplified() == "8":
                    if self.getCurrentArch() in gc.getS390xArch(
                    ) + gc.getS390Arch() + gc.getPower64LeAchs():
                        self.csch = Ibm8WithoutPlugin()
                        return
                    else:
                        self.csch = Ibm8()
                        return
                else:
                    raise ex.UnknownJavaVersionException(
                        "Unknown IBM java version.")
            else:
                if self.getCurrentArch() in gc.getS390xArch() + gc.getS390Arch(
                ) + gc.getPower64LeAchs():
                    self.csch = ProprietaryJavaRhel8s390x()
                    return
                self.csch = ProprietaryJavaRhel8()
                return

        elif rpms.getVendor() == gc.ORACLE or rpms.getVendor() == gc.SUN:
            if rpms.getMajorVersionSimplified() == "6":
                if self.getCurrentArch() in gc.getS390xArch(
                ) + gc.getX86_64Arch() + gc.getPower64BeAchs():
                    self.csch = Oracle6WithArch()
                    return
                else:
                    self.csch = Oracle6()
                    return
            elif rpms.getMajorVersionSimplified() == "7":
                self.csch = Oracle7()
                return

            elif rpms.getMajorVersionSimplified() == "8":
                if self.getCurrentArch() in gc.getX86_64Arch():
                    self.csch = Oracle7a8x86()
                    return
                else:
                    self.csch = Oracle8()
                    return
            else:
                raise ex.UnknownJavaVersionException(
                    "Unknown Oracle java version.")

        else:
            raise ex.UnknownJavaVersionException(
                "Unknown platform, java was not identified.")
コード例 #5
0
    def setCSCH(self):
        BinariesTest.instance = self
        rpms = rc.RuntimeConfig().getRpmList()
        self.log("Checking binaries and slaves for " + rpms.getMajorPackage(), vc.Verbosity.TEST)

        if rpms.getVendor() == gc.OPENJDK or rpms.getVendor() == gc.OPENJ9:
            if rpms.getMajorVersionSimplified() == "6":
                if self.getCurrentArch() in (gc.getX86_64Arch() + gc.getPower64BeAchs()):
                    self.csch = tcc.OpenJdk6PowBeArchAndX86(BinariesTest.instance)
                    return
                else:
                    self.csch = tcc.OpenJdk6(BinariesTest.instance)
                    return

            elif rpms.getMajorVersionSimplified() == "7":
                self.csch = tcc.OpenJdk7(BinariesTest.instance)
                return

            elif rpms.getMajorVersionSimplified() == "8":
                if rpms.getVendor() == gc.OPENJ9:
                    self.csch = tcc.OpenJdk8(BinariesTest.instance)
                elif rpms.isFedora():
                    if int(rpms.getOsVersion()) > 26:
                        if self.getCurrentArch() in gc.getAarch64Arch() + gc.getPower64LeAchs() + gc.getPower64BeAchs():
                            self.csch = tcc.OpenJdk8NoExportsDebug(BinariesTest.instance)
                            return
                        elif self.getCurrentArch() in gc.getIx86archs() + gc.getX86_64Arch():
                            self.csch = tcc.OpenJdk8NoExportsDebugJFX(BinariesTest.instance)
                            return
                        else:
                            self.csch = tcc.OpenJdk8NoExports(BinariesTest.instance)
                    elif int(rpms.getOsVersion()) > 24:
                        if self.getCurrentArch() in gc.getAarch64Arch()+ gc.getPower64LeAchs() + gc.getPower64BeAchs():
                            self.csch = tcc.OpenJdk8Debug(BinariesTest.instance)
                            return
                        elif self.getCurrentArch() in gc.getIx86archs() + gc.getX86_64Arch():
                            self.csch = tcc.OpenJDK8JFX(BinariesTest.instance)
                            return
                        else:
                            self.csch = tcc.OpenJdk8(BinariesTest.instance)
                            return
                    else:
                        raise ex.UnknownJavaVersionException("Outdated version of fedora OpenJDK.")

                else:
                    if self.getCurrentArch() in gc.getIx86archs() + gc.getX86_64Arch() + gc.getAarch64Arch() + \
                            gc.getPower64Achs():
                        self.csch = tcc.OpenJdk8NoExportsDebugJFX(BinariesTest.instance)
                        return
                    else:
                        self.csch = tcc.OpenJdk8NoExports(BinariesTest.instance)
                        return

            elif rpms.getMajorVersionSimplified() == "9":
                if self.getCurrentArch() in gc.getArm32Achs():
                    self.csch = tcc.OpenJdk9(BinariesTest.instance)
                    return
                else:
                    self.csch = tcc.OpenJdk9Debug(BinariesTest.instance)
                    return

            elif rpms.getMajorVersionSimplified() == "10":
                if self.getCurrentArch() in gc.getArm32Achs():
                    self.csch = tcc.OpenJdk10(BinariesTest.instance)
                    return
                elif self.getCurrentArch() in gc.getX86_64Arch():
                    self.csch = tcc.OpenJdk10x64(BinariesTest.instance)
                    return
                else:
                    self.csch = tcc.OpenJdk10Debug(BinariesTest.instance)
                    return

            elif rpms.getMajorVersionSimplified() == "11":
                if self.getCurrentArch() in gc.getArm32Achs() or rpms.getVendor() == gc.OPENJ9:
                    self.csch = tcc.OpenJdk11(BinariesTest.instance)
                    return
                elif self.getCurrentArch() in gc.getX86_64Arch() + gc.getAarch64Arch():
                    self.csch = tcc.OpenJdk11x64(BinariesTest.instance)
                    return
                elif self.getCurrentArch() in gc.getS390xArch():
                    self.csch = tcc.OpenJdk11NoJhsdb(BinariesTest.instance)
                    return
                else:
                    if rpms.isRhel() and self.getCurrentArch() in gc.getS390Arch() + gc.getPpc32Arch():
                        self.csch = tcc.OpenJdk11NoDebugNoJhsdb(BinariesTest.instance)
                    else:
                        self.csch = tcc.OpenJdk11Debug(BinariesTest.instance)
                    return
            elif int(rpms.getMajorVersionSimplified()) >= 12:
                if self.getCurrentArch() in gc.getArm32Achs():
                    self.csch = tcc.OpenJdkLatest(BinariesTest.instance)
                    return
                elif self.getCurrentArch() in gc.getX86_64Arch() + gc.getAarch64Arch():
                    self.csch = tcc.OpenJdkLatestx64(BinariesTest.instance)
                    return
                elif self.getCurrentArch() in gc.getS390xArch():
                    self.csch = tcc.OpenJdkLatestNoJhsdb(BinariesTest.instance)
                    return
                else:
                    if rpms.isRhel() and self.getCurrentArch() in gc.getS390Arch() + gc.getPpc32Arch():
                        self.csch = tcc.OpenJdkLatestNoDebugNoJhsdb(BinariesTest.instance)
                    else:
                        self.csch = tcc.OpenJdkLatestDebug(BinariesTest.instance)
                    return
            else:
                raise ex.UnknownJavaVersionException("Unknown OpenJDK version.")

        elif rpms.getVendor() == gc.ITW:
                self.csch = tcc.Itw(BinariesTest.instance)
                return

        elif rpms.getVendor() == gc.IBM:
            if rpms.getMajorVersionSimplified() == "7":
                if self.getCurrentArch() in (gc.getPpc32Arch() + gc.getIx86archs()):
                    self.csch = tcc.IbmWithPluginSubpackage(BinariesTest.instance)
                    return

                elif self.getCurrentArch() in gc.getX86_64Arch():
                    self.csch = tcc.IbmArchMasterPlugin(BinariesTest.instance)
                    return

                elif self.getCurrentArch() in gc.getS390xArch() + gc.getS390Arch():
                    self.csch = tcc.Ibm390Architectures(BinariesTest.instance)
                    return

                else:
                    self.csch = tcc.Ibm(BinariesTest.instance)
                    return

            elif rpms.getMajorVersionSimplified() == "8":
                if rpms.getOsVersionMajor() == 7:
                    if self.getCurrentArch() in (
                                gc.getX86_64Arch() + gc.getPower64BeAchs() + gc.getIx86archs() + gc.getPpc32Arch()):
                        self.csch = tcc.IbmArchMasterPlugin(BinariesTest.instance)
                        return

                    elif self.getCurrentArch() in gc.getS390xArch() + gc.getS390Arch():
                        self.csch = tcc.Ibm390Architectures(BinariesTest.instance)
                        return

                    else:
                        self.csch = tcc.Ibm(BinariesTest.instance)
                        return
                elif rpms.getOsVersionMajor() == 8:
                    if self.getCurrentArch() in gc.getS390xArch() + gc.getS390Arch():
                        self.csch = tcc.Ibm8Rhel8S390X(BinariesTest.instance)
                        return
                    self.csch = tcc.Ibm8Rhel8(BinariesTest.instance)
                    return
            else:
                raise ex.UnknownJavaVersionException("Unknown IBM java version.")

        elif rpms.getVendor() == gc.ORACLE or rpms.getVendor() == gc.SUN:
            if rpms.getMajorVersionSimplified() == "6":
                if self.getCurrentArch() in gc.getIx86archs():
                    self.csch = tcc.OracleNoArchPlugin(BinariesTest.instance)
                    return

                else:
                    self.csch = tcc.Oracle6ArchPlugin(BinariesTest.instance)
                    return
            elif rpms.getMajorVersionSimplified() == "7":
                self.csch = tcc.Oracle7(BinariesTest.instance)
                return
            elif rpms.getMajorVersionSimplified() == "8":
                self.csch = tcc.Oracle8(BinariesTest.instance)
                return
            else:
                raise ex.UnknownJavaVersionException("Unknown Oracle java version")
        else:
            raise ex.UnknownJavaVersionException("Unknown platform, java was not identified.")