libdnf/0001-Add-x86_64_v2-to-tests.patch

43 lines
1.7 KiB
Diff
Raw Normal View History

2024-07-31 13:36:50 +00:00
From 9b2b677bee48f18d41f958f01e00142b0e39e543 Mon Sep 17 00:00:00 2001
From: eabdullin <ed.abdullin.1@gmail.com>
Date: Wed, 31 Jul 2024 16:34:28 +0300
Subject: [PATCH] Add x86_64_v2 to tests
---
tests/hawkey/test_sack.cpp | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/tests/hawkey/test_sack.cpp b/tests/hawkey/test_sack.cpp
index 98a8660..5b085f3 100644
--- a/tests/hawkey/test_sack.cpp
+++ b/tests/hawkey/test_sack.cpp
@@ -83,7 +83,7 @@ START_TEST(test_list_arches)
const char ** arches = dnf_sack_list_arches(sack);
/* noarch, x86_64, athlon, i686, i586, i486, i386 */
- fail_unless(g_strv_length((gchar**)arches) >= 6 && g_strv_length((gchar**)arches) <= 7);
+ fail_unless(g_strv_length((gchar**)arches) >= 6 && g_strv_length((gchar**)arches) <= 8);
if (g_strv_length((gchar**)arches) == 7) {
// Fedora, Mageia
@@ -94,6 +94,16 @@ START_TEST(test_list_arches)
ck_assert_str_eq(arches[4], "i586");
ck_assert_str_eq(arches[5], "i486");
ck_assert_str_eq(arches[6], "i386");
+ } else if (g_strv_length((gchar**)arches) == 8) {
+ // AlmaLinux x86_64_v2 arch is available
+ ck_assert_str_eq(arches[0], "noarch");
+ ck_assert_str_eq(arches[1], "x86_64");
+ ck_assert_str_eq(arches[2], "x86_64_v2");
+ ck_assert_str_eq(arches[3], "athlon");
+ ck_assert_str_eq(arches[4], "i686");
+ ck_assert_str_eq(arches[5], "i586");
+ ck_assert_str_eq(arches[6], "i486");
+ ck_assert_str_eq(arches[7], "i386");
} else {
// openSUSE, Debian - "athlon" is not available
ck_assert_str_eq(arches[0], "noarch");
--
2.39.3 (Apple Git-146)