~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/lib/test_run_options.py

  • Committer: Lee Bieber
  • Date: 2011-02-23 21:21:20 UTC
  • mfrom: (2195.1.4 build)
  • Revision ID: kalebral@gmail.com-20110223212120-jr9bo1nckyk4n5h4
Merge Olaf - remove register keyword
Merge Stewart - 646898: Query causes RAM usage spike    
Merge Stewart - 710818: SHOW TABLE doesn't use generator    
Merge Patrick - 723828: dbqp should integrate with the randgen

Show diffs side-by-side

added added

removed removed

Lines of Context:
58
58
    if variables['repeat'] <= 0:
59
59
        print "Setting --repeat=1.  You chose a silly value that I will ignore :P"
60
60
        variables['repeat'] = 1
 
61
    if variables['mode'] == 'randgen':
 
62
        print "Setting --no-secure-file-priv=True for randgen mode..."
 
63
        variables['nosecurefilepriv']=True
 
64
    if variables['mode'] == 'cleanup':
 
65
        print "Setting --start-dirty=True for cleanup mode..."
 
66
        variables['startdirty']=True
61
67
    return variables
62
68
 
63
69
# Create the CLI option parser
70
76
server_default = os.path.abspath(os.path.join(testdir_default,
71
77
                                       '../drizzled/drizzled'))
72
78
 
73
 
workdir_default = os.path.join(testdir_default,'dbqp_work')
 
79
workdir_default = os.path.join(testdir_default,'workdir')
74
80
 
75
81
clientbindir_default = os.path.abspath(os.path.join(testdir_default,
76
82
                                       '../client'))
119
125
    "--mode"
120
126
  , dest="mode"
121
127
  , default="dtr"
122
 
  , help="Testing mode.  We only support dtr...for now >;) [%default]"
 
128
  , help="Testing mode.  We currently support dtr, randgen, and cleanup modes.  See docs for further details about individual modes [%default]"
123
129
  )
124
130
 
125
131
system_control_group.add_option(
138
144
  , help="Don't try to cleanup from earlier runs (currently just a placeholder) [%default]"
139
145
  )
140
146
 
 
147
system_control_group.add_option(
 
148
    "--randgen-path"
 
149
  , dest="randgenpath"
 
150
  , action='store'
 
151
  , default=None
 
152
  , help = "The path to a randgen installation that can be used to execute randgen-based tests"
 
153
  )
 
154
 
141
155
parser.add_option_group(system_control_group)
142
156
 
143
157
# end system_control_group
366
380
parser.add_option_group(debugger_control_group)
367
381
 
368
382
 
 
383
utility_group = optparse.OptionGroup(parser,
 
384
                  "Options to call additional utilities such as datagen")
 
385
 
 
386
utility_group.add_option(
 
387
    "--gendata"
 
388
  , dest="gendatafile"
 
389
  , action='store'
 
390
  , type='string'
 
391
  , default=None
 
392
  , help="Call the randgen's gendata utility to use the specified configuration file.  This will populate the server prior to any test execution")
 
393
 
 
394
parser.add_option_group(utility_group)
 
395
 
 
396
 
369
397
# supplied will be those arguments matching an option, 
370
398
# and test_cases will be everything else
371
399
(args, test_cases)= parser.parse_args()