зеркало из https://github.com/microsoft/azure-cli.git
Select module to test through env var (#1979)
This commit is contained in:
Родитель
b0504c3b63
Коммит
dfcbce22e1
|
@ -48,7 +48,7 @@ def get_nose_runner(report_folder, parallel=True, process_timeout=600, process_r
|
|||
debug_file = os.path.join(report_folder, name + '-debug.log')
|
||||
arguments += ['--debug-log={}'.format(debug_file)]
|
||||
|
||||
print()
|
||||
print('\n')
|
||||
print('<<< Run {} >>>'.format(name))
|
||||
start = datetime.now()
|
||||
result = nose.run(argv=arguments)
|
||||
|
|
|
@ -48,12 +48,19 @@ if __name__ == '__main__':
|
|||
parse = argparse.ArgumentParser('Test tools')
|
||||
parse.add_argument('--module', dest='modules', action='append',
|
||||
help='The modules of which the test to be run. Accept short names, except '
|
||||
'azure-cli, azure-cli-core and azure-cli-nspkg')
|
||||
'azure-cli, azure-cli-core and azure-cli-nspkg. The modules list can '
|
||||
'also be set through environment variable AZURE_CLI_TEST_MODULES. The '
|
||||
'value should be a string of comma separated module names. The '
|
||||
'environment variable will be overwritten by command line parameters.')
|
||||
parse.add_argument('--non-parallel', action='store_true',
|
||||
help='Not to run the tests in parallel.')
|
||||
parse.add_argument('--live', action='store_true', help='Run all the tests live.')
|
||||
args = parse.parse_args()
|
||||
|
||||
if not args.modules and os.environ.get('AZURE_CLI_TEST_MODULES', None):
|
||||
print('Test modules list is parsed from environment variable AZURE_CLI_TEST_MODULES.')
|
||||
args.modules = [m.strip() for m in os.environ.get('AZURE_CLI_TEST_MODULES').split(',')]
|
||||
|
||||
selected_modules = filter_user_selected_modules_with_tests(args.modules)
|
||||
if not selected_modules:
|
||||
parse.print_help()
|
||||
|
|
Загрузка…
Ссылка в новой задаче