!25 [sync] PR-22: enable test

From: @openeuler-sync-bot 
Reviewed-by: @t_feng 
Signed-off-by: @t_feng
This commit is contained in:
openeuler-ci-bot 2023-10-26 11:20:38 +00:00 committed by Gitee
commit 76aab611eb
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 58 additions and 2 deletions

View File

@ -1,16 +1,19 @@
Name: blivet-gui
Version: 2.3.0
Release: 2
Release: 3
Summary: Tool for data storage configuration
License: GPLv2+
URL: https://github.com/storaged-project/blivet-gui
Source0: https://github.com/storaged-project/blivet-gui/releases/download/%{version}-1/%{name}-%{version}.tar.gz
Patch0: backport-Do-not-allow-setting-chunk-size-for-RAID1.patch
Patch1: backport-fix-device-format-error-when-removing-a-non-existing.patch
Patch1: backport-fix-device-format-error-when-removing-a-non-existing.patch
Patch2: skip-brtfs-raid-test-if-no-support.patch
BuildArch: noarch
BuildRequires: desktop-file-utils libappstream-glib python3-devel gettext >= 0.18.3 python3-setuptools
#required by test
BuildRequires: python3-six python3-gobject-base python3-blivet xorg-x11-server-Xvfb
Requires: python3 python3-gobject gettext python3-blivet gtk3
Requires: PolicyKit-authentication-agent python3-pid libreport
@ -37,6 +40,9 @@ desktop-file-validate %{buildroot}/%{_datadir}/applications/blivet-gui.desktop
appstream-util validate-relax --nonet %{buildroot}/%{_datadir}/appdata/blivet-gui.appdata.xml
install -d %{buildroot}/%{_localstatedir}/log/blivet-gui
%check
make test
%files
%defattr(-,root,root)
%doc COPYING
@ -57,6 +63,12 @@ install -d %{buildroot}/%{_localstatedir}/log/blivet-gui
%{_mandir}/man1/blivet-gui.1*
%changelog
* Thu Sep 28 2023 zhouyihang<zhouyihang3@h-partners.com> - 2.3.0-3
- Type:requirements
- ID:NA
- SUG:NA
- DESC:enable test
* Fri May 13 2022 haomimi <haomimi@uniontech.com> - 2.3.0-2
- fix "bogus date %changelog" for spec file

View File

@ -0,0 +1,44 @@
From 0286e1f0c2a1986c323b9c6a68dc6e106dcebd26 Mon Sep 17 00:00:00 2001
From: zhouyihang <zhouyihang3@h-partners.com>
Date: Thu, 28 Sep 2023 11:14:18 +0800
Subject: [PATCH] skip brtfs raid test if no support
---
tests/blivetgui_tests/add_dialog_test.py | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/tests/blivetgui_tests/add_dialog_test.py b/tests/blivetgui_tests/add_dialog_test.py
index 93d89ec..dd9ff09 100644
--- a/tests/blivetgui_tests/add_dialog_test.py
+++ b/tests/blivetgui_tests/add_dialog_test.py
@@ -10,6 +10,7 @@ import os
from blivet.size import Size
from blivet import formats
+from blivet import devicefactory
from blivet.devicelibs import raid
@@ -349,6 +350,9 @@ class AddDialogTest(unittest.TestCase):
self.assertTrue(add_dialog.size_area.get_sensitive())
def test_btrfsvolume_widgets(self):
+ btrfs_raid_level=devicefactory.get_supported_raid_levels(devicefactory.DEVICE_TYPE_BTRFS)
+ if not len(btrfs_raid_level):
+ self.skipTest("No supported raid level of btrfs found")
parent_device = self._get_parent_device()
free_device = self._get_free_device(parent=parent_device)
@@ -760,6 +764,9 @@ class AddDialogTest(unittest.TestCase):
self.assertEqual(selection.raid_level, raidtype)
def test_btrfs_selection(self):
+ btrfs_raid_level=devicefactory.get_supported_raid_levels(devicefactory.DEVICE_TYPE_BTRFS)
+ if not len(btrfs_raid_level):
+ self.skipTest("No supported raid level of btrfs found")
parent_device = self._get_parent_device()
free_device = self._get_free_device(parent=parent_device, size=Size("8 GiB"), is_free_region=False,
is_empty_disk=True)
--
2.27.0