Commit b2c8d6ad authored by Tomeu Vizoso's avatar Tomeu Vizoso

ci: Upload dEQP results from LAVA to MinIO

Upload them and stash into job artifacts.
Signed-off-by: default avatarTomeu Vizoso <tomeu.vizoso@collabora.com>
parent 205a8784
......@@ -94,7 +94,6 @@ actions:
- wget -S --progress=dot:giga -O- {{ mesa_url }} | tar -xz
- export DEQP_NO_SAVE_RESULTS=1
- export DEQP_EXPECTED_FAILS=deqp-{{ gpu_version }}-fails.txt
- export DEQP_SKIPS=deqp-{{ gpu_version }}-skips.txt
- export DEQP_VER={{ deqp_version }}
......@@ -105,6 +104,11 @@ actions:
else
echo 'deqp: fail';
fi"
- find /results/ -type f -size +0c -name \*.csv -exec python3 /install/tracie/minio_uploads.py {} \;
- find /results/ -type f -size +0c -name \*.xml -exec python3 /install/tracie/minio_uploads.py {} \;
- find /results/ -type f -size +0c -name \*.xsl -exec python3 /install/tracie/minio_uploads.py {} \;
- find /results/ -type f -size +0c -name \*.css -exec python3 /install/tracie/minio_uploads.py {} \;
parse:
pattern: '(?P<test_case_id>\S*):\s+(?P<result>(pass|fail))'
from: inline
......
......@@ -44,7 +44,7 @@ kernel+rootfs_armhf:
variables:
GIT_STRATEGY: none # testing doesn't build anything from source
ENV_VARS: "DEQP_PARALLEL=6"
FIXED_ENV_VARS: "CI_PIPELINE_ID=${CI_PIPELINE_ID} CI_JOB_ID=${CI_JOB_ID} CI_PROJECT_PATH=${CI_PROJECT_PATH} CI_JOB_JWT=${CI_JOB_JWT} TRACIE_NO_UNIT_TESTS=1 TRACIE_UPLOAD_TO_MINIO=1 DRIVER_NAME=${DRIVER_NAME}"
FIXED_ENV_VARS: "CI_PIPELINE_ID=${CI_PIPELINE_ID} CI_JOB_ID=${CI_JOB_ID} CI_JOB_URL=${CI_JOB_URL} CI_PROJECT_PATH=${CI_PROJECT_PATH} CI_PROJECT_NAME=${CI_PROJECT_NAME} CI_PROJECT_NAMESPACE=${CI_PROJECT_NAMESPACE} CI_JOB_JWT=${CI_JOB_JWT} TRACIE_NO_UNIT_TESTS=1 TRACIE_UPLOAD_TO_MINIO=1 DRIVER_NAME=${DRIVER_NAME}"
DEQP_VERSION: gles2
ARTIFACTS_PREFIX: "https://minio-packet.freedesktop.org/mesa-lava/"
MESA_URL: "https://minio-packet.freedesktop.org/artifacts/${CI_PROJECT_PATH}/${CI_PIPELINE_ID}/mesa-${ARCH}.tar.gz"
......@@ -82,11 +82,21 @@ kernel+rootfs_armhf:
- result=`lavacli results $lava_job_id 0_${TEST_SUITE} ${TEST_SUITE} | head -1`
- echo $result
- '[[ "$result" == "pass" ]]'
after_script:
- mkdir -p results
- ci-fairy minio login $CI_JOB_JWT
- artifacts=`ci-fairy minio ls minio://minio-packet.freedesktop.org/artifacts/${CI_PROJECT_PATH}/${CI_PIPELINE_ID}/${CI_JOB_ID}/`
- >
for file in $artifacts; do
ci-fairy minio cp minio://minio-packet.freedesktop.org/artifacts/${CI_PROJECT_PATH}/${CI_PIPELINE_ID}/${CI_JOB_ID}/$file results/
done
artifacts:
name: "mesa_${CI_JOB_NAME}"
when: always
name: "mesa_${CI_JOB_NAME}"
paths:
- artifacts/
- results/
reports:
junit: results/junit.xml
.lava-test:armhf:
variables:
......@@ -132,34 +142,23 @@ kernel+rootfs_armhf:
- kernel+rootfs_amd64
- meson-testing
.lava-traces-base:
after_script:
- mkdir -p artifacts
- wget -O "artifacts/junit.xml" "https://minio-packet.freedesktop.org/artifacts/${CI_PROJECT_PATH}/${CI_PIPELINE_ID}/${CI_JOB_ID}/traces/junit.xml"
artifacts:
reports:
junit: artifacts/junit.xml
.lava-traces:amd64:
variables:
TEST_SUITE: "tracie"
extends:
- .lava-test:amd64
- .lava-traces-base
.lava-traces:armhf:
variables:
TEST_SUITE: "tracie"
extends:
- .lava-test:armhf
- .lava-traces-base
.lava-traces:arm64:
variables:
TEST_SUITE: "tracie"
extends:
- .lava-test:arm64
- .lava-traces-base
panfrost-t720-gles2:arm64:
extends:
......
......@@ -3,8 +3,10 @@ import datetime
import json
import hashlib
import hmac
import mimetypes
import os
import requests
import sys
import xml.etree.ElementTree as ET
from email.utils import formatdate
......@@ -78,3 +80,14 @@ def upload_artifact(file_name, key, content_type):
os.environ['CI_JOB_ID'],
key)
upload_to_minio(file_name, resource, content_type)
if __name__ == "__main__":
file_path = sys.argv[1]
file_name = os.path.basename(file_path)
mime_type = mimetypes.MimeTypes().guess_type(file_name)[0]
if mime_type is None:
mime_type = 'application/octet-stream'
upload_artifact(file_path, file_name, mime_type)
......@@ -179,7 +179,7 @@ def run(filename, device_name):
if os.environ.get('TRACIE_UPLOAD_TO_MINIO', '0') == '1':
upload_artifact(os.path.join(RESULTS_PATH, 'results.yml'), 'traces/results.yml', 'text/yaml')
upload_artifact(junit_xml_path, 'traces/junit.xml', 'text/xml')
upload_artifact(junit_xml_path, 'junit.xml', 'text/xml')
return all_ok
......
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