]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commitdiff
piglit: replace setting PIGLIT_BUILD_DIR with a correct reproducibility fix
authorAlexander Kanavin <alex@linutronix.de>
Fri, 6 Jun 2025 20:58:07 +0000 (22:58 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 9 Jun 2025 16:43:20 +0000 (17:43 +0100)
PIGLIT_BUILD_DIR was set to source tree location relative to B as a
reproducibility workaround some years ago. Aafter some investigation
I found where the actual issue is (addressed by the patch).

Also, setting PIGLIT_BUILD_DIR relative to ${B} in a hardcoded way
is problematic as S and B are not necessarily related that way (e.g. when
sources are in UNPACKDIR or somewhere else entirely).

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-graphics/piglit/piglit/0001-tests-no_error.py-modify-_command-and-not-command.patch [new file with mode: 0644]
meta/recipes-graphics/piglit/piglit_git.bb

diff --git a/meta/recipes-graphics/piglit/piglit/0001-tests-no_error.py-modify-_command-and-not-command.patch b/meta/recipes-graphics/piglit/piglit/0001-tests-no_error.py-modify-_command-and-not-command.patch
new file mode 100644 (file)
index 0000000..f860055
--- /dev/null
@@ -0,0 +1,32 @@
+From 846efe923932d66810305b228fa09f83a172296d Mon Sep 17 00:00:00 2001
+From: Alexander Kanavin <alex@linutronix.de>
+Date: Thu, 22 May 2025 17:34:15 +0200
+Subject: [PATCH] tests/no_error.py: modify _command and not command
+
+command getter function has hidden magic that prepends build paths;
+this is an undesirable side effect here, as we only want to append a parameter
+and not change anything else.
+
+In particular this avoids adding build paths to installed .xml.gz file,
+ensuring reproducibility. Xml writer is already using _command for the
+same reason.
+
+Upstream-Status: Submitted [https://gitlab.freedesktop.org/mesa/piglit/-/merge_requests/1016]
+Signed-off-by: Alexander Kanavin <alex@linutronix.de>
+---
+ tests/no_error.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tests/no_error.py b/tests/no_error.py
+index 4ecaa9a01..c64eec0a1 100644
+--- a/tests/no_error.py
++++ b/tests/no_error.py
+@@ -21,4 +21,4 @@ for name, test in itertools.chain(_profile1.test_list.items(),
+                                   _profile2.test_list.items()):
+     if isinstance(test, (PiglitGLTest, ShaderTest, MultiShaderTest)):
+         profile.test_list['{} khr_no_error'.format(name)] = test
+-        test.command += ['-khr_no_error']
++        test._command += ['-khr_no_error']
+-- 
+2.39.5
+
index e30efdf33bda98037b01f6ee2a0270e03a85479b..dc210ff56d88c5a19264ce90d941af7d19829adc 100644 (file)
@@ -12,6 +12,7 @@ SRC_URI = "git://gitlab.freedesktop.org/mesa/piglit.git;protocol=https;branch=ma
            file://0001-tests-Fix-narrowing-errors-seen-with-clang.patch \
            file://0001-CMakeLists.txt-do-not-obtain-wayland-scanner-path-fr.patch \
            file://0001-tests-egl-spec-make-egl_ext_surface_compression-cond.patch \
+           file://0001-tests-no_error.py-modify-_command-and-not-command.patch \
            "
 UPSTREAM_CHECK_COMMITS = "1"
 
@@ -48,8 +49,6 @@ PACKAGECONFIG[x11] = "-DPIGLIT_USE_X11=1 -DPIGLIT_BUILD_GL_TESTS=ON -DPIGLIT_BUI
 PACKAGECONFIG[vulkan] = "-DPIGLIT_BUILD_VK_TESTS=ON,-DPIGLIT_BUILD_VK_TESTS=OFF,glslang-native vulkan-loader,glslang"
 PACKAGECONFIG[wayland] = "-DPIGLIT_USE_WAYLAND=1,-DPIGLIT_USE_WAYLAND=0,wayland-native wayland wayland-protocols"
 
-export PIGLIT_BUILD_DIR = "../../../../git"
-
 do_configure:prepend() {
    if [ "${@bb.utils.contains('PACKAGECONFIG', 'freeglut', 'yes', 'no', d)}" = "no" ]; then
         sed -i -e "/^#.*include <GL\/freeglut_ext.h>$/d" ${S}/src/piglit/glut_wrap.h