Commit e237812c authored by Alexandros Frantzis's avatar Alexandros Frantzis

Move scripts to .gitlab-ci

Update directory structures and names to match the upstream Mesa
proposal, to make it easier to copy changes over.
Signed-off-by: Alexandros Frantzis's avatarAlexandros Frantzis <>
parent bbfbfda1
......@@ -132,8 +132,8 @@ mesa-build:
- export DISPLAY=:0
- export MESA_SHA=$(cat $CI_PROJECT_DIR/mesa_sha.txt)
- export LD_LIBRARY_PATH="$CI_PROJECT_DIR/mesa/install/lib/:/usr/local/lib/"
- bash $CI_PROJECT_DIR/scripts/
- export DEVICE_NAME="$(python3 scripts/"
- bash .gitlab-ci/tracie/
- export DEVICE_NAME="$(python3 .gitlab-ci/tracie/"
- export PYTHONPATH=/usr/local/lib/$(py3versions -d)/site-packages # Required for renderdoc
- mkdir -p "$CI_PROJECT_DIR/results/"
- bash -c "echo DEVICE=$DEVICE_NAME >$CI_PROJECT_DIR/results/summary.txt"
......@@ -141,9 +141,9 @@ mesa-build:
- cd $CI_PROJECT_DIR/traces-db
# Run renderdoc traces with the surfaceless platform
- EGL_PLATFORM=surfaceless DISPLAY= $CI_PROJECT_DIR/.gitlab-ci/ rdc
- EGL_PLATFORM=surfaceless DISPLAY= $CI_PROJECT_DIR/.gitlab-ci/ rdc
# Run apitrace traces with xvfb (for now, until we add surfaceless support)
- $CI_PROJECT_DIR/.gitlab-ci/ trace
- $CI_PROJECT_DIR/.gitlab-ci/ trace
# Disable performance replays, since we don't need them at the moment and
# the replay started failing:
# - python3 $CI_PROJECT_DIR/scripts/ .
......@@ -58,12 +58,14 @@ fetch_reference_images "$DEVICE_NAME" "$1" || exit $?
for trace in $(git lfs ls-files -n -I \*.$1)
python3 "$CI_PROJECT_DIR/scripts/" --device-name "$DEVICE_NAME" "$trace" || { echo "[fetch_trace] Skipping $trace since it has no reference images"; continue; }
python3 "$TRACIE_SCRIPT_DIR/" --device-name "$DEVICE_NAME" "$trace" || { echo "[fetch_trace] Skipping $trace since it has no reference images"; continue; }
fetch_trace "$trace" || exit $?
python3 "$CI_PROJECT_DIR/scripts/" --device-name "$DEVICE_NAME" "$trace" || exit $?
python3 "$CI_PROJECT_DIR/scripts/" --device-name "$DEVICE_NAME" --output-dir "$CI_PROJECT_DIR/results" "$trace" || ret=1
python3 "$TRACIE_SCRIPT_DIR/" --device-name "$DEVICE_NAME" "$trace" || exit $?
python3 "$TRACIE_SCRIPT_DIR/" --device-name "$DEVICE_NAME" --output-dir "$CI_PROJECT_DIR/results" "$trace" || ret=1
rm "$trace"
......@@ -47,7 +47,7 @@ Mesa traces CI uses a set of scripts to replay traces and check the output
against the reference images. We currently replay the traces with software
rendering under the Xvfb X server.
The [scripts/](scripts/ script replays
The [](.gitlab-ci/tracie/ script replays
traces, dumping the images from calls in the replay that match the expected
reference images. The dumped images are stored in a subdirectory `test` next
to the `references` directory and use the same filename format. The full log of
......@@ -62,7 +62,7 @@ Examples:
python3 tracesdir
python3 mytrace.trace
The [scripts/](scripts/ script
The [](.gitlab-ci/tracie/ script
compares the dumped test images of a trace against the reference images. It
then writes out a report, including the images and also any diff between them.
The script accepts either a single trace (.trace or .rdc), or a directory. In
......@@ -79,11 +79,11 @@ Examples:
It's often useful, especially during development, to be able to run the scripts
The [scripts/](scripts/ script depends
The [](.gitlab-ci/tracie/ script depends
on a recent version of apitrace being in the path, and also the renderdoc
python module being available.
The [scripts/](scripts/ script depends
The [](.gitlab-ci/tracie/ script depends
on a recent version of apitrace being in the path.
For some guidance for building apitrace and renderdoc, check the
......@@ -33,7 +33,7 @@ assert() {
run_tracie() {
# Run tests for the .testtrace types, using the "test-device" device name.
"$TRACIE_DIR/.gitlab-ci/" testtrace
"$TRACIE_DIR/.gitlab-ci/" testtrace
cleanup() {
......@@ -45,7 +45,7 @@ prepare_for_run() {
# Copy all the tracie scripts to the the test dir and later make that the
# CI_PROJECT_DIR for the script. This avoids polluting the
# normal working dir with test result artifacts.
trap cleanup EXIT
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