Allow splitting test groups into sub groups
When registering a new test group we give it a group name and a list of tests to run. register(['foo'], [t1, t2, t3]) creates group 'foo' running tests t1, t2 and t3. This method has been extended to allow passing a dict of tests with keys used as group name suffixes. register(['foo'], sub1=[t1, t2], sub2=[t3]) creates group 'foo' running all tests t1, t2 and t3 and groups 'foo_sub1' running t1, t2 and group 'foo_sub2' running t3 The plan is to split long-running datastore tests into multiple sub-groups that can run as separate jobs. Generally, we will want to run replication and clustering in one job separate from everything else. I have registered a 'single' (tests on a single instance) and 'multi' (tests woring on a set of instances) sub-groups for all datastores (for consistency). This does not change how the tests run. It just creates '*_single' and '*_multi' sub-groups in addition to the existing '<datastore>_supported' groups. We will need to update the project config to run sub-jobs for datastores that require it. Change-Id: Iea2a996043b4c2d1889995e160891af33ffab5b6
This commit is contained in:
parent
48dcbb6dcd
commit
93f1ae8f09
@ -69,8 +69,20 @@ def build_group(*groups):
|
||||
return out
|
||||
|
||||
|
||||
def register(datastores, *test_groups):
|
||||
proboscis.register(groups=build_group(datastores),
|
||||
def register(group_names, *test_groups, **kwargs):
|
||||
if kwargs:
|
||||
register(group_names, kwargs.values())
|
||||
for suffix, grp_set in kwargs.items():
|
||||
# Recursively call without the kwargs
|
||||
register([name + '_' + suffix for name in group_names], *grp_set)
|
||||
return
|
||||
|
||||
# Do the actual registration here
|
||||
proboscis.register(groups=build_group(group_names),
|
||||
depends_on_groups=build_group(*test_groups))
|
||||
# Now register the same groups with '-' instead of '_'
|
||||
proboscis.register(groups=build_group(
|
||||
[name.replace('_', '-') for name in group_names]),
|
||||
depends_on_groups=build_group(*test_groups))
|
||||
|
||||
black_box_groups = [
|
||||
@ -230,97 +242,111 @@ register(["user"], user_actions_groups)
|
||||
# These should contain all functionality currently supported by the datastore.
|
||||
# Keeping them in alphabetical order may reduce the number of merge conflicts.
|
||||
register(
|
||||
["db2_supported"], common_groups,
|
||||
configuration_groups,
|
||||
database_actions_groups,
|
||||
user_actions_groups,
|
||||
["db2_supported"],
|
||||
single=[common_groups,
|
||||
configuration_groups,
|
||||
database_actions_groups,
|
||||
user_actions_groups, ],
|
||||
multi=[]
|
||||
)
|
||||
|
||||
register(
|
||||
["cassandra_supported"], common_groups,
|
||||
backup_groups,
|
||||
database_actions_groups,
|
||||
cluster_actions_groups,
|
||||
configuration_groups,
|
||||
user_actions_groups,
|
||||
["cassandra_supported"],
|
||||
single=[common_groups,
|
||||
backup_groups,
|
||||
database_actions_groups,
|
||||
configuration_groups,
|
||||
user_actions_groups, ],
|
||||
multi=[cluster_actions_groups, ]
|
||||
)
|
||||
|
||||
register(
|
||||
["couchbase_supported"], common_groups,
|
||||
backup_groups,
|
||||
root_actions_groups,
|
||||
["couchbase_supported"],
|
||||
single=[common_groups,
|
||||
backup_groups,
|
||||
root_actions_groups, ],
|
||||
multi=[]
|
||||
)
|
||||
|
||||
register(
|
||||
["couchdb_supported"], common_groups,
|
||||
backup_groups,
|
||||
database_actions_groups,
|
||||
root_actions_groups,
|
||||
user_actions_groups,
|
||||
["couchdb_supported"],
|
||||
single=[common_groups,
|
||||
backup_groups,
|
||||
database_actions_groups,
|
||||
root_actions_groups,
|
||||
user_actions_groups, ],
|
||||
multi=[]
|
||||
)
|
||||
|
||||
register(
|
||||
["postgresql_supported"], common_groups,
|
||||
backup_incremental_groups,
|
||||
database_actions_groups,
|
||||
configuration_groups,
|
||||
replication_groups,
|
||||
root_actions_groups,
|
||||
user_actions_groups,
|
||||
["postgresql_supported"],
|
||||
single=[common_groups,
|
||||
backup_incremental_groups,
|
||||
database_actions_groups,
|
||||
configuration_groups,
|
||||
root_actions_groups,
|
||||
user_actions_groups, ],
|
||||
multi=[replication_groups, ]
|
||||
)
|
||||
|
||||
register(
|
||||
["mysql_supported", "percona_supported"], common_groups,
|
||||
backup_incremental_groups,
|
||||
configuration_groups,
|
||||
database_actions_groups,
|
||||
instance_upgrade_groups,
|
||||
replication_promote_groups,
|
||||
root_actions_groups,
|
||||
user_actions_groups,
|
||||
["mysql_supported", "percona_supported"],
|
||||
single=[common_groups,
|
||||
backup_incremental_groups,
|
||||
configuration_groups,
|
||||
database_actions_groups,
|
||||
instance_upgrade_groups,
|
||||
root_actions_groups,
|
||||
user_actions_groups, ],
|
||||
multi=[replication_promote_groups, ]
|
||||
)
|
||||
|
||||
register(
|
||||
["mariadb_supported"], common_groups,
|
||||
backup_incremental_groups,
|
||||
cluster_actions_groups,
|
||||
configuration_groups,
|
||||
database_actions_groups,
|
||||
replication_promote_groups,
|
||||
root_actions_groups,
|
||||
user_actions_groups,
|
||||
["mariadb_supported"],
|
||||
single=[common_groups,
|
||||
backup_incremental_groups,
|
||||
configuration_groups,
|
||||
database_actions_groups,
|
||||
root_actions_groups,
|
||||
user_actions_groups, ],
|
||||
multi=[replication_promote_groups,
|
||||
cluster_actions_groups, ]
|
||||
)
|
||||
|
||||
register(
|
||||
["mongodb_supported"], common_groups,
|
||||
backup_groups,
|
||||
cluster_actions_groups,
|
||||
configuration_groups,
|
||||
database_actions_groups,
|
||||
root_actions_groups,
|
||||
user_actions_groups,
|
||||
["mongodb_supported"],
|
||||
single=[common_groups,
|
||||
backup_groups,
|
||||
configuration_groups,
|
||||
database_actions_groups,
|
||||
root_actions_groups,
|
||||
user_actions_groups, ],
|
||||
multi=[cluster_actions_groups, ]
|
||||
)
|
||||
|
||||
register(
|
||||
["pxc_supported"], common_groups,
|
||||
backup_incremental_groups,
|
||||
cluster_actions_groups,
|
||||
configuration_groups,
|
||||
database_actions_groups,
|
||||
root_actions_groups,
|
||||
user_actions_groups,
|
||||
["pxc_supported"],
|
||||
single=[common_groups,
|
||||
backup_incremental_groups,
|
||||
configuration_groups,
|
||||
database_actions_groups,
|
||||
root_actions_groups,
|
||||
user_actions_groups, ],
|
||||
multi=[cluster_actions_groups, ]
|
||||
)
|
||||
|
||||
register(
|
||||
["redis_supported"], common_groups,
|
||||
backup_groups,
|
||||
cluster_actions_groups,
|
||||
replication_promote_groups,
|
||||
["redis_supported"],
|
||||
single=[common_groups,
|
||||
backup_groups, ],
|
||||
multi=[replication_promote_groups,
|
||||
cluster_actions_groups, ]
|
||||
)
|
||||
|
||||
register(
|
||||
["vertica_supported"], common_groups,
|
||||
cluster_actions_groups,
|
||||
configuration_groups,
|
||||
root_actions_groups,
|
||||
["vertica_supported"],
|
||||
single=[common_groups,
|
||||
configuration_groups,
|
||||
root_actions_groups, ],
|
||||
multi=[cluster_actions_groups, ]
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user