Update CI tests
This commit is contained in:
parent
7362b821b4
commit
276e8071bf
@ -3,7 +3,7 @@
|
||||
|
||||
Name: ibus-hangul
|
||||
Version: 1.5.5
|
||||
Release: 7%{?dist}
|
||||
Release: 8%{?dist}
|
||||
Summary: The Hangul engine for IBus input platform
|
||||
License: GPL-2.0-or-later
|
||||
URL: https://github.com/libhangul/ibus-hangul
|
||||
@ -87,6 +87,10 @@ make check \
|
||||
%{_datadir}/installed-tests/ibus-hangul
|
||||
|
||||
%changelog
|
||||
* Mon Dec 9 2024 Peng Wu <pwu@redhat.com> - 1.5.5-8
|
||||
- Update CI tests
|
||||
- Resolves: RHEL-70370
|
||||
|
||||
* Tue Oct 29 2024 Troy Dawson <tdawson@redhat.com> - 1.5.5-7
|
||||
- Bump release for October 2024 mass rebuild:
|
||||
Resolves: RHEL-64018
|
||||
|
@ -24,7 +24,8 @@ require:
|
||||
- ibus-hangul
|
||||
- ibus-hangul-tests
|
||||
- rsync
|
||||
- xorg-x11-server-Xvfb
|
||||
- xorg-x11-server-Xwayland
|
||||
- xwayland-run
|
||||
- appstream
|
||||
- libappstream-glib
|
||||
- desktop-file-utils
|
||||
@ -36,4 +37,3 @@ require:
|
||||
- dbus-x11
|
||||
- python3-devel
|
||||
- python3-pyxdg
|
||||
- xorg-x11-server-Xvfb
|
||||
|
@ -2,6 +2,7 @@
|
||||
. /usr/share/beakerlib/beakerlib.sh || exit 1
|
||||
|
||||
NAME=ibus-hangul
|
||||
XFWB_SCRIPT=$(pwd)/xwfb-script.sh
|
||||
|
||||
rlJournalStart
|
||||
rlPhaseStartSetup
|
||||
@ -14,23 +15,25 @@ rlJournalStart
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartTest
|
||||
rlRun "ibus-desktop-testing-runner \
|
||||
--no-graphics \
|
||||
--runner=gnome \
|
||||
--timeout=1500 \
|
||||
--tests=${NAME} \
|
||||
--output=${NAME}.log \
|
||||
--result=test.log \
|
||||
" 0 "Running ${NAME} tests"
|
||||
echo "==== ${NAME}.log: ===="
|
||||
cat ${NAME}.log
|
||||
echo "==== EOF ${NAME}.log: ===="
|
||||
echo "==== test.log ===="
|
||||
cat test.log
|
||||
echo "==== EOF test.log: ===="
|
||||
rlAssertNotGrep FAIL test.log
|
||||
rlFileSubmit ${NAME}.log
|
||||
rlFileSubmit test.log
|
||||
rlRun -t -l "pushd /usr/libexec/installed-tests/ibus-hangul" \
|
||||
0 "Change to directory of installed tests"
|
||||
if [ -z "${DISPLAY:-}" ]; then
|
||||
rlLogInfo "DISPLAY is empty or unset."
|
||||
rlLogInfo "Therefore, use xfwb-run to run the graphical ibus-hangul test:"
|
||||
rlRun -t -s "xwfb-run -c mutter -e $tmp/xwfb-run.log -n 99 $XFWB_SCRIPT" \
|
||||
0 "Running ibus-hangul test in xfwb-run"
|
||||
echo "==== START of `cat ${rlRun_LOG}`: log of xwfb-run ===="
|
||||
cat ${rlRun_LOG}
|
||||
echo "==== END of `cat ${rlRun_LOG}`: log of xwfb-run ===="
|
||||
rlAssertNotGrep FAIL ${rlRun_LOG}
|
||||
rlGetTestState
|
||||
rlLog "Total number of failed asserts: ${ECODE}"
|
||||
rlFileSubmit ${rlRun_LOG}
|
||||
rlFileSubmit xwfb-run.log
|
||||
fi
|
||||
rlGetTestState
|
||||
rlLog "Total number of failed asserts: ${ECODE}"
|
||||
rlRun "popd" 0
|
||||
rlPhaseEnd
|
||||
|
||||
rlPhaseStartCleanup
|
||||
|
31
tests/xwfb-script.sh
Executable file
31
tests/xwfb-script.sh
Executable file
@ -0,0 +1,31 @@
|
||||
#!/bin/bash
|
||||
# Run this with `xwfb-run -e /tmp/xwfb-run.log -n 99 xwfb-script.sh`
|
||||
|
||||
# Redirect stderr to stdout:
|
||||
exec 2>&1
|
||||
# without setting GDK_BACKEND=x11, Gtk programs cannot open windows in xfwb-run:
|
||||
export GDK_BACKEND=x11
|
||||
export XDG_SESSION_TYPE=x11
|
||||
echo "starting mutter ..."
|
||||
mutter --x11 &
|
||||
sleep 5
|
||||
echo "mutter started"
|
||||
ibus-daemon --verbose \
|
||||
--replace \
|
||||
--single \
|
||||
--desktop=mutter \
|
||||
--panel=disable \
|
||||
--config=disable &
|
||||
sleep 5
|
||||
echo "ibus-daemon started."
|
||||
/usr/libexec/installed-tests/ibus-hangul/ibus-hangul --tap &
|
||||
TEST_PID=$!
|
||||
# A screenshot for debugging can be made here:
|
||||
#sleep 1
|
||||
#import -window root /tmp/screenshot.png
|
||||
#echo "screenshot done."
|
||||
# Wait for ibus-hangul tests to finish and get its exit code
|
||||
wait $TEST_PID
|
||||
EXIT_CODE=$?
|
||||
echo "The exit code of ibus-hangul: $EXIT_CODE"
|
||||
exit $EXIT_CODE
|
Loading…
Reference in New Issue
Block a user