Ejemplo n.º 1
0
 def setUp(self):
     """ Set up the environnment, ran before every tests. """
     if '///' in DB_PATH:
         dbfile = DB_PATH.split('///')[1]
         if os.path.exists(dbfile):
             os.unlink(dbfile)
     self.session = dbtools.create_session(
         DB_PATH, debug=False, create_table=True)
     app.APP.before_request(app.FAS._check_session)
Ejemplo n.º 2
0
 def setUp(self):
     """ Set up the environnment, ran before every tests. """
     if '///' in DB_PATH:
         dbfile = DB_PATH.split('///')[1]
         if os.path.exists(dbfile):
             os.unlink(dbfile)
     self.session = dbtools.create_session(DB_PATH,
                                           debug=False,
                                           create_table=True)
     app.APP.before_request(app.FAS._check_session)
Ejemplo n.º 3
0
#!/usr/bin/python

from __future__ import print_function

## These two lines are needed to run on EL6
__requires__ = ['SQLAlchemy >= 0.7', 'jinja2 >= 2.4']
import pkg_resources

from sqlalchemy.exc import SQLAlchemyError
import kerneltest.app as app
import kerneltest.dbtools as dbtools

dbtools.create_session(app.APP.config['DB_URL'], debug=True, create_table=True)

## Add current supported releases
SESSION = dbtools.create_session(app.APP.config['DB_URL'], debug=True)

release = dbtools.Release(
    releasenum="24",
    support="RELEASE",
)
SESSION.add(release)

release = dbtools.Release(
    releasenum="25",
    support="RELEASE",
)
SESSION.add(release)

release = dbtools.Release(
    releasenum="26",
Ejemplo n.º 4
0
#!/usr/bin/python

from __future__ import print_function

## These two lines are needed to run on EL6
__requires__ = ["SQLAlchemy >= 0.7", "jinja2 >= 2.4"]
import pkg_resources

from sqlalchemy.exc import SQLAlchemyError
import kerneltest.app as app
import kerneltest.dbtools as dbtools

dbtools.create_session(app.APP.config["DB_URL"], debug=True, create_table=True)

## Add current supported releases
SESSION = dbtools.create_session(app.APP.config["DB_URL"], debug=True)

release = dbtools.Release(releasenum="19", support="RELEASE")
SESSION.add(release)

release = dbtools.Release(releasenum="20", support="RELEASE")
SESSION.add(release)

release = dbtools.Release(releasenum="21", support="RAWHIDE")
SESSION.add(release)

try:
    SESSION.commit()
except SQLAlchemyError as err:
    print(err)
Ejemplo n.º 5
0
    '''))
    MAIL_HANDLER.setLevel(logging.ERROR)
    APP.logger.addHandler(MAIL_HANDLER)


# Log to stderr as well
STDERR_LOG = logging.StreamHandler(sys.stderr)
STDERR_LOG.setLevel(logging.INFO)
APP.logger.addHandler(STDERR_LOG)


import kerneltest.proxy

APP.wsgi_app = kerneltest.proxy.ReverseProxied(APP.wsgi_app)

SESSION = dbtools.create_session(APP.config['DB_URL'])


## Exception generated when uploading the results into the database.

class InvalidInputException(Exception):
    ''' Exception raised when the user provided an invalid test result file.
    '''
    pass


## Generic functions

def parseresults(log):
    ''' Parse the result of the kernel tests. '''
    for line in log:
Ejemplo n.º 6
0
    '''))
    MAIL_HANDLER.setLevel(logging.ERROR)
    APP.logger.addHandler(MAIL_HANDLER)


# Log to stderr as well
STDERR_LOG = logging.StreamHandler(sys.stderr)
STDERR_LOG.setLevel(logging.INFO)
APP.logger.addHandler(STDERR_LOG)


import kerneltest.proxy

APP.wsgi_app = kerneltest.proxy.ReverseProxied(APP.wsgi_app)

SESSION = dbtools.create_session(APP.config['DB_URL'])


## Exception generated when uploading the results into the database.

class InvalidInputException(Exception):
    ''' Exception raised when the user provided an invalid test result file.
    '''
    pass


## Generic functions

def parseresults(log):
    ''' Parse the result of the kernel tests. '''
    for line in log: