diff --git a/Sanity/smoke-test-for-all-binaries/runtest.sh b/Sanity/smoke-test-for-all-binaries/runtest.sh index 81ac2f3..34f3005 100755 --- a/Sanity/smoke-test-for-all-binaries/runtest.sh +++ b/Sanity/smoke-test-for-all-binaries/runtest.sh @@ -58,7 +58,11 @@ rlJournalStart rlPhaseEnd rlPhaseStartTest "Non-interactive HPLIP tools without GUI" - rlRun "dnf -y remove hplip-gui" + if rlIsRHELLike '<9' || rlIsFedora + then + rlRun "dnf -y remove hplip-gui" + fi + touch /tmp/log_file-i-nogui for i in $(rpm -ql hplip | grep /usr/bin | grep -v 'hp-setup\|hp-probe\|hp-fab\|hp-plugin\|hpijs') do @@ -90,7 +94,11 @@ rlJournalStart rlPhaseEnd rlPhaseStartTest "Non-interactive HPLIP tools with GUI installed, but enforce interactive" - rlRun "dnf -y install hplip-gui" + if rlIsRHELLike '<9' || rlIsFedora + then + rlRun "dnf -y install hplip-gui" + fi + touch /tmp/log_file-i-gui for i in $(rpm -ql hplip | grep /usr/bin | grep -v 'hp-setup\|hp-probe\|hp-fab\|hp-plugin\|hpijs') do @@ -114,36 +122,41 @@ rlJournalStart rlPhaseEnd rlPhaseStartTest "HPLIP with GUI support" - rlLog "1. running all hplip and hplip-gui binnary in xvfb-run as ROOT logged in /tmp/a1" - for i in `rpm -ql hplip hplip-gui| grep bin| grep -v 'systray\|hp-probe\|hp-plugin'`;do - rm -rf /tmp/a - echo "========================================" - echo " $i " - timeout --preserve-status 20 xvfb-run $i -u &>/tmp/a - head -n10 /tmp/a - echo "... snip ..." - tail -n10 /tmp/a - done &> /tmp/root_output - - rlAssertNotGrep "Traceback (most recent call last)" /tmp/root_output - if grep SyntaxWarning /tmp/root_output + if rlIsRHELLike '<9' || rlIsFedora then - rlLogWarning "There are Python SyntaxWarnings in output..." - fi + rlLog "1. running all hplip and hplip-gui binnary in xvfb-run as ROOT logged in /tmp/a1" + for i in `rpm -ql hplip hplip-gui| grep bin| grep -v 'systray\|hp-probe\|hp-plugin'`;do + rm -rf /tmp/a + echo "========================================" + echo " $i " + timeout --preserve-status 20 xvfb-run $i -u &>/tmp/a + head -n10 /tmp/a + echo "... snip ..." + tail -n10 /tmp/a + done &> /tmp/root_output - rlLog "2. running all hplip and hplip-gui binnary in xvfb-run as user $username logged in /tmp/a2" + rlAssertNotGrep "Traceback (most recent call last)" /tmp/root_output + if grep SyntaxWarning /tmp/root_output + then + rlLogWarning "There are Python SyntaxWarnings in output..." + fi + + rlLog "2. running all hplip and hplip-gui binnary in xvfb-run as user $username logged in /tmp/a2" - sudo -u $username -- bash -c 'for i in `rpm -ql hplip hplip-gui| grep bin| grep -v systray`;do rm -rf /tmp/b;echo "========================================";echo " $i " ; timeout --preserve-status 20 xvfb-run $i -u &>/tmp/b ; head -n10 /tmp/b;echo "... snip ...";tail -n10 /tmp/b; done' &>/tmp/user_output - rlLog "abrt should check possible failures during previous two command ^^^^" + sudo -u $username -- bash -c 'for i in `rpm -ql hplip hplip-gui| grep bin| grep -v systray`;do rm -rf /tmp/b;echo "========================================";echo " $i " ; timeout --preserve-status 20 xvfb-run $i -u &>/tmp/b ; head -n10 /tmp/b;echo "... snip ...";tail -n10 /tmp/b; done' &>/tmp/user_output + rlLog "abrt should check possible failures during previous two command ^^^^" - rlAssertNotGrep "Traceback (most recent call last)" /tmp/user_output - if grep SyntaxWarning /tmp/user_output - then - rlLogWarning "There are Python SyntaxWarnings in output..." + rlAssertNotGrep "Traceback (most recent call last)" /tmp/user_output + if grep SyntaxWarning /tmp/user_output + then + rlLogWarning "There are Python SyntaxWarnings in output..." + fi + + rlRun "/usr/bin/hp-clean --help" + rlRun "/usr/bin/hp-clean --help | grep 'See Also'" + else + rlPass "There is no GUI support in RHEL 9+." fi - - rlRun "/usr/bin/hp-clean --help" - rlRun "/usr/bin/hp-clean --help | grep 'See Also'" rlPhaseEnd rlPhaseStartCleanup