public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/fooyin] f45: Fix plugin installer test
@ 2026-10-23 13:14 Elaine Gibson
  0 siblings, 0 replies; only message in thread
From: Elaine Gibson @ 2026-10-23 13:14 UTC (permalink / raw)
  To: git-commits

A new commit has been pushed.

Repo   : rpms/fooyin
Branch : f45
Commit : 8562d1cc69589178c891188abfc65fc336444485
Author : Elaine Gibson <ypsvlq@gmail.com>
Date   : 2026-10-23T14:10:30+01:00
Stats  : +109/-2 in 2 file(s)
URL    : https://src.fedoraproject.org/rpms/fooyin/c/8562d1cc69589178c891188abfc65fc336444485?branch=f45

Log:
Fix plugin installer test

---
diff --git a/12b32d2c467f4351516ae066c1204b8867df4e94.patch b/12b32d2c467f4351516ae066c1204b8867df4e94.patch
new file mode 100644
index 0000000..8015573
--- /dev/null
+++ b/12b32d2c467f4351516ae066c1204b8867df4e94.patch
@@ -0,0 +1,108 @@
+From 12b32d2c467f4351516ae066c1204b8867df4e94 Mon Sep 17 00:00:00 2001
+From: Luke Taylor <luket@pm.me>
+Date: Fri, 23 Oct 2026 13:15:48 +0100
+Subject: [PATCH] [tests] Skip plugin bundle tests on unsupported platforms
+
+Addresses #1809
+---
+ tests/core/plugins/plugininstallertest.cpp | 41 +++++++++++++++++-----
+ 1 file changed, 33 insertions(+), 8 deletions(-)
+
+diff --git a/tests/core/plugins/plugininstallertest.cpp b/tests/core/plugins/plugininstallertest.cpp
+index cf723613e..8dbd301fc 100644
+--- a/tests/core/plugins/plugininstallertest.cpp
++++ b/tests/core/plugins/plugininstallertest.cpp
+@@ -47,17 +47,27 @@ struct ArchiveWriteDeleter
+ 
+ QString targetDirectory()
+ {
++    QString os;
+ #ifdef Q_OS_WIN
+-    const QString os = u"windows"_s;
++    os = "windows"_L1;
++#elifdef Q_OS_LINUX
++    os = "linux"_L1;
+ #elifdef Q_OS_MACOS
+-    const QString os = u"macos"_s;
++    os = "macos"_L1;
+ #elifdef Q_OS_FREEBSD
+-    const QString os = u"freebsd"_s;
++    os = "freebsd"_L1;
+ #else
+-    const QString os = u"linux"_s;
++    return {};
+ #endif
+     const QString arch = QSysInfo::buildCpuArchitecture();
+-    return os + (arch == "arm64"_L1 || arch == "aarch64"_L1 ? u"-arm64"_s : u"-x64"_s);
++    if(arch == "x86_64"_L1 || arch == "amd64"_L1) {
++        return os + "-x64"_L1;
++    }
++    if(arch == "arm64"_L1 || arch == "aarch64"_L1) {
++        return os + "-arm64"_L1;
++    }
++
++    return {};
+ }
+ 
+ bool createBundle(const QString& bundlePath, const QString& pluginPath, const QString& archivePluginPath)
+@@ -130,6 +140,11 @@ TEST(PluginInstallerTest, InstallsStandalonePluginIntoManagedDirectory)
+ 
+ TEST(PluginInstallerTest, InstallsPayloadForCurrentTarget)
+ {
++    const QString target = targetDirectory();
++    if(target.isEmpty()) {
++        GTEST_SKIP() << "Plugin bundles are unsupported on this platform";
++    }
++
+     const QTemporaryDir temporaryDirectory;
+     const QTemporaryDir plugins;
+     ASSERT_TRUE(temporaryDirectory.isValid());
+@@ -137,7 +152,7 @@ TEST(PluginInstallerTest, InstallsPayloadForCurrentTarget)
+ 
+     const QString bundlePath = temporaryDirectory.filePath(u"test.fyplugin"_s);
+     const QString pluginName = QFileInfo{QStringLiteral(TEST_PLUGIN_PATH)}.fileName();
+-    ASSERT_TRUE(createBundle(bundlePath, QStringLiteral(TEST_PLUGIN_PATH), targetDirectory() + u'/' + pluginName));
++    ASSERT_TRUE(createBundle(bundlePath, QStringLiteral(TEST_PLUGIN_PATH), target + u'/' + pluginName));
+ 
+     ASSERT_TRUE(QFile::copy(QStringLiteral(TEST_PLUGIN_PATH), plugins.filePath(pluginName)));
+     EXPECT_EQ(std::unexpected{PluginInstaller::InstallError::SameVersionInstalled},
+@@ -252,6 +267,11 @@ TEST(PluginInstallerTest, RemovesManagedPluginAndPendingUpdate)
+ 
+ TEST(PluginInstallerTest, RejectsTraversalEntry)
+ {
++    const QString target = targetDirectory();
++    if(target.isEmpty()) {
++        GTEST_SKIP() << "Plugin bundles are unsupported on this platform";
++    }
++
+     const QTemporaryDir temporaryDirectory;
+     const QTemporaryDir plugins;
+     ASSERT_TRUE(temporaryDirectory.isValid());
+@@ -259,7 +279,7 @@ TEST(PluginInstallerTest, RejectsTraversalEntry)
+ 
+     const QString bundlePath = temporaryDirectory.filePath(u"traversal.fyplugin"_s);
+     ASSERT_TRUE(createBundle(bundlePath, QStringLiteral(TEST_PLUGIN_PATH),
+-                             targetDirectory() + u"/../"_s + QFileInfo{QStringLiteral(TEST_PLUGIN_PATH)}.fileName()));
++                             target + u"/../"_s + QFileInfo{QStringLiteral(TEST_PLUGIN_PATH)}.fileName()));
+ 
+     EXPECT_EQ(std::unexpected{PluginInstaller::InstallError::InvalidBundle},
+               PluginInstaller::install(bundlePath, plugins.path(), false));
+@@ -268,12 +288,17 @@ TEST(PluginInstallerTest, RejectsTraversalEntry)
+ 
+ TEST(PluginInstallerTest, RejectsBundleWithoutCurrentTarget)
+ {
++    const QString target = targetDirectory();
++    if(target.isEmpty()) {
++        GTEST_SKIP() << "Plugin bundles are unsupported on this platform";
++    }
++
+     const QTemporaryDir temporaryDirectory;
+     const QTemporaryDir plugins;
+     ASSERT_TRUE(temporaryDirectory.isValid());
+     ASSERT_TRUE(plugins.isValid());
+ 
+-    const QString otherTarget = targetDirectory().startsWith("windows"_L1) ? u"linux-x64"_s : u"windows-x64"_s;
++    const QString otherTarget = target.startsWith("windows"_L1) ? u"linux-x64"_s : u"windows-x64"_s;
+     const QString bundlePath  = temporaryDirectory.filePath(u"wrong-target.fyplugin"_s);
+     ASSERT_TRUE(createBundle(bundlePath, QStringLiteral(TEST_PLUGIN_PATH),
+                              otherTarget + u'/' + QFileInfo{QStringLiteral(TEST_PLUGIN_PATH)}.fileName()));

diff --git a/fooyin.spec b/fooyin.spec
index 13db1ae..91cf6e9 100644
--- a/fooyin.spec
+++ b/fooyin.spec
@@ -6,8 +6,7 @@ Summary:        A customizable music player
 License:        GPL-3.0-or-later
 URL:            https://www.fooyin.org/
 Source0:        https://github.com/fooyin/fooyin/archive/v%{version}/fooyin-%{version}.tar.gz
-
-ExcludeArch:    %{ix86}
+Patch0:         https://github.com/fooyin/fooyin/commit/12b32d2c467f4351516ae066c1204b8867df4e94.patch
 
 BuildRequires:  cmake
 BuildRequires:  gcc-c++

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-10-23 13:14 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-23 13:14 [rpms/fooyin] f45: Fix plugin installer test Elaine Gibson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox