def collect_testruns(jobs, regressed_platforms, test): # get test_runs run #s for 1 test on 1 kernel and some platforms # TODO: Is jobs list short enough to use directly in 1 sql cmd? runs = {} # platform --> list of test runs for jobx in jobs: cmd = ( "select test_idx, machine_idx from tests" " where job_idx = %s and test = %s" ) args = [jobx, test] nrows = perf.db_cur.execute(cmd, args) for testrunx, machx in perf.db_cur.fetchall(): platform, host = perf.machine_idx_to_platform_host(machx) if by_hosts: platform += '.'+host if ( is_filtered_platform(platform) and (regressed_platforms is None or platform in regressed_platforms) ): runs.setdefault(platform, []).append(testrunx) return runs
def collect_testruns(jobs, test, test_attributes, platforms_filter, by_hosts, no_antag): # get test_runs run #s for 1 test on 1 kernel and some platforms # TODO: Is jobs list short enough to use directly in 1 sql cmd? # TODO: add filtering on test series? runs = {} # platform --> list of test runs for jobx in jobs: cmd = ( "select test_idx, machine_idx from tests" " where job_idx = %s and test = %s" ) args = [jobx, test] nrows = perf.db_cur.execute(cmd, args) for testrunx, machx in perf.db_cur.fetchall(): platform, host = perf.machine_idx_to_platform_host(machx) if by_hosts: platform += '.'+host if ( is_filtered_platform(platform, platforms_filter) and matching_test_attributes(get_test_attributes(testrunx), test_attributes) and (not no_antag or get_antag(testrunx) == '') ): runs.setdefault(platform, []).append(testrunx) return runs
def collect_testruns(jobs, test, test_attributes, platforms_filter, by_hosts, no_antag): # get test_runs run #s for 1 test on 1 kernel and some platforms # TODO: Is jobs list short enough to use directly in 1 sql cmd? # TODO: add filtering on test series? runs = {} # platform --> list of test runs for jobx in jobs: cmd = ("select test_idx, machine_idx from tko_tests" " where job_idx = %s and test = %s") args = [jobx, test] nrows = perf.db_cur.execute(cmd, args) for testrunx, machx in perf.db_cur.fetchall(): platform, host = perf.machine_idx_to_platform_host(machx) if by_hosts: platform += '.' + host if (is_filtered_platform(platform, platforms_filter) and matching_test_attributes(get_test_attributes(testrunx), test_attributes) and (not no_antag or get_antag(testrunx) == '')): runs.setdefault(platform, []).append(testrunx) return runs