From e4521aeafc8254da639feb8a4421a445a88d9fde Mon Sep 17 00:00:00 2001 From: Andres Gomez Date: Mon, 20 Apr 2020 13:40:05 +0300 Subject: [PATCH] gitlab-ci: adapt query_traces_yaml to gitlab specific changes This change was missing after acf7e73be54 "(gitlab-ci: make explicit tracie is gitlab specific)". Fixes: acf7e73be54 "(gitlab-ci: make explicit tracie is gitlab specific)". Signed-off-by: Andres Gomez Reviewed-by: Alexandros Frantzis Reviewed-by: Rohan Garg Part-of: --- .gitlab-ci/tracie/README.md | 18 ++++++++++-------- .gitlab-ci/tracie/query_traces_yaml.py | 9 +++++---- 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/.gitlab-ci/tracie/README.md b/.gitlab-ci/tracie/README.md index 8dc32d043c9..a459828982b 100644 --- a/.gitlab-ci/tracie/README.md +++ b/.gitlab-ci/tracie/README.md @@ -5,13 +5,14 @@ Home of the Mesa trace testing effort. ### Traces definition file -The trace definition file contains information about the git repo/commit to get -the traces from, and a list of the traces to run along with their expected image -checksums on each device. An example: +The trace definition file contains information about the GitLab +project and git commit to get the traces from, and a list of the +traces to run along with their expected image checksums on each +device. An example: ```yaml traces-db: - repo: https://gitlab.freedesktop.org/gfx-ci/tracie/traces-db + gitlab-project-url: https://gitlab.freedesktop.org/gfx-ci/tracie/traces-db commit: master traces: @@ -39,11 +40,12 @@ with the [image_checksum.py](.gitlab-ci/tracie/image_checksum.py) script. Alternatively, an arbitrary checksum can be used, and during replay (see below) the scripts will report the mismatch and expected checksum. -### Trace-db repos +### Trace-db GitLab projects -The trace-db repos are assumed to be git repositories using LFS for their trace -files. This is so that trace files can be potentially checked out and replayed -individually, thus reducing storage requirements during CI runs. +The trace-db GitLab projects are assumed to have git repositories +using LFS for their trace files. This is so that trace files can be +potentially checked out and replayed individually, thus reducing +storage requirements during CI runs. ### Enabling trace testing on a new device diff --git a/.gitlab-ci/tracie/query_traces_yaml.py b/.gitlab-ci/tracie/query_traces_yaml.py index 6ed069ba804..fe4b2be5d1a 100644 --- a/.gitlab-ci/tracie/query_traces_yaml.py +++ b/.gitlab-ci/tracie/query_traces_yaml.py @@ -1,6 +1,7 @@ #!/usr/bin/python3 # Copyright (c) 2019 Collabora Ltd +# Copyright © 2020 Valve Corporation. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), @@ -30,10 +31,10 @@ from traceutil import trace_type_from_filename def trace_devices(trace): return [e['device'] for e in trace['expectations']] -def cmd_traces_db_repo(args): +def cmd_traces_db_gitlab_project_url(args): with open(args.file, 'r') as f: y = yaml.safe_load(f) - print(y['traces-db']['repo']) + print(y['traces-db']['gitlab-project-url']) def cmd_traces_db_commit(args): with open(args.file, 'r') as f: @@ -74,8 +75,8 @@ def main(): subparsers = parser.add_subparsers(help='sub-command help') - parser_traces_db_repo = subparsers.add_parser('traces_db_repo') - parser_traces_db_repo.set_defaults(func=cmd_traces_db_repo) + parser_traces_db_gitlab_project_url = subparsers.add_parser('traces_db_gitlab_project_url') + parser_traces_db_gitlab_project_url.set_defaults(func=cmd_traces_db_gitlab_project_url) parser_traces_db_commit = subparsers.add_parser('traces_db_commit') parser_traces_db_commit.set_defaults(func=cmd_traces_db_commit) -- 2.30.2