[Verify] Add tags to verifications

This patch allows us to add some tags to verifications when starting them.
When we have a lot of verifications, it is not a simple task to find the
desired verification from the list. But now we can filter verifications by
tags and it should help us.

Change-Id: I7c6c6a54f31100100b67a750d0381d88fa98dc96
This commit is contained in:
Yaroslav Lobankov 2017-01-12 00:33:06 +04:00
parent 174673be27
commit a928a0eeed
3 changed files with 7 additions and 5 deletions

View File

@ -49,7 +49,7 @@ _rally()
OPTS["verify_delete-verifier"]="--id --deployment-id --force"
OPTS["verify_delete-verifier-ext"]="--id --name"
OPTS["verify_import"]="--id --deployment-id --file --run-args --no-use"
OPTS["verify_list"]="--id --deployment-id --status"
OPTS["verify_list"]="--id --deployment-id --tag --status"
OPTS["verify_list-plugins"]="--namespace"
OPTS["verify_list-verifier-exts"]="--id"
OPTS["verify_list-verifier-tests"]="--id --pattern"
@ -57,7 +57,7 @@ _rally()
OPTS["verify_report"]="--uuid --type --to --open"
OPTS["verify_rerun"]="--uuid --deployment-id --failed"
OPTS["verify_show"]="--uuid --sort-by --detailed"
OPTS["verify_start"]="--id --deployment-id --pattern --concurrency --load-list --skip-list --xfail-list --no-use"
OPTS["verify_start"]="--id --deployment-id --tag --pattern --concurrency --load-list --skip-list --xfail-list --no-use"
OPTS["verify_update-verifier"]="--id --update-venv --version --system-wide --no-system-wide"
OPTS["verify_use"]="--uuid"
OPTS["verify_use-verifier"]="--id"

View File

@ -189,6 +189,7 @@ class _HookStatus(utils.ImmutableMixin, utils.EnumMixin):
class _TagType(utils.ImmutableMixin, utils.EnumMixin):
TASK = "task"
SUBTASK = "subtask"
VERIFICATION = "verification"
class _VerifierStatus(utils.ImmutableMixin, utils.EnumMixin):

View File

@ -262,8 +262,8 @@ def main():
# Start a verification, show results and generate reports
skip_list_path = write_file("skip-list.yaml", SKIP_TESTS)
xfail_list_path = write_file("xfail-list.yaml", XFAIL_TESTS)
run_args = ("%s --skip-list %s --xfail-list %s"
% (MODES[args.mode], skip_list_path, xfail_list_path))
run_args = ("%s --skip-list %s --xfail-list %s --tag first-run %s-set" %
(MODES[args.mode], skip_list_path, xfail_list_path, args.mode))
render_vars["verifications"].append(start_verification(run_args))
if args.compare:
@ -271,7 +271,8 @@ def main():
with gzip.open(render_vars["list_verifier_tests"]["stdout_file"]) as f:
tests = [t for t in f.read().split("\n") if TEST_NAME_RE.match(t)]
load_list_path = write_file("load-list.txt", "\n".join(tests))
run_args = "--load-list %s" % load_list_path
run_args = "--load-list %s --tag second-run %s-set" % (load_list_path,
args.mode)
render_vars["verifications"].append(start_verification(run_args))
# Generate trends reports for two verifications