Ejemplo n.º 1
0
#
#  Copyright © 2014 Hewlett-Packard Development Company, L.P.
#
#  This work is distributed under the W3C® Software License [1]
#  in the hope that it will be useful, but WITHOUT ANY
#  WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#
#  [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
#

from harness import db

from core import utils
# add process module to the system path
utils.addModulePath('process')
from process import systemprocess


class TestFormatRenamed(systemprocess.SystemProcess):
    def _getUsage(self):
        return "usage: %prog [options] OldFormatName NewFormatName "

    def run(self):
        if (len(self.args)):
            oldFormatName, newFormatName = self.args[0:2]
            harnessDB = db.HarnessDBConnection()

            harnessDB.execute(
                "UPDATE `reference_pages` "
                "SET `format` = %s "
#  WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#
#  [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
#

import os
import collections
import datetime

from harness import db, testcases

from core import utils, users

# add process module to the system path
utils.addModulePath('process', 'testsuite', 'useragent')
from process import systemprocess
from testsuite import testsuite
from useragent import useragent

ResultData = collections.namedtuple(
    'ResultData', ('testcase', 'format', 'revision', 'result', 'comment'))


class Importer(db.HarnessDBConnection):
    @classmethod
    def GetTableNames(cls):
        names = super(Importer, cls).GetTableNames()
        return names + ['revisions', 'results', 'status_cache']

    def __init__(self, ui, testSuite, dateTime, user, ua):
Ejemplo n.º 3
0
#  in the hope that it will be useful, but WITHOUT ANY
#  WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#
#  [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
#

import sys
import os
import datetime

from core import config, userinterface, utils
from harness import db

# add specification and process module to the system path
utils.addModulePath('process', 'specification', 'testsuite')

from process import systemprocess
from specification import specifications
from testsuite import db as testsuitedb
from testsuite import testsuite


class SynchronizeSpecLinks(db.HarnessDBConnection):
    @classmethod
    def GetTableNames(cls):
        names = super(SynchronizeSpecLinks, cls).GetTableNames()
        return names + [
            'spec_sync_data', 'test_help_links', 'test_spec_links',
            'suite_tests', 'status_cache'
        ]
Ejemplo n.º 4
0
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#
#  [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
#

import os
import collections

from harness import db, testcases

from core import utils

import HTMLParser

# add process module to the system path
utils.addModulePath('process', 'testsuite')
from process import systemprocess, events
from testsuite import testsuite

ReferenceData = collections.namedtuple('ReferenceData',
                                       ('name', 'type', 'path'))


class Importer(db.HarnessDBConnection):
    @classmethod
    def GetTableNames(cls):
        names = super(Importer, cls).GetTableNames()
        return names + [
            'suite_tests', 'status_cache', 'test_spec_links', 'test_pages',
            'reference_pages', 'test_sequence'
        ]