Resolves: RHEL-25202 - Update tests

This commit is contained in:
Jitka Plesnikova 2024-03-21 12:28:53 +01:00
parent bd5e2052a7
commit 1406de5dcf
3 changed files with 9 additions and 19 deletions

View File

@ -2,38 +2,28 @@
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
. /usr/share/beakerlib/beakerlib.sh || exit 1
SLEEP_TIME="5"
rlJournalStart
rlPhaseStartSetup
rlRun "tmp=\$(mktemp -d)" 0 "Create tmp directory"
rlRun "cp tk-test.sh tk-test.pl $tmp"
rlRun "pushd $tmp"
rlVirtualXStart "tk"
export DISPLAY="$( rlVirtualXGetDisplay \"tk\" )"
rlPhaseEnd
rlPhaseStartTest
# Get output from tcl/Tk test script
rlVirtualXStart "tk1"
export DISPLAY="$( rlVirtualXGetDisplay \"tk1\" )"
rlRun "./tk-test.sh > tcl-output.log &" 0 "Running tcl/Tk test script'"
PS_TK1="$!"
rlRun "sleep $SLEEP_TIME" 0 "Sleeping for $SLEEP_TIME s"
rlRun "kill -9 $PS_TK1" 0,1 "Killing Tk"
rlVirtualXStop "tk1"
rlRun "./tk-test.sh > tcl-output.log" 0 "Running tcl/Tk test script'"
# Get output from perl-Tk test script
rlVirtualXStart "tk2"
export DISPLAY="$( rlVirtualXGetDisplay \"tk2\" )"
rlRun "./tk-test.pl > perl-output.log &" 0 "Running perl-Tk test script'"
PS_TK2="$!"
rlRun "sleep $SLEEP_TIME" 0 "Sleeping for $SLEEP_TIME s"
rlRun "kill -9 $PS_TK2" 0,1 "Killing Tk"
rlVirtualXStop "tk2"
rlRun "./tk-test.pl > perl-output.log" 0 "Running perl-Tk test script'"
# Compare outputs
rlAssertNotDiffer "tcl-output.log" "perl-output.log"
rlPhaseEnd
rlPhaseStartCleanup
rlVirtualXStop "tk"
rlRun "popd"
rlRun "rm -r $tmp" 0 "Remove tmp directory"
rlPhaseEnd

View File

@ -3,4 +3,4 @@ use Tk;
my $mw = MainWindow->new;
foreach my $font (sort $mw->fontFamilies)
{ print "$font\n"; }
exit;

View File

@ -3,4 +3,4 @@ package require Tk
foreach font [lsort [font families]] {
puts $font
}
exit