Exemple #1
0
    def __init__(self,
                 fileloc=None,
                 config=None,
                 **kwargs):
        """
        Create the Rpmlint object.

        @type fileloc: str
        @param fileloc: Location glob of the specs or rpms.
        @type config: str
        @param config: path to the rpmlint user config.
        @type kwargs: dict
        @param fileloc: all other keyword arguments.
        """
        Test.__init__(self, **kwargs)
        if fileloc:
            self.fileloc = fileloc
        if config:
            self.config = config
        self.addFactoryArguments(fileloc=fileloc, config=config)

        self.command = ["rpmlint", "-i"]
        if self.config:
            self.command += ['-f', self.config]
        self.command.append(self.fileloc)

        self.obs = pkgutil.WEObserver()
        self.addLogObserver('stdio', self.obs)
Exemple #2
0
    def __init__(self, dbpool=None, test_type=None, test_info="",
                 description=None, descriptionDone=None,
                 autoCreateTables=False, textLimit=5, testNameLimit=16,
                 parallel=4, logfiles=None, lazylogfiles=True,
                 warningPattern="MTR's internal check of the test case '.*' failed",
                 mtr_subdir="mysql-test", **kwargs):

        if logfiles is None:
            logfiles = {}

        if description is None:
            description = ["testing"]
            if test_type:
                description.append(test_type)
        if descriptionDone is None:
            descriptionDone = ["test"]
            if test_type:
                descriptionDone.append(test_type)
        Test.__init__(self, logfiles=logfiles, lazylogfiles=lazylogfiles,
                      description=description, descriptionDone=descriptionDone,
                      warningPattern=warningPattern, **kwargs)
        self.dbpool = dbpool
        self.test_type = test_type
        self.test_info = test_info
        self.autoCreateTables = autoCreateTables
        self.textLimit = textLimit
        self.testNameLimit = testNameLimit
        self.parallel = parallel
        self.mtr_subdir = mtr_subdir
        self.progressMetrics += ('tests',)
Exemple #3
0
    def __init__(self, dbpool=None, test_type="mysql-test-run", test_info="",
                 autoCreateTables=False, textLimit=5, testNameLimit=16,
                 parallel=4, logfiles = {}, lazylogfiles = True,
                 warningPattern="MTR's internal check of the test case '.*' failed",
                 mtr_subdir="mysql-test", **kwargs):

        Test.__init__(self, logfiles=logfiles, lazylogfiles=lazylogfiles,
                      warningPattern=warningPattern, **kwargs)
        self.dbpool = dbpool
        self.test_type = test_type
        self.test_info = test_info
        self.autoCreateTables = autoCreateTables
        self.textLimit = textLimit
        self.testNameLimit = testNameLimit
        self.parallel = parallel
        self.mtr_subdir = mtr_subdir
        self.progressMetrics += ('tests',)

        self.addFactoryArguments(dbpool=self.dbpool,
                                 test_type=self.test_type,
                                 test_info=self.test_info,
                                 autoCreateTables=self.autoCreateTables,
                                 textLimit=self.textLimit,
                                 testNameLimit=self.testNameLimit,
                                 parallel=self.parallel,
                                 mtr_subdir=self.mtr_subdir)
Exemple #4
0
 def __init__(self, ignore=[], flaky=[], max_logs=20,
              *args, **kwargs):
   Test.__init__(self, *args, **kwargs)
   self.maxLogs = int(max_logs)
   self.logObserver = LitLogObserver(self.maxLogs)
   self.addFactoryArguments(max_logs=max_logs)
   self.addLogObserver('stdio', self.logObserver)
Exemple #5
0
    def __init__(self, dbpool=None, test_type="mysql-test-run", test_info="",
                 autoCreateTables=False, textLimit=5, testNameLimit=16,
                 parallel=4, logfiles = {}, lazylogfiles = True, **kwargs):

        # Add mysql server logfiles.
        for mtr in range(0, parallel+1):
            for mysqld in range(1, 4+1):
                if mtr == 0:
                    logname = "mysqld.%d.err" % mysqld
                    filename = "mysql-test/var/log/mysqld.%d.err" % mysqld
                else:
                    logname = "mysqld.%d.err.%d" % (mysqld, mtr)
                    filename = "mysql-test/var/%d/log/mysqld.%d.err" % (mtr, mysqld)
                logfiles[logname] = filename
        Test.__init__(self, logfiles=logfiles, lazylogfiles=lazylogfiles, **kwargs)
        self.dbpool = dbpool
        self.test_type = test_type
        self.test_info = test_info
        self.autoCreateTables = autoCreateTables
        self.textLimit = textLimit
        self.testNameLimit = testNameLimit
        self.parallel = parallel
        self.progressMetrics += ('tests',)

        self.addFactoryArguments(dbpool=self.dbpool,
                                 test_type=self.test_type,
                                 test_info=self.test_info,
                                 autoCreateTables=self.autoCreateTables,
                                 textLimit=self.textLimit,
                                 testNameLimit=self.testNameLimit,
                                 parallel=self.parallel)
 def __init__(self, ignore=[], flaky=[], max_logs=20, parseSummaryOnly=False,
              *args, **kwargs):
   Test.__init__(self, *args, **kwargs)
   self.maxLogs = int(max_logs)
   self.logObserver = LitLogObserver(self.maxLogs, parseSummaryOnly)
   self.addFactoryArguments(max_logs=max_logs)
   self.addFactoryArguments(parseSummaryOnly=parseSummaryOnly)
   self.addLogObserver('stdio', self.logObserver)
Exemple #7
0
    def __init__(self, fileloc="*rpm", **kwargs):
        """
        Create the Rpmlint object.

        @type fileloc: str
        @param fileloc: Location glob of the specs or rpms.
        @type kwargs: dict
        @param fileloc: all other keyword arguments.
        """
        Test.__init__(self, **kwargs)
        self.command = ["/usr/bin/rpmlint", "-i"]
        self.command.append(fileloc)
    def __init__(self, python, db, verbosity=2, **kwargs):
        kwargs["command"] = [
            "../venv-python%s-%s%s/bin/python" % (python, db.name, db.version),
            "tests/runtests.py",
            "--settings=testsettings",
            "--verbosity=%s" % verbosity,
        ]
        kwargs["env"] = {"PYTHONPATH": "$PWD:$PWD/tests", "LC_ALL": "en_US.utf8"}

        Test.__init__(self, **kwargs)

        # Make sure not to spuriously count a warning from test cases
        # using the word "warning". So skip any "warnings" on lines starting
        # with "test_"
        self.addSuppression([(None, "^test_", None, None)])

        self.addFactoryArguments(python=python, db=db, verbosity=verbosity)
Exemple #9
0
 def __init__(self, **kwargs):
   self.failed__ = False  # there's a 'failed' method in Test, ouch!
   Test.__init__(self, **kwargs)
Exemple #10
0
 def __init__(self, **kwargs):
   self.__result = None
   Test.__init__(self, **kwargs)
 def __init__(self, **kwargs):
     self.failed__ = False  # there's a 'failed' method in Test, ouch!
     Test.__init__(self, **kwargs)
 def __init__(self, **kwargs):
     self.__result = None
     Test.__init__(self, **kwargs)
Exemple #13
0
 def __init__(self, ignore=[], flaky=[], max_logs=20, *args, **kwargs):
     Test.__init__(self, *args, **kwargs)
     self.logObserver = DejaGNULogObserver()
     self.addLogObserver("gdb.log", self.logObserver)
Exemple #14
0
 def __init__(self, ignore=[], flaky=[], max_logs=20, *args, **kwargs):
     Test.__init__(self, *args, **kwargs)
     self.logObserver = DejaGNULogObserver()
     self.addLogObserver('gdb.log', self.logObserver)
Exemple #15
0
 def __init__(self, ignore=[], flaky=[], max_logs=20, *args, **kwargs):
     Test.__init__(self, *args, **kwargs)
     self.logObserver = LitLogObserver()
     self.addLogObserver("stdio", self.logObserver)