File yast-help-test.spec of Package yast-help-test

Name:           yast-help-test
Version:        1.0
Release:        1
License:        GPL
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
# all YaST packages from Factory INDEX.gz
BuildRequires:  autoyast2 autoyast2-installation yast2 yast2-add-on yast2-add-on-creator yast2-apparmor yast2-autofs yast2-backup 
BuildRequires:  yast2-bluetooth yast2-bootloader yast2-ca-management yast2-CASA yast2-control-center 
BuildRequires:  yast2-control-center-gnome yast2-control-center-qt yast2-core yast2-core-devel yast2-country yast2-devel-doc 
BuildRequires:  yast2-devtools yast2-dhcp-server yast2-dns-server yast2-drbd yast2-fingerprint-reader yast2-firewall 
BuildRequires:  yast2-firstboot yast2-ftp-server yast2-gtk yast2-hardware-detection yast2-http-server yast2-inetd 
BuildRequires:  yast2-installation yast2-installation-devel-doc yast2-instserver yast2-irda yast2-iscsi-client yast2-iscsi-server 
BuildRequires:  yast2-kerberos-client yast2-ldap yast2-ldap-client yast2-ldap-server yast2-live-installer yast2-mail
BuildRequires:  yast2-mail-plugins yast2-mcs-plugin yast2-metapackage-handler yast2-mouse yast2-multipath yast2-ncurses 
BuildRequires:  yast2-network yast2-network-devel-doc yast2-nfs-client yast2-nfs-server yast2-nis-client yast2-nis-server 
BuildRequires:  yast2-nis-server-devel-doc yast2-ntp-client yast2-online-update yast2-online-update-frontend yast2-packager 
BuildRequires:  yast2-pam yast2-perl-bindings yast2-phone-services yast2-pkg-bindings yast2-pkg-bindings-devel-doc yast2-printer 
BuildRequires:  yast2-printer-devel-doc yast2-product-creator yast2-profile-manager yast2-qt yast2-registration yast2-repair 
BuildRequires:  yast2-restore yast2-runlevel yast2-samba-client yast2-samba-server yast2-scanner yast2-schema yast2-security 
BuildRequires:  yast2-slide-show-SuSELinux yast2-slp yast2-slp-server yast2-sound yast2-sshd yast2-storage yast2-storage-devel 
BuildRequires:  yast2-storage-evms yast2-storage-lib yast2-sudo yast2-support yast2-sysconfig yast2-testsuite yast2-tftp-server 

# error: Failed build dependencies:
# yast2-theme-openSUSE is needed by yast-help-test-1.0-6.1.i586
BuildRequires:  -yast2-theme-openSUSE 

# yast2-cd-creator existiert scheinbar nicht mehr, daher entfernt

BuildRequires:  yast2-theme-openSUSE-Crystal 
BuildRequires:  yast2-tune yast2-tv yast2-update yast2-update-FACTORY yast2-users yast2-vm yast2-xml

# Language packages
BuildRequires:  yast2-trans-af yast2-trans-allpacks yast2-trans-ar yast2-trans-bg yast2-trans-bn yast2-trans-bs yast2-trans-ca 
BuildRequires:  yast2-trans-cs yast2-trans-cy yast2-trans-da yast2-trans-de yast2-trans-el yast2-trans-en_GB 
BuildRequires:  -yast2-trans-en_US   
# conflicts with YaST2-CASA, https://bugzilla.novell.com/show_bug.cgi?id=299044
BuildRequires:  yast2-trans-es yast2-trans-et yast2-trans-fa yast2-transfer yast2-trans-fi yast2-trans-fr yast2-trans-gl 
BuildRequires:  yast2-trans-gu yast2-trans-hi yast2-trans-hr yast2-trans-hu yast2-trans-id yast2-trans-it 
BuildRequires:  yast2-trans-ja yast2-trans-jv yast2-trans-ka yast2-trans-km yast2-trans-ko yast2-trans-lo yast2-trans-lt 
BuildRequires:  yast2-trans-mk yast2-trans-mr yast2-trans-nb yast2-trans-nl yast2-trans-pa yast2-trans-pl yast2-trans-pot 
BuildRequires:  yast2-trans-pt yast2-trans-pt_BR yast2-trans-ro yast2-trans-ru yast2-trans-si yast2-trans-sk yast2-trans-sl 
BuildRequires:  yast2-trans-sr yast2-trans-stats yast2-trans-sv yast2-trans-ta yast2-trans-tr yast2-trans-uk yast2-trans-vi 
BuildRequires:  yast2-trans-wa yast2-trans-xh yast2-trans-zh_CN yast2-trans-zh_TW yast2-trans-zu 
# nothing provides yast2-trans-he 

Source:         yast-help-test.sh
Group:          Dummy
Summary:        YaST help test

%description
Tests if all YaST modules support the help option

QA package for https://bugzilla.novell.com/show_bug.cgi?id=266892



%prep

%build
# /bin/bash yast-help-test.sh
# /bin/bash %{S:0}

for module in `/sbin/yast -l |grep -v "Available modules"` ; do
    echo "=== testing yast $module... ==="
    /usr/lib/YaST2/bin/y2base $module '("help")' ncurses &>/dev/null &
    pid=$!
    sleep 10 && jobs -l |grep -v Done |grep $pid >/dev/null && \
    echo "*** $module still running ***" && \
    failed="$failed#Commandline for $module" && kill $pid && sleep 1 && kill -9 $pid || true
    fg || true # let the backgrounded job fetch its kill signal
done


exit 1

%install

%clean
rm -rf "$RPM_BUILD_ROOT"

%files
openSUSE Build Service is sponsored by