3 import Scripting, os, Options, Utils, Environment, optparse
6 ########################################################################
7 # main test entry point
9 '''Run the quick test suite'''
10 print "Starting quick test"
11 Scripting.commands += ['build']
12 env = Environment.Environment()
14 env.TESTS = Options.options.TESTS
17 if Options.options.QUICKTEST:
18 env.OPTIONS += '--exclude=./selftest/slow --quick --include=./selftest/quick'
20 SELFTEST = 'PYTHON=/usr/bin/python perl -W ../selftest/selftest.pl --prefix=./st --builddir=. --srcdir=. --exclude=./selftest/skip --testlist="./selftest/tests.sh|" ${OPTIONS} --socket-wrapper ${TESTS} | perl -W ../selftest/filter-subunit.pl --expected-failures=./selftest/knownfail | /usr/bin/perl -W ../selftest/format-subunit.pl --prefix=./st --format=plain --immediate'
22 cmd = Utils.subst_vars(SELFTEST, env)
23 print "test: running %s" % cmd
27 opt.ADD_COMMAND('test', cmd_test)
29 gr = opt.add_option_group('test options')
31 gr.add_option('--tests',
32 help=("wildcard pattern of tests to run"),
33 action="store", dest='TESTS', default='')
34 gr.add_option('--quick',
35 help=("enable only quick tests"),
36 action="store_true", dest='QUICKTEST', default=False)