Allow specifying all for languages

pull/1888/head
Craig Tiller 10 years ago
parent 0dc78ab3cf
commit 60f15e6eb9
  1. 13
      tools/run_tests/run_tests.py

@ -330,9 +330,9 @@ argp.add_argument('--newline_on_success',
action='store_const',
const=True)
argp.add_argument('-l', '--language',
choices=sorted(_LANGUAGES.keys()),
choices=['all'] + sorted(_LANGUAGES.keys()),
nargs='+',
default=sorted(_LANGUAGES.keys()))
default=['all'])
args = argp.parse_args()
# grab config
@ -343,7 +343,10 @@ run_configs = set(_CONFIGS[cfg]
build_configs = set(cfg.build_config for cfg in run_configs)
make_targets = []
languages = set(_LANGUAGES[l] for l in args.language)
languages = set(_LANGUAGES[l]
for l in itertools.chain.from_iterable(
_LANGUAGES.iterkeys() if x == 'all' else [x]
for x in args.language))
if len(build_configs) > 1:
for language in languages:
@ -375,8 +378,8 @@ build_steps.extend(set(
one_run = set(
spec
for config in run_configs
for language in args.language
for spec in _LANGUAGES[language].test_specs(config, args.travis)
for language in languages
for spec in language.test_specs(config, args.travis)
if re.search(args.regex, spec.shortname))
runs_per_test = args.runs_per_test

Loading…
Cancel
Save