def run_tests(args): # check and get git summary git_summary = utils.get_git_summary(args.mode, getattr(args, 'remote_path', None)) # get cc_schemes cc_schemes = OrderedDict() if args.all: config = utils.parse_config() schemes_config = config['schemes'] for scheme in schemes_config.keys(): cc_schemes[scheme] = {} if args.random_order: utils.shuffle_keys(cc_schemes) elif args.schemes is not None: cc_schemes = utils.parse_schemes(args.schemes) if args.random_order: utils.shuffle_keys(cc_schemes) else: assert (args.test_config is not None) if args.random_order: random.shuffle(args.test_config['flows']) for flow in args.test_config['flows']: cc_schemes[flow['scheme']] = {} # save metadata meta = vars(args).copy() meta['cc_schemes'] = sorted(cc_schemes) meta['git_summary'] = git_summary metadata_path = path.join(args.data_dir, 'pantheon_metadata.json') utils.save_test_metadata(meta, metadata_path) # run tests for run_id in xrange(args.start_run_id, args.start_run_id + args.run_times): if not hasattr(args, 'test_config') or args.test_config is None: for cc, params in cc_schemes.iteritems(): test_args = get_cc_args(args, params) Test(test_args, run_id, cc).run() else: Test(args, run_id, None).run()
def run_tests(args): # check and get git summary git_summary = utils.get_git_summary(args.mode, getattr(args, 'remote_path', None)) # get cc_schemes if args.all: config = utils.parse_config() schemes_config = config['schemes'] cc_schemes = schemes_config.keys() if args.random_order: random.shuffle(cc_schemes) elif args.schemes is not None: cc_schemes = args.schemes.split() if args.random_order: random.shuffle(cc_schemes) else: assert (args.test_config is not None) if args.random_order: random.shuffle(args.test_config['flows']) cc_schemes = [flow['scheme'] for flow in args.test_config['flows']] # save metadata meta = vars(args).copy() meta['cc_schemes'] = sorted(cc_schemes) meta['git_summary'] = git_summary metadata_path = path.join(args.data_dir, 'pantheon_metadata.json') utils.save_test_metadata(meta, metadata_path) # run tests for run_id in xrange(args.start_run_id, args.start_run_id + args.run_times): if not hasattr(args, 'test_config') or args.test_config is None: for cc in cc_schemes: Test(args, run_id, cc).run() else: Test(args, run_id, None).run()
def run_tests(args): # check and get git summary git_summary = utils.get_git_summary(args.mode, getattr(args, 'remote_path', None)) # get cc_schemes if args.all: config = utils.parse_config() schemes_config = config['schemes'] cc_schemes = schemes_config.keys() if args.random_order: random.shuffle(cc_schemes) elif args.schemes is not None: cc_schemes = args.schemes.split() if args.random_order: random.shuffle(cc_schemes) else: assert(args.test_config is not None) if args.random_order: random.shuffle(args.test_config['flows']) cc_schemes = [flow['scheme'] for flow in args.test_config['flows']] # save metadata meta = vars(args).copy() meta['cc_schemes'] = sorted(cc_schemes) meta['git_summary'] = git_summary metadata_path = path.join(args.data_dir, 'pantheon_metadata.json') utils.save_test_metadata(meta, metadata_path) # run tests for run_id in xrange(args.start_run_id, args.start_run_id + args.run_times): if not hasattr(args, 'test_config') or args.test_config is None: for cc in cc_schemes: Test(args, run_id, cc).run() else: Test(args, run_id, None).run()