From b2a037780e24c776f81542d310f453bc15331d44 Mon Sep 17 00:00:00 2001 From: Alexander Kanavin Date: Fri, 6 Jun 2025 22:58:07 +0200 Subject: [PATCH] piglit: replace setting PIGLIT_BUILD_DIR with a correct reproducibility fix 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). (From OE-Core rev: 7625176fedacede86fda84a47dd76f62a14cb8e0) Signed-off-by: Alexander Kanavin Signed-off-by: Richard Purdie --- ...r.py-modify-_command-and-not-command.patch | 32 +++++++++++++++++++ meta/recipes-graphics/piglit/piglit_git.bb | 3 +- 2 files changed, 33 insertions(+), 2 deletions(-) create mode 100644 meta/recipes-graphics/piglit/piglit/0001-tests-no_error.py-modify-_command-and-not-command.patch 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 index 0000000000..f8600556e5 --- /dev/null +++ b/meta/recipes-graphics/piglit/piglit/0001-tests-no_error.py-modify-_command-and-not-command.patch @@ -0,0 +1,32 @@ +From 846efe923932d66810305b228fa09f83a172296d Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin +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 +--- + 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 + diff --git a/meta/recipes-graphics/piglit/piglit_git.bb b/meta/recipes-graphics/piglit/piglit_git.bb index e30efdf33b..dc210ff56d 100644 --- a/meta/recipes-graphics/piglit/piglit_git.bb +++ b/meta/recipes-graphics/piglit/piglit_git.bb @@ -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 $/d" ${S}/src/piglit/glut_wrap.h