We are currently experiencing downtime impacting viewing & cloning the Mesa repo, and some GitLab pages returning 503. Please see #freedesktop on IRC for more updates.

Commit d01df7c4 authored by Alexandros Frantzis's avatar Alexandros Frantzis

Don't download traces that have no references images

Signed-off-by: Alexandros Frantzis's avatarAlexandros Frantzis <alexandros.frantzis@collabora.com>
parent 20e0f170
......@@ -34,6 +34,10 @@ ret=0
for trace in $(git lfs ls-files -n -I \*.$1)
do
if ! python3 "$CI_PROJECT_DIR/scripts/trace_has_ref_images.py" --device-name "$DEVICE_NAME" "$trace"; then
echo "[fetch_trace] Skipping $trace since it has no reference images"
continue;
fi
fetch_trace "$trace"
python3 $CI_PROJECT_DIR/scripts/dump_trace_images.py --device-name "$DEVICE_NAME" "$trace"
python3 $CI_PROJECT_DIR/scripts/diff_trace_images.py --device-name "$DEVICE_NAME" --output-dir "$CI_PROJECT_DIR/results" "$trace"
......
#!/usr/bin/python3
# Copyright (c) 2019 Collabora Ltd
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
# and/or sell copies of the Software, and to permit persons to whom the
# Software is furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included
# in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
# OTHER DEALINGS IN THE SOFTWARE.
#
# SPDX-License-Identifier: MIT
import argparse
import sys
from pathlib import Path
from traceutil import trace_has_images
def main():
parser = argparse.ArgumentParser()
parser.add_argument('tracepath', help="single trace")
parser.add_argument('--device-name', required=True,
help="the name of the graphics device used to produce images")
args = parser.parse_args()
has_images = trace_has_images(Path(args.tracepath),
str(Path("references") / args.device_name))
# Use the shell convention of 0 for true/success and 1 for false/failure
return 0 if has_images else 1
if __name__ == "__main__":
sys.exit(main())
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment