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 <alexandros.frantzis@collabora.com>
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/setup-x.sh
- export DEVICE_NAME="$(python3 scripts/vendor_device_name.py)"
- bash .gitlab-ci/tracie/setup-x.sh
- export DEVICE_NAME="$(python3 .gitlab-ci/tracie/vendor_device_name.py)"
- 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:
script:
- cd $CI_PROJECT_DIR/traces-db
# Run renderdoc traces with the surfaceless platform
- EGL_PLATFORM=surfaceless DISPLAY= $CI_PROJECT_DIR/.gitlab-ci/run-tests.sh rdc
- EGL_PLATFORM=surfaceless DISPLAY= $CI_PROJECT_DIR/.gitlab-ci/tracie-runner.sh rdc
# Run apitrace traces with xvfb (for now, until we add surfaceless support)
- $CI_PROJECT_DIR/.gitlab-ci/run-tests.sh trace
- $CI_PROJECT_DIR/.gitlab-ci/tracie-runner.sh trace
# Disable performance replays, since we don't need them at the moment and
# the replay started failing: https://gitlab.freedesktop.org/gfx-ci/tracie/tracie/issues/1
# - python3 $CI_PROJECT_DIR/scripts/replay_trace_fps.py .
......
......@@ -58,12 +58,14 @@ fetch_reference_images "$DEVICE_NAME" "$1" || exit $?
ret=0
TRACIE_SCRIPT_DIR="$CI_PROJECT_DIR/.gitlab-ci/tracie"
for trace in $(git lfs ls-files -n -I \*.$1)
do
python3 "$CI_PROJECT_DIR/scripts/trace_has_ref_images.py" --device-name "$DEVICE_NAME" "$trace" || { echo "[fetch_trace] Skipping $trace since it has no reference images"; continue; }
python3 "$TRACIE_SCRIPT_DIR/trace_has_ref_images.py" --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/dump_trace_images.py" --device-name "$DEVICE_NAME" "$trace" || exit $?
python3 "$CI_PROJECT_DIR/scripts/diff_trace_images.py" --device-name "$DEVICE_NAME" --output-dir "$CI_PROJECT_DIR/results" "$trace" || ret=1
python3 "$TRACIE_SCRIPT_DIR/dump_trace_images.py" --device-name "$DEVICE_NAME" "$trace" || exit $?
python3 "$TRACIE_SCRIPT_DIR/diff_trace_images.py" --device-name "$DEVICE_NAME" --output-dir "$CI_PROJECT_DIR/results" "$trace" || ret=1
rm "$trace"
done
......
......@@ -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/dump_trace_images.py](scripts/dump_trace_images.py) script replays
The [dump_trace_images.py](.gitlab-ci/tracie/dump_trace_images.py) 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 dump_traces_images.py tracesdir
python3 dump_traces_images.py mytrace.trace
The [scripts/diff_trace_images.py](scripts/diff_trace_images.py) script
The [diff_trace_images.py](.gitlab-ci/tracie/diff_trace_images.py) 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
locally.
The [scripts/dump_trace_images.py](scripts/dump_trace_images.py) script depends
The [dump_trace_images.py](.gitlab-ci/tracie/dump_trace_images.py) script depends
on a recent version of apitrace being in the path, and also the renderdoc
python module being available.
The [scripts/diff_trace_images.py](scripts/diff_trace_images.py) script depends
The [diff_trace_images.py](.gitlab-ci/tracie/diff_trace_images.py) 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.
DEVICE_NAME=test-device CI_PROJECT_DIR="$TEST_DIR" \
"$TRACIE_DIR/.gitlab-ci/run-tests.sh" testtrace
"$TRACIE_DIR/.gitlab-ci/tracie-runner.sh" 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 run-tests.sh script. This avoids polluting the
# normal working dir with test result artifacts.
cp -R "$TRACIE_DIR"/* "$TEST_DIR"
cp -R "$TRACIE_DIR"/. "$TEST_DIR"
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