Regression: Update the regress script after SE/FS merge

This patch updates the regress script to reflect the merge of the
SE/FS builds and the new structure of the test directories. It adds a
"mode" flag to the script, that defaults to both se and fs.
This commit is contained in:
Andreas Hansson 2012-02-02 04:51:13 -05:00
parent 0a26883296
commit 096a550757

View file

@ -40,17 +40,19 @@ add_option = optparser.add_option
add_option('-v', '--verbose', action='store_true', default=False, add_option('-v', '--verbose', action='store_true', default=False,
help='echo commands before executing') help='echo commands before executing')
add_option('--builds', add_option('--builds',
default='ALPHA_SE,ALPHA_SE_MOESI_hammer,' \ default='ALPHA,ALPHA_MOESI_hammer,' \
'ALPHA_SE_MESI_CMP_directory,' \ 'ALPHA_MESI_CMP_directory,' \
'ALPHA_SE_MOESI_CMP_directory,' \ 'ALPHA_MOESI_CMP_directory,' \
'ALPHA_SE_MOESI_CMP_token,' \ 'ALPHA_MOESI_CMP_token,' \
'ALPHA_FS,' \ 'MIPS,' \
'MIPS_SE,' \ 'POWER,' \
'POWER_SE,' \ 'SPARC,' \
'SPARC_SE,SPARC_FS,' \ 'X86,' \
'X86_SE,X86_FS,' \ 'ARM',
'ARM_SE,ARM_FS',
help="comma-separated build targets to test (default: '%default')") help="comma-separated build targets to test (default: '%default')")
add_option('--modes',
default='se,fs',
help="comma-separated modes to test (default: '%default')")
add_option('--test-variants', default='opt', add_option('--test-variants', default='opt',
help="comma-separated build variants to test (default: '%default')"\ help="comma-separated build variants to test (default: '%default')"\
", set to '' for none") ", set to '' for none")
@ -82,6 +84,7 @@ def split_if_nonempty(s):
# split list options on ',' to get Python lists # split list options on ',' to get Python lists
builds = split_if_nonempty(options.builds) builds = split_if_nonempty(options.builds)
modes = split_if_nonempty(options.modes)
test_variants = split_if_nonempty(options.test_variants) test_variants = split_if_nonempty(options.test_variants)
compile_variants = split_if_nonempty(options.compile_variants) compile_variants = split_if_nonempty(options.compile_variants)
@ -112,25 +115,21 @@ if compile_variants:
for variant in compile_variants for variant in compile_variants
for build in builds] for build in builds]
# By default run the 'quick' tests # By default run the 'quick' tests, all expands to quick and long
if not tests: if not tests:
tests = ['quick'] tests = ['quick']
elif 'all' in tests:
tests = ['quick,long']
# set up test targets for scons # set up test targets for scons, since we don't have any quick SPARC
if 'all' in tests: # full-system tests exclude it
targets += ['%s/%s/tests/%s' % (options.build_dir, build, variant) targets += ['%s/%s/tests/%s/%s/%s' % (options.build_dir, build, variant, test,
for build in builds mode)
for variant in test_variants] for build in builds
else: for variant in test_variants
# Ugly! Since we don't have any quick SPARC_FS tests remove the for test in tests
# SPARC_FS target If we ever get a quick SPARC_FS test, this code for mode in modes
# should be removed if not (build == 'SPARC' and test == 'quick' and mode == 'fs')]
if 'quick' in tests and 'SPARC_FS' in builds:
builds.remove('SPARC_FS')
targets += ['%s/%s/tests/%s/%s' % (options.build_dir, build, variant, test)
for build in builds
for variant in test_variants
for test in tests]
def cpu_count(): def cpu_count():
if 'bsd' in sys.platform or sys.platform == 'darwin': if 'bsd' in sys.platform or sys.platform == 'darwin':