diff options
author | Alexander Kanavin <alex@linutronix.de> | 2025-06-06 22:58:07 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2025-06-09 17:43:41 +0100 |
commit | b2a037780e24c776f81542d310f453bc15331d44 (patch) | |
tree | ad0b26b6b82458280198ea978a2f6eb83755bbe5 | |
parent | 637de32065f17dac0aafa3369873b73284c987dc (diff) | |
download | poky-b2a037780e24c776f81542d310f453bc15331d44.tar.gz |
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 <alex@linutronix.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/recipes-graphics/piglit/piglit/0001-tests-no_error.py-modify-_command-and-not-command.patch | 32 | ||||
-rw-r--r-- | meta/recipes-graphics/piglit/piglit_git.bb | 3 |
2 files changed, 33 insertions, 2 deletions
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 @@ | |||
1 | From 846efe923932d66810305b228fa09f83a172296d Mon Sep 17 00:00:00 2001 | ||
2 | From: Alexander Kanavin <alex@linutronix.de> | ||
3 | Date: Thu, 22 May 2025 17:34:15 +0200 | ||
4 | Subject: [PATCH] tests/no_error.py: modify _command and not command | ||
5 | |||
6 | command getter function has hidden magic that prepends build paths; | ||
7 | this is an undesirable side effect here, as we only want to append a parameter | ||
8 | and not change anything else. | ||
9 | |||
10 | In particular this avoids adding build paths to installed .xml.gz file, | ||
11 | ensuring reproducibility. Xml writer is already using _command for the | ||
12 | same reason. | ||
13 | |||
14 | Upstream-Status: Submitted [https://gitlab.freedesktop.org/mesa/piglit/-/merge_requests/1016] | ||
15 | Signed-off-by: Alexander Kanavin <alex@linutronix.de> | ||
16 | --- | ||
17 | tests/no_error.py | 2 +- | ||
18 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
19 | |||
20 | diff --git a/tests/no_error.py b/tests/no_error.py | ||
21 | index 4ecaa9a01..c64eec0a1 100644 | ||
22 | --- a/tests/no_error.py | ||
23 | +++ b/tests/no_error.py | ||
24 | @@ -21,4 +21,4 @@ for name, test in itertools.chain(_profile1.test_list.items(), | ||
25 | _profile2.test_list.items()): | ||
26 | if isinstance(test, (PiglitGLTest, ShaderTest, MultiShaderTest)): | ||
27 | profile.test_list['{} khr_no_error'.format(name)] = test | ||
28 | - test.command += ['-khr_no_error'] | ||
29 | + test._command += ['-khr_no_error'] | ||
30 | -- | ||
31 | 2.39.5 | ||
32 | |||
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 | |||
12 | file://0001-tests-Fix-narrowing-errors-seen-with-clang.patch \ | 12 | file://0001-tests-Fix-narrowing-errors-seen-with-clang.patch \ |
13 | file://0001-CMakeLists.txt-do-not-obtain-wayland-scanner-path-fr.patch \ | 13 | file://0001-CMakeLists.txt-do-not-obtain-wayland-scanner-path-fr.patch \ |
14 | file://0001-tests-egl-spec-make-egl_ext_surface_compression-cond.patch \ | 14 | file://0001-tests-egl-spec-make-egl_ext_surface_compression-cond.patch \ |
15 | file://0001-tests-no_error.py-modify-_command-and-not-command.patch \ | ||
15 | " | 16 | " |
16 | UPSTREAM_CHECK_COMMITS = "1" | 17 | UPSTREAM_CHECK_COMMITS = "1" |
17 | 18 | ||
@@ -48,8 +49,6 @@ PACKAGECONFIG[x11] = "-DPIGLIT_USE_X11=1 -DPIGLIT_BUILD_GL_TESTS=ON -DPIGLIT_BUI | |||
48 | PACKAGECONFIG[vulkan] = "-DPIGLIT_BUILD_VK_TESTS=ON,-DPIGLIT_BUILD_VK_TESTS=OFF,glslang-native vulkan-loader,glslang" | 49 | PACKAGECONFIG[vulkan] = "-DPIGLIT_BUILD_VK_TESTS=ON,-DPIGLIT_BUILD_VK_TESTS=OFF,glslang-native vulkan-loader,glslang" |
49 | PACKAGECONFIG[wayland] = "-DPIGLIT_USE_WAYLAND=1,-DPIGLIT_USE_WAYLAND=0,wayland-native wayland wayland-protocols" | 50 | PACKAGECONFIG[wayland] = "-DPIGLIT_USE_WAYLAND=1,-DPIGLIT_USE_WAYLAND=0,wayland-native wayland wayland-protocols" |
50 | 51 | ||
51 | export PIGLIT_BUILD_DIR = "../../../../git" | ||
52 | |||
53 | do_configure:prepend() { | 52 | do_configure:prepend() { |
54 | if [ "${@bb.utils.contains('PACKAGECONFIG', 'freeglut', 'yes', 'no', d)}" = "no" ]; then | 53 | if [ "${@bb.utils.contains('PACKAGECONFIG', 'freeglut', 'yes', 'no', d)}" = "no" ]; then |
55 | sed -i -e "/^#.*include <GL\/freeglut_ext.h>$/d" ${S}/src/piglit/glut_wrap.h | 54 | sed -i -e "/^#.*include <GL\/freeglut_ext.h>$/d" ${S}/src/piglit/glut_wrap.h |