diff options
Diffstat (limited to 'meta/recipes-graphics/piglit')
7 files changed, 202 insertions, 2 deletions
diff --git a/meta/recipes-graphics/piglit/piglit/0001-Add-a-missing-include-for-htobe32-definition.patch b/meta/recipes-graphics/piglit/piglit/0001-Add-a-missing-include-for-htobe32-definition.patch new file mode 100644 index 0000000000..caa48e088d --- /dev/null +++ b/meta/recipes-graphics/piglit/piglit/0001-Add-a-missing-include-for-htobe32-definition.patch | |||
@@ -0,0 +1,27 @@ | |||
1 | From d623e9797b7ee9b3739a8a4afe1a01f7e03754aa Mon Sep 17 00:00:00 2001 | ||
2 | From: Alexander Kanavin <alex.kanavin@gmail.com> | ||
3 | Date: Sun, 1 Nov 2020 20:08:49 +0000 | ||
4 | Subject: [PATCH] Add a missing include for htobe32 definition | ||
5 | |||
6 | Upstream-Status: Pending | ||
7 | Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> | ||
8 | --- | ||
9 | tests/spec/nv_copy_depth_to_color/nv_copy_depth_to_color.c | 2 ++ | ||
10 | 1 file changed, 2 insertions(+) | ||
11 | |||
12 | diff --git a/tests/spec/nv_copy_depth_to_color/nv_copy_depth_to_color.c b/tests/spec/nv_copy_depth_to_color/nv_copy_depth_to_color.c | ||
13 | index 5f45e0c23..c755ee29a 100644 | ||
14 | --- a/tests/spec/nv_copy_depth_to_color/nv_copy_depth_to_color.c | ||
15 | +++ b/tests/spec/nv_copy_depth_to_color/nv_copy_depth_to_color.c | ||
16 | @@ -34,6 +34,8 @@ | ||
17 | |||
18 | #include "piglit-util-gl.h" | ||
19 | |||
20 | +#include <endian.h> | ||
21 | + | ||
22 | #define IMAGE_WIDTH 60 | ||
23 | #define IMAGE_HEIGHT 60 | ||
24 | |||
25 | -- | ||
26 | 2.17.1 | ||
27 | |||
diff --git a/meta/recipes-graphics/piglit/piglit/0001-framework-profile.py-make-test-lists-reproducible.patch b/meta/recipes-graphics/piglit/piglit/0001-framework-profile.py-make-test-lists-reproducible.patch new file mode 100644 index 0000000000..cc9482c047 --- /dev/null +++ b/meta/recipes-graphics/piglit/piglit/0001-framework-profile.py-make-test-lists-reproducible.patch | |||
@@ -0,0 +1,31 @@ | |||
1 | From 9086d42df1f3134bafcfe33ff16db7bbb9d9a0fd Mon Sep 17 00:00:00 2001 | ||
2 | From: Alexander Kanavin <alex.kanavin@gmail.com> | ||
3 | Date: Mon, 30 Nov 2020 23:08:22 +0000 | ||
4 | Subject: [PATCH] framework/profile.py: make test lists reproducible | ||
5 | |||
6 | These are created with os.walk, which yields different | ||
7 | order depending on where it's run. | ||
8 | |||
9 | Upstream-Status: Pending | ||
10 | Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> | ||
11 | --- | ||
12 | framework/profile.py | 6 +++++- | ||
13 | 1 file changed, 5 insertions(+), 1 deletion(-) | ||
14 | |||
15 | diff --git a/framework/profile.py b/framework/profile.py | ||
16 | index c210e535e..9b5d51d68 100644 | ||
17 | --- a/framework/profile.py | ||
18 | +++ b/framework/profile.py | ||
19 | @@ -528,7 +528,11 @@ class TestProfile(object): | ||
20 | else: | ||
21 | opts[n] = self.test_list[n] | ||
22 | else: | ||
23 | - opts = self.test_list # pylint: disable=redefined-variable-type | ||
24 | + opts = collections.OrderedDict() | ||
25 | + test_keys = list(self.test_list.keys()) | ||
26 | + test_keys.sort() | ||
27 | + for k in test_keys: | ||
28 | + opts[k] = self.test_list[k] | ||
29 | |||
30 | for k, v in self.filters.run(opts.items()): | ||
31 | yield k, v | ||
diff --git a/meta/recipes-graphics/piglit/piglit/0001-generated_tests-gen_tcs-tes_input_tests.py-do-not-ha.patch b/meta/recipes-graphics/piglit/piglit/0001-generated_tests-gen_tcs-tes_input_tests.py-do-not-ha.patch new file mode 100644 index 0000000000..8704f98500 --- /dev/null +++ b/meta/recipes-graphics/piglit/piglit/0001-generated_tests-gen_tcs-tes_input_tests.py-do-not-ha.patch | |||
@@ -0,0 +1,44 @@ | |||
1 | From 1b23539aece156f6fe0789cb988f22e5915228f6 Mon Sep 17 00:00:00 2001 | ||
2 | From: Alexander Kanavin <alex.kanavin@gmail.com> | ||
3 | Date: Tue, 10 Nov 2020 17:12:32 +0000 | ||
4 | Subject: [PATCH 1/2] generated_tests/gen_tcs/tes_input_tests.py: do not | ||
5 | hardcode the full binary path | ||
6 | |||
7 | This helps reproducibility. | ||
8 | |||
9 | Upstream-Status: Pending | ||
10 | Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> | ||
11 | --- | ||
12 | generated_tests/gen_tcs_input_tests.py | 2 +- | ||
13 | generated_tests/gen_tes_input_tests.py | 2 +- | ||
14 | 2 files changed, 2 insertions(+), 2 deletions(-) | ||
15 | |||
16 | diff --git a/generated_tests/gen_tcs_input_tests.py b/generated_tests/gen_tcs_input_tests.py | ||
17 | index face4f19a..e36671af4 100644 | ||
18 | --- a/generated_tests/gen_tcs_input_tests.py | ||
19 | +++ b/generated_tests/gen_tcs_input_tests.py | ||
20 | @@ -272,7 +272,7 @@ class Test(object): | ||
21 | relative probe rgb (0.75, 0.75) (0.0, 1.0, 0.0) | ||
22 | """) | ||
23 | |||
24 | - test = test.format(self=self, generator_command=" ".join(sys.argv)) | ||
25 | + test = test.format(self=self, generator_command="generated_tests/gen_tcs_input_tests.py") | ||
26 | |||
27 | filename = self.filename() | ||
28 | dirname = os.path.dirname(filename) | ||
29 | diff --git a/generated_tests/gen_tes_input_tests.py b/generated_tests/gen_tes_input_tests.py | ||
30 | index 3d847b5cc..954840b20 100644 | ||
31 | --- a/generated_tests/gen_tes_input_tests.py | ||
32 | +++ b/generated_tests/gen_tes_input_tests.py | ||
33 | @@ -301,7 +301,7 @@ class Test(object): | ||
34 | relative probe rgb (0.75, 0.75) (0.0, 1.0, 0.0) | ||
35 | """) | ||
36 | |||
37 | - test = test.format(self=self, generator_command=" ".join(sys.argv)) | ||
38 | + test = test.format(self=self, generator_command="generated_tests/gen_tes_input_tests.py") | ||
39 | |||
40 | filename = self.filename() | ||
41 | dirname = os.path.dirname(filename) | ||
42 | -- | ||
43 | 2.17.1 | ||
44 | |||
diff --git a/meta/recipes-graphics/piglit/piglit/0001-serializer.py-make-.gz-files-reproducible.patch b/meta/recipes-graphics/piglit/piglit/0001-serializer.py-make-.gz-files-reproducible.patch new file mode 100644 index 0000000000..2efba6f866 --- /dev/null +++ b/meta/recipes-graphics/piglit/piglit/0001-serializer.py-make-.gz-files-reproducible.patch | |||
@@ -0,0 +1,30 @@ | |||
1 | From 1919bb7f4072d73dcbb64d0e06eff5b04529c3db Mon Sep 17 00:00:00 2001 | ||
2 | From: Alexander Kanavin <alex.kanavin@gmail.com> | ||
3 | Date: Mon, 16 Nov 2020 18:01:02 +0000 | ||
4 | Subject: [PATCH] serializer.py: make .gz files reproducible | ||
5 | |||
6 | .gz format contains mtime of the compressed data, and | ||
7 | SOURCE_DATE_EPOCH is the standard way to make it reproducuble. | ||
8 | |||
9 | Upstream-Status: Pending | ||
10 | Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> | ||
11 | --- | ||
12 | tests/serializer.py | 5 ++++- | ||
13 | 1 file changed, 4 insertions(+), 1 deletion(-) | ||
14 | |||
15 | diff --git a/tests/serializer.py b/tests/serializer.py | ||
16 | index bd14bc3db..bc5b45d7f 100644 | ||
17 | --- a/tests/serializer.py | ||
18 | +++ b/tests/serializer.py | ||
19 | @@ -138,7 +138,10 @@ def serializer(name, profile, outfile): | ||
20 | et.SubElement(env, 'env', name=k, value=v) | ||
21 | |||
22 | tree = et.ElementTree(root) | ||
23 | - with gzip.open(outfile, 'wb') as f: | ||
24 | + reproducible_mtime = None | ||
25 | + if 'SOURCE_DATE_EPOCH' in os.environ: | ||
26 | + reproducible_mtime=os.environ['SOURCE_DATE_EPOCH'] | ||
27 | + with gzip.GzipFile(outfile, 'wb', mtime=reproducible_mtime) as f: | ||
28 | tree.write(f, encoding='utf-8', xml_declaration=True) | ||
29 | |||
30 | |||
diff --git a/meta/recipes-graphics/piglit/piglit/0001-tests-shader.py-sort-the-file-list-before-working-on.patch b/meta/recipes-graphics/piglit/piglit/0001-tests-shader.py-sort-the-file-list-before-working-on.patch new file mode 100644 index 0000000000..8321be8490 --- /dev/null +++ b/meta/recipes-graphics/piglit/piglit/0001-tests-shader.py-sort-the-file-list-before-working-on.patch | |||
@@ -0,0 +1,28 @@ | |||
1 | From 5bf89c6a314952313b2b762fff0d5501fe57ac53 Mon Sep 17 00:00:00 2001 | ||
2 | From: Alexander Kanavin <alex.kanavin@gmail.com> | ||
3 | Date: Wed, 2 Dec 2020 21:21:52 +0000 | ||
4 | Subject: [PATCH] tests/shader.py: sort the file list before working on it | ||
5 | |||
6 | This allows later xml output to be reproducible. | ||
7 | |||
8 | Upstream-Status: Pending | ||
9 | Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> | ||
10 | --- | ||
11 | tests/shader.py | 4 +++- | ||
12 | 1 file changed, 3 insertions(+), 1 deletion(-) | ||
13 | |||
14 | diff --git a/tests/shader.py b/tests/shader.py | ||
15 | index 849273660..e6e65d1ba 100644 | ||
16 | --- a/tests/shader.py | ||
17 | +++ b/tests/shader.py | ||
18 | @@ -52,7 +52,9 @@ for basedir in [TESTS_DIR, GENERATED_TESTS_DIR]: | ||
19 | for group, files in shader_tests.items(): | ||
20 | assert group not in profile.test_list, 'duplicate group: {}'.format(group) | ||
21 | |||
22 | - # We'll end up with a list of tuples, split that into two lists | ||
23 | + # This makes the xml output reproducible, as os.walk() order is random | ||
24 | + files.sort() | ||
25 | + # We'll end up with a list of tuples, split that into two list | ||
26 | files, installedfiles = list(zip(*files)) | ||
27 | files = list(files) | ||
28 | installedfiles = list(installedfiles) | ||
diff --git a/meta/recipes-graphics/piglit/piglit/0002-tests-util-piglit-shader.c-do-not-hardcode-build-pat.patch b/meta/recipes-graphics/piglit/piglit/0002-tests-util-piglit-shader.c-do-not-hardcode-build-pat.patch new file mode 100644 index 0000000000..16c7c5c803 --- /dev/null +++ b/meta/recipes-graphics/piglit/piglit/0002-tests-util-piglit-shader.c-do-not-hardcode-build-pat.patch | |||
@@ -0,0 +1,30 @@ | |||
1 | From 1c67250308a92d4991ed05d9d240090ab84accae Mon Sep 17 00:00:00 2001 | ||
2 | From: Alexander Kanavin <alex.kanavin@gmail.com> | ||
3 | Date: Tue, 10 Nov 2020 17:13:50 +0000 | ||
4 | Subject: [PATCH 2/2] tests/util/piglit-shader.c: do not hardcode build path | ||
5 | into target binary | ||
6 | |||
7 | This helps reproducibilty. | ||
8 | |||
9 | Upstream-Status: Inappropriate [oe-core specific] | ||
10 | Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> | ||
11 | --- | ||
12 | tests/util/piglit-shader.c | 2 +- | ||
13 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
14 | |||
15 | diff --git a/tests/util/piglit-shader.c b/tests/util/piglit-shader.c | ||
16 | index 4fd68d21e..c9ea8295e 100644 | ||
17 | --- a/tests/util/piglit-shader.c | ||
18 | +++ b/tests/util/piglit-shader.c | ||
19 | @@ -73,7 +73,7 @@ piglit_compile_shader(GLenum target, const char *filename) | ||
20 | |||
21 | source_dir = getenv("PIGLIT_SOURCE_DIR"); | ||
22 | if (source_dir == NULL) { | ||
23 | - source_dir = SOURCE_DIR; | ||
24 | + source_dir = "."; | ||
25 | } | ||
26 | |||
27 | snprintf(filename_with_path, FILENAME_MAX - 1, | ||
28 | -- | ||
29 | 2.17.1 | ||
30 | |||
diff --git a/meta/recipes-graphics/piglit/piglit_git.bb b/meta/recipes-graphics/piglit/piglit_git.bb index 58d10d6b9b..9897ef1575 100644 --- a/meta/recipes-graphics/piglit/piglit_git.bb +++ b/meta/recipes-graphics/piglit/piglit_git.bb | |||
@@ -1,16 +1,24 @@ | |||
1 | SUMMARY = "OpenGL driver testing framework" | 1 | SUMMARY = "OpenGL driver testing framework" |
2 | DESCRIPTION = "Piglit is an open-source test suite for OpenGL and OpenCL \ | 2 | DESCRIPTION = "Piglit is an open-source test suite for OpenGL and OpenCL \ |
3 | implementations." | 3 | implementations." |
4 | HOMEPAGE = "https://gitlab.freedesktop.org/mesa/piglit" | ||
5 | BUGTRACKER = "https://gitlab.freedesktop.org/mesa/piglit/-/issues" | ||
4 | LICENSE = "MIT & LGPLv2+ & GPLv3 & GPLv2+ & BSD-3-Clause" | 6 | LICENSE = "MIT & LGPLv2+ & GPLv3 & GPLv2+ & BSD-3-Clause" |
5 | LIC_FILES_CHKSUM = "file://COPYING;md5=b2beded7103a3d8a442a2a0391d607b0" | 7 | LIC_FILES_CHKSUM = "file://COPYING;md5=b2beded7103a3d8a442a2a0391d607b0" |
6 | 8 | ||
7 | SRC_URI = "git://gitlab.freedesktop.org/mesa/piglit.git;protocol=https \ | 9 | SRC_URI = "git://gitlab.freedesktop.org/mesa/piglit.git;protocol=https;branch=main \ |
8 | file://0001-cmake-install-bash-completions-in-the-right-place.patch \ | 10 | file://0001-cmake-install-bash-completions-in-the-right-place.patch \ |
9 | file://0001-cmake-use-proper-WAYLAND_INCLUDE_DIRS-variable.patch \ | 11 | file://0001-cmake-use-proper-WAYLAND_INCLUDE_DIRS-variable.patch \ |
12 | file://0001-Add-a-missing-include-for-htobe32-definition.patch \ | ||
13 | file://0001-generated_tests-gen_tcs-tes_input_tests.py-do-not-ha.patch \ | ||
14 | file://0002-tests-util-piglit-shader.c-do-not-hardcode-build-pat.patch \ | ||
15 | file://0001-serializer.py-make-.gz-files-reproducible.patch \ | ||
16 | file://0001-framework-profile.py-make-test-lists-reproducible.patch \ | ||
17 | file://0001-tests-shader.py-sort-the-file-list-before-working-on.patch \ | ||
10 | " | 18 | " |
11 | UPSTREAM_CHECK_COMMITS = "1" | 19 | UPSTREAM_CHECK_COMMITS = "1" |
12 | 20 | ||
13 | SRCREV = "6126c2d4e476c7770d216ffa1932c10e2a5a7813" | 21 | SRCREV = "83bc56abf2686e2cd9024a152e121ca4aa524985" |
14 | # (when PV goes above 1.0 remove the trailing r) | 22 | # (when PV goes above 1.0 remove the trailing r) |
15 | PV = "1.0+gitr${SRCPV}" | 23 | PV = "1.0+gitr${SRCPV}" |
16 | 24 | ||
@@ -35,7 +43,9 @@ do_compile[dirs] =+ "${B}/temp/" | |||
35 | PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}" | 43 | PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}" |
36 | PACKAGECONFIG[freeglut] = "-DPIGLIT_USE_GLUT=1,-DPIGLIT_USE_GLUT=0,freeglut," | 44 | PACKAGECONFIG[freeglut] = "-DPIGLIT_USE_GLUT=1,-DPIGLIT_USE_GLUT=0,freeglut," |
37 | PACKAGECONFIG[x11] = "-DPIGLIT_BUILD_GL_TESTS=ON,-DPIGLIT_BUILD_GL_TESTS=OFF,${X11_DEPS}, ${X11_RDEPS}" | 45 | PACKAGECONFIG[x11] = "-DPIGLIT_BUILD_GL_TESTS=ON,-DPIGLIT_BUILD_GL_TESTS=OFF,${X11_DEPS}, ${X11_RDEPS}" |
46 | PACKAGECONFIG[vulkan] = "-DPIGLIT_BUILD_VK_TESTS=ON,-DPIGLIT_BUILD_VK_TESTS=OFF,vulkan-loader" | ||
38 | 47 | ||
48 | export PIGLIT_BUILD_DIR = "../../../../git" | ||
39 | 49 | ||
40 | do_configure_prepend() { | 50 | do_configure_prepend() { |
41 | if [ "${@bb.utils.contains('PACKAGECONFIG', 'freeglut', 'yes', 'no', d)}" = "no" ]; then | 51 | if [ "${@bb.utils.contains('PACKAGECONFIG', 'freeglut', 'yes', 'no', d)}" = "no" ]; then |