mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-29 06:51:10 +00:00
85cf995af7
In an autobuilder environment, there will typically be no hardware GPU available, so Mesa will fall back from hardware to Zink to software rendering. Unfortunately, Zink logs to stderr during loading if no hardware GPUs are available. This particular test asserts that stderr has desired contents, which means Zink's extra output causes the test to fail. We can bypass this by disabling use of Zink. Resolves: https://gitlab.gnome.org/GNOME/gtk/-/issues/6478 Signed-off-by: Simon McVittie <smcv@debian.org>
41 lines
853 B
Bash
Executable File
41 lines
853 B
Bash
Executable File
#! /bin/bash
|
|
|
|
GTK_BUILDER_TOOL=${GTK_BUILDER_TOOL:-gtk4-builder-tool}
|
|
TEST_DATA_DIR=${G_TEST_SRCDIR:-.}/validate-data
|
|
TEST_RESULT_DIR=${TEST_RESULT_DIR:-/tmp}/validate
|
|
|
|
# https://gitlab.freedesktop.org/mesa/mesa/-/issues/10293
|
|
export LIBGL_ALWAYS_SOFTWARE=true
|
|
|
|
mkdir -p "$TEST_RESULT_DIR"
|
|
|
|
shopt -s nullglob
|
|
TESTS=( "$TEST_DATA_DIR"/*.ui )
|
|
|
|
echo "1..${#TESTS[*]}"
|
|
|
|
I=1
|
|
for t in ${TESTS[*]}; do
|
|
name=$(basename $t .ui)
|
|
expected="$TEST_DATA_DIR/$name.expected"
|
|
result="$TEST_RESULT_DIR/$name.out"
|
|
diff="$TEST_RESULT_DIR/$name.diff"
|
|
ref="$TEST_RESULT_DIR/$name.ref"
|
|
|
|
cd $TEST_DATA_DIR
|
|
|
|
$GTK_BUILDER_TOOL validate --deprecations $(basename $t) 2>$result
|
|
|
|
cd $OLDPWD
|
|
|
|
if diff -u "$expected" "$result" > "$diff"; then
|
|
echo "ok $I $name"
|
|
rm "$diff"
|
|
else
|
|
echo "not ok $I $name"
|
|
cp "$expected" "$ref"
|
|
fi
|
|
|
|
I=$((I+1))
|
|
done
|