2
# -*- mode: c; c-basic-offset: 2; indent-tabs-mode: nil; -*-
3
# vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
5
# Copyright (C) 2010 Patrick Crews
8
code for dealing with testing modes
9
A given mode should have a systemInitializer, testManager, and testExecutor
10
that define how to setup, manage, and execute test cases
17
def handle_mode(variables, system_manager):
18
""" Deals with the 'mode' option and returns
19
the appropriate code objects for the test-runner to play with
22
# drizzle-test-run mode - the default
23
if variables['mode'] == 'dtr':
24
# DTR mode - this is what we are coding to initially
25
# We are just setting the code up this way to hopefully make
26
# other coolness easier in the future
28
system_manager.logging.info("Using testing mode: %s" %variables['mode'])
30
# Set up our testManager
31
from drizzle_test_run.dtr_test_management import testManager
32
test_manager = testManager( variables['verbose'], variables['debug']
33
, variables['engine'], variables['dotest']
34
, variables['skiptest'], variables['suitelist']
35
, variables['suitepaths'], system_manager
36
, variables['test_cases'])
38
# get our mode-specific testExecutor
39
from drizzle_test_run.dtr_test_execution import dtrTestExecutor
41
return (test_manager, dtrTestExecutor)
44
system_manager.logging.error("unknown mode argument: %s" %variables['mode'])