unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Simon South <simon@simonsouth.net>
To: 63400@debbugs.gnu.org
Subject: [bug#63400] [PATCH 1/1] gnu: vulkan-loader: Skip x86-specific tests on non-x86 platforms.
Date: Tue,  9 May 2023 16:45:27 -0400	[thread overview]
Message-ID: <1f4f4283b03ab0020443a9e23c01dd840819e1f0.1683661648.git.simon@simonsouth.net> (raw)
In-Reply-To: <cover.1683661648.git.simon@simonsouth.net>

* gnu/packages/patches/vulkan-loader-skip-incompatible-tests.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
* gnu/packages/vulkan.scm (vulkan-loader)[source]: Apply it.
---
 gnu/local.mk                                  |  1 +
 ...ulkan-loader-skip-incompatible-tests.patch | 62 +++++++++++++++++++
 gnu/packages/vulkan.scm                       |  2 +
 3 files changed, 65 insertions(+)
 create mode 100644 gnu/packages/patches/vulkan-loader-skip-incompatible-tests.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 77abf61d3c..b431e4f8ce 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -2031,6 +2031,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/vtk-7-gcc-10-compat.patch		\
   %D%/packages/patches/vtk-7-hdf5-compat.patch			\
   %D%/packages/patches/vtk-7-python-compat.patch		\
+  %D%/packages/patches/vulkan-loader-skip-incompatible-tests.patch	\
   %D%/packages/patches/wacomtablet-add-missing-includes.patch	\
   %D%/packages/patches/wacomtablet-qt5.15.patch			\
   %D%/packages/patches/warsow-qfusion-fix-bool-return-type.patch	\
diff --git a/gnu/packages/patches/vulkan-loader-skip-incompatible-tests.patch b/gnu/packages/patches/vulkan-loader-skip-incompatible-tests.patch
new file mode 100644
index 0000000000..92e3d03bb6
--- /dev/null
+++ b/gnu/packages/patches/vulkan-loader-skip-incompatible-tests.patch
@@ -0,0 +1,62 @@
+Certain tests that use the pre-built libraries provided in
+tests/framework/data/binaries presume they are running on a 32- or
+64-bit x86 host, as these are the only architectures for which the
+libraries are provided.
+
+Skip these tests on non-x86 platforms where the tests are certain to
+fail.
+
+diff --git a/tests/loader_regression_tests.cpp b/tests/loader_regression_tests.cpp
+index 7390596bd..1b0780c65 100644
+--- a/tests/loader_regression_tests.cpp
++++ b/tests/loader_regression_tests.cpp
+@@ -1014,6 +1014,9 @@ TEST(CreateDevice, ConsecutiveCreateWithoutDestruction) {
+ }
+ 
+ TEST(TryLoadWrongBinaries, WrongICD) {
++#if !defined(__x86_64__) && !defined(__i386__)
++    GTEST_SKIP() << "Skip this test as it is not compatible with this architecture.";
++#endif
+     FrameworkEnvironment env{};
+     env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
+     env.add_icd(TestICDDetails(CURRENT_PLATFORM_DUMMY_BINARY_WRONG_TYPE).set_is_fake(true));
+@@ -1041,6 +1044,9 @@ TEST(TryLoadWrongBinaries, WrongICD) {
+ }
+ 
+ TEST(TryLoadWrongBinaries, WrongExplicit) {
++#if !defined(__x86_64__) && !defined(__i386__)
++    GTEST_SKIP() << "Skip this test as it is not compatible with this architecture.";
++#endif
+     FrameworkEnvironment env{};
+     env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
+     env.get_test_icd().physical_devices.emplace_back("physical_device_0");
+@@ -1077,6 +1083,9 @@ TEST(TryLoadWrongBinaries, WrongExplicit) {
+ }
+ 
+ TEST(TryLoadWrongBinaries, WrongImplicit) {
++#if !defined(__x86_64__) && !defined(__i386__)
++    GTEST_SKIP() << "Skip this test as it is not compatible with this architecture.";
++#endif
+     FrameworkEnvironment env{};
+     env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
+     env.get_test_icd().physical_devices.emplace_back("physical_device_0");
+@@ -1114,6 +1123,9 @@ TEST(TryLoadWrongBinaries, WrongImplicit) {
+ }
+ 
+ TEST(TryLoadWrongBinaries, WrongExplicitAndImplicit) {
++#if !defined(__x86_64__) && !defined(__i386__)
++    GTEST_SKIP() << "Skip this test as it is not compatible with this architecture.";
++#endif
+     FrameworkEnvironment env{};
+     env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
+     env.get_test_icd().physical_devices.emplace_back("physical_device_0");
+@@ -1159,6 +1171,9 @@ TEST(TryLoadWrongBinaries, WrongExplicitAndImplicit) {
+ }
+ 
+ TEST(TryLoadWrongBinaries, WrongExplicitAndImplicitErrorOnly) {
++#if !defined(__x86_64__) && !defined(__i386__)
++    GTEST_SKIP() << "Skip this test as it is not compatible with this architecture.";
++#endif
+     FrameworkEnvironment env{};
+     env.add_icd(TestICDDetails(TEST_ICD_PATH_VERSION_2));
+     env.get_test_icd().physical_devices.emplace_back("physical_device_0");
diff --git a/gnu/packages/vulkan.scm b/gnu/packages/vulkan.scm
index b0d968938b..e9f287564c 100644
--- a/gnu/packages/vulkan.scm
+++ b/gnu/packages/vulkan.scm
@@ -222,6 +222,8 @@ (define-public vulkan-loader
              (url "https://github.com/KhronosGroup/Vulkan-Loader")
              (commit "v1.3.232")))
        (file-name (git-file-name name version))
+       (patches
+        (search-patches "vulkan-loader-skip-incompatible-tests.patch"))
        (sha256
         (base32
          "0w69sh669sx9pwlvv2rv92ds2hm2rbzsa6qqcmd8kcad0qfq7dz2"))))
-- 
2.39.2





  reply	other threads:[~2023-05-09 20:47 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-09 20:43 [bug#63400] [PATCH 0/1] gnu: vulkan-loader: Skip x86-specific tests on non-x86 platforms Simon South
2023-05-09 20:45 ` Simon South [this message]
2023-05-15 19:02 ` Efraim Flashner
2023-06-04 13:11 ` [bug#63400] [PATCH v2 0/2] " Simon South
2023-06-04 13:11   ` [bug#63400] [PATCH v2 1/2] " Simon South
2023-06-04 13:11   ` [bug#63400] [PATCH v2 2/2] gnu: vulkan-loader: Re-enable tests on AArch64 Simon South

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1f4f4283b03ab0020443a9e23c01dd840819e1f0.1683661648.git.simon@simonsouth.net \
    --to=simon@simonsouth.net \
    --cc=63400@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).