mirror of
https://github.com/davatorium/rofi.git
synced 2024-11-18 13:54:36 -05:00
[Test] Remove old broken test scripts.
This commit is contained in:
parent
c64565e877
commit
1050c20c10
26 changed files with 0 additions and 671 deletions
10
Makefile.am
10
Makefile.am
|
@ -579,16 +579,6 @@ TESTS+=theme_parser_test\
|
|||
mode_test
|
||||
endif
|
||||
|
||||
.PHONY: test-x
|
||||
test-x: $(bin_PROGRAMS)
|
||||
MESON_SOURCE_ROOT="$(top_srcdir)" \
|
||||
MESON_BUILD_ROOT="$(top_builddir)" \
|
||||
$(top_srcdir)/test/run_all_tests.sh
|
||||
|
||||
.PHONY: indent
|
||||
indent: $(SOURCES)
|
||||
uncrustify -c $(top_srcdir)/data/uncrustify.cfg --replace $^
|
||||
|
||||
.PHONY: cppcheck
|
||||
cppcheck: $(rofi_SOURCES)
|
||||
cppcheck --std=c99 --platform=unix64 --enable=all -Uerror_dialog --inconclusive -I $(top_srcdir)/include/ $^
|
||||
|
|
14
meson.build
14
meson.build
|
@ -462,20 +462,6 @@ if check.found()
|
|||
endif
|
||||
|
||||
|
||||
run_target('test-x', command: [ 'test/run_all_tests.sh' ], depends: [ rofi ])
|
||||
|
||||
uncrustify = find_program('uncrustify', required: false)
|
||||
if uncrustify.found()
|
||||
run_target('indent',
|
||||
command: [
|
||||
uncrustify,
|
||||
'-c', join_paths(meson.source_root(), 'data', 'uncrustify.cfg'),
|
||||
'--replace',
|
||||
rofi_sources
|
||||
],
|
||||
)
|
||||
endif
|
||||
|
||||
rofi_sources += theme_lexer_sources
|
||||
rofi_sources += theme_parser_sources
|
||||
|
||||
|
|
|
@ -1,15 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
TOP_DIR=$1
|
||||
|
||||
xrdb -retain -load "${TOP_DIR}/doc/old-theme-convert-input.theme"
|
||||
rofi -config "${TOP_DIR}/doc/old-theme-convert-input.theme" -dump-theme | grep -v "Rofi version" > temp.txt
|
||||
|
||||
if ! diff temp.txt "${TOP_DIR}/doc/old-theme-convert-output.rasi" >/dev/null
|
||||
then
|
||||
echo "Convert default theme failed"
|
||||
diff temp.txt "${TOP_DIR}/doc/old-theme-convert-output.rasi"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
exit "${RETV}"
|
|
@ -1,14 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
TOP_DIR=$1
|
||||
|
||||
rofi -no-config -dump-theme | grep -v "Rofi version" > temp.txt
|
||||
|
||||
if ! diff temp.txt "${TOP_DIR}/doc/default_theme.rasi" >/dev/null
|
||||
then
|
||||
echo "Dump default theme does not match."
|
||||
diff temp.txt "${TOP_DIR}/doc/default_theme.rasi"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
exit "${RETV}"
|
|
@ -1,14 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
TOP_DIR=$1
|
||||
|
||||
rofi -h -config "${TOP_DIR}/doc/test_xr.txt" | awk 'BEGIN{ found=1} /^Global options:/{found=0} {if (found) print }' > help-output.txt
|
||||
|
||||
if ! diff help-output.txt "${TOP_DIR}/doc/help-output.txt" >/dev/null
|
||||
then
|
||||
diff help-output.txt "${TOP_DIR}/doc/help-output.txt"
|
||||
echo "Help output does not match."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
exit "${RETV}"
|
|
@ -1,47 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
tests=(
|
||||
run_errormsg_test
|
||||
run_switchdialog_test
|
||||
run_dmenu_test
|
||||
run_run_test
|
||||
run_script_test
|
||||
run_script_meta_test
|
||||
run_issue_256
|
||||
run_issue_275
|
||||
run_dmenu_empty
|
||||
run_dmenu_issue_292
|
||||
run_screenshot_test
|
||||
run_combi_test
|
||||
run_regex_test
|
||||
run_glob_test
|
||||
run_issue333_test
|
||||
help_output_test
|
||||
default_theme_test
|
||||
convert_old_theme_test
|
||||
run_dmenu_normal_window_test
|
||||
run_window_test
|
||||
)
|
||||
|
||||
cd -- "${MESON_BUILD_ROOT}"
|
||||
mkdir -p test-x-logs
|
||||
rm -f core
|
||||
display=200
|
||||
for test in "${tests[@]}"; do
|
||||
log_prefix=test-x-logs/${display}
|
||||
echo -n "Test ${test}: "
|
||||
${MESON_SOURCE_ROOT}/test/run_test.sh ${display} ${log_prefix} ${MESON_SOURCE_ROOT}/test/${test}.sh ${MESON_BUILD_ROOT} ${MESON_SOURCE_ROOT} &> ${log_prefix}-wrapper.log
|
||||
ret=$?
|
||||
if [[ -f core ]]; then
|
||||
echo "COREDUMP"
|
||||
echo "bt" | gdb ./rofi core
|
||||
more ${log_prefix}*.log | cat
|
||||
exit "${ret}"
|
||||
elif [[ ${ret} != 0 ]]; then
|
||||
echo "FAIL"
|
||||
more ${log_prefix}*.log | cat
|
||||
exit "${ret}"
|
||||
fi
|
||||
echo "PASS"
|
||||
display=$(( display + 1 ))
|
||||
done
|
|
@ -1,22 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
rofi -show combi -modi combi -combi-modi run,drun &
|
||||
RPID=$!
|
||||
|
||||
# send enter.
|
||||
sleep 5
|
||||
xdotool key 't'
|
||||
sleep 0.4
|
||||
xdotool key 'r'
|
||||
sleep 0.4
|
||||
xdotool key 'u'
|
||||
sleep 0.4
|
||||
xdotool key 'e'
|
||||
sleep 0.4
|
||||
xdotool key Return
|
||||
|
||||
# Get result, kill xvfb
|
||||
wait "${RPID}"
|
||||
RETV=$?
|
||||
|
||||
exit "${RETV}"
|
|
@ -1,16 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
rofi -dmenu & </dev/null
|
||||
RPID=$!
|
||||
sleep 4
|
||||
xdotool key Return
|
||||
# Get result, kill xvfb
|
||||
wait "${RPID}"
|
||||
RETV=$?
|
||||
|
||||
if [ "${RETV}" -eq 0 ]
|
||||
then
|
||||
exit 0
|
||||
else
|
||||
exit 1
|
||||
fi
|
|
@ -1,48 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# wait till it is up, run rofi with error message
|
||||
sleep 1
|
||||
echo {0..100} | tr " " "\n" | rofi -dmenu -multi-select > output.txt &
|
||||
RPID=$!
|
||||
|
||||
# send enter.
|
||||
sleep 5
|
||||
xdotool key '2'
|
||||
sleep 0.4
|
||||
xdotool key Shift+Return
|
||||
#2
|
||||
xdotool key Shift+Return
|
||||
#20
|
||||
xdotool key Shift+Return
|
||||
#21
|
||||
xdotool key Shift+Return
|
||||
#22
|
||||
xdotool key Shift+Return
|
||||
#23
|
||||
xdotool key Shift+Return
|
||||
#24
|
||||
xdotool key Shift+Return
|
||||
#25
|
||||
xdotool key Shift+Return
|
||||
#26
|
||||
xdotool key Shift+Return
|
||||
#27
|
||||
xdotool key Shift+Return
|
||||
#28
|
||||
xdotool key Shift+Return
|
||||
#29
|
||||
xdotool key Shift+Return
|
||||
#32
|
||||
xdotool key Return
|
||||
|
||||
# Get result, kill xvfb
|
||||
wait "${RPID}"
|
||||
RETV=$?
|
||||
OUTPUT=$(tr '\n' ' ' < output.txt)
|
||||
if [ "${OUTPUT}" != '2 12 20 21 22 23 24 25 26 27 28 29 ' ]
|
||||
then
|
||||
echo "Got: '${OUTPUT}' expected '2 12 20 21 22 23 24 25 26 27 28 29 '"
|
||||
exit 1
|
||||
fi
|
||||
echo "${RETV}"
|
||||
exit "${RETV}"
|
|
@ -1,34 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# wait till it is up, run rofi with error message
|
||||
sleep 1
|
||||
ulimit -c unlimited
|
||||
echo -e -n "aap\nnoot\nmies" | rofi -dmenu -normal-window -multi-select > output.txt &
|
||||
RPID=$!
|
||||
sleep 4
|
||||
xdotool getactivewindow windowsize 100% 100%
|
||||
echo "Window resized"
|
||||
# send enter.
|
||||
sleep 1
|
||||
xdotool key 'Down'
|
||||
sleep 0.4
|
||||
xdotool key Shift+Return
|
||||
xdotool key Shift+Return
|
||||
xdotool key Return
|
||||
|
||||
# Get result, kill xvfb
|
||||
wait "${RPID}"
|
||||
RETV=$?
|
||||
if [ "${RETV}" == "139" ]
|
||||
then
|
||||
echo "thread apply all bt" | gdb rofi core.*
|
||||
fi
|
||||
|
||||
OUTPUT=$( tr '\n' ' ' < output.txt )
|
||||
if [ "${OUTPUT}" != 'noot mies ' ]
|
||||
then
|
||||
echo "Got: '${OUTPUT}' expected 'noot mies '"
|
||||
exit 1
|
||||
fi
|
||||
echo "${RETV}"
|
||||
exit "${RETV}"
|
|
@ -1,26 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# wait till it is up, run rofi with error message
|
||||
sleep 1
|
||||
echo -e -n "aap\nnoot\nmies" | rofi -dmenu -multi-select > output.txt &
|
||||
RPID=$!
|
||||
|
||||
# send enter.
|
||||
sleep 5
|
||||
xdotool key 'Down'
|
||||
sleep 0.4
|
||||
xdotool key Shift+Return
|
||||
xdotool key Shift+Return
|
||||
xdotool key Return
|
||||
|
||||
# Get result, kill xvfb
|
||||
wait "${RPID}"
|
||||
RETV=$?
|
||||
OUTPUT=$( tr '\n' ' ' < output.txt )
|
||||
if [ "${OUTPUT}" != 'noot mies ' ]
|
||||
then
|
||||
echo "Got: '${OUTPUT}' expected 'noot mies '"
|
||||
exit 1
|
||||
fi
|
||||
echo "${RETV}"
|
||||
exit "${RETV}"
|
|
@ -1,22 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
rofi -show drun -modi drun &
|
||||
RPID=$!
|
||||
|
||||
# send enter.
|
||||
sleep 5
|
||||
xdotool key 't'
|
||||
sleep 0.4
|
||||
xdotool key 'r'
|
||||
sleep 0.4
|
||||
xdotool key 'u'
|
||||
sleep 0.4
|
||||
xdotool key 'e'
|
||||
sleep 0.4
|
||||
xdotool key Return
|
||||
|
||||
# Get result, kill xvfb
|
||||
wait "${RPID}"
|
||||
RETV=$?
|
||||
|
||||
exit "${RETV}"
|
|
@ -1,13 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# wait till it is up, run rofi with error message
|
||||
sleep 1 && rofi -e "Printing error message" &
|
||||
RPID=$!
|
||||
|
||||
# send enter.
|
||||
sleep 5 && xdotool key Return
|
||||
|
||||
# Get result, kill xvfb
|
||||
wait "${RPID}"
|
||||
RETV=$?
|
||||
exit "${RETV}"
|
|
@ -1,26 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
echo -en "nooty\naap\nnoot\nmies" | rofi -matching glob -dmenu > output.txt &
|
||||
RPID=$!
|
||||
|
||||
# send enter.
|
||||
sleep 5
|
||||
xdotool key 'n'
|
||||
sleep 0.4
|
||||
xdotool key Shift+'8'
|
||||
sleep 0.4
|
||||
xdotool key 't'
|
||||
sleep 0.4
|
||||
xdotool key Return
|
||||
|
||||
# Get result, kill xvfb
|
||||
wait "${RPID}"
|
||||
RETV=$?
|
||||
OUTPUT=$(cat output.txt)
|
||||
if [ "${OUTPUT}" != 'nooty' ]
|
||||
then
|
||||
echo "Got: '${OUTPUT}' expected 'nooty'"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
exit "${RETV}"
|
|
@ -1,33 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# wait till it is up, run rofi with error message
|
||||
rm -f output.txt
|
||||
sleep 1
|
||||
echo -e -n "aap\nnoot\nmies" | rofi -dmenu -no-custom -kb-custom-1 F5 -kb-move-front "" -kb-custom-2 "Control+a" > output.txt &
|
||||
RPID=$!
|
||||
|
||||
# send enter.
|
||||
sleep 5
|
||||
xdotool key 'q'
|
||||
sleep 0.4
|
||||
xdotool key Return
|
||||
sleep 0.4
|
||||
xdotool key F5
|
||||
sleep 0.4
|
||||
xdotool key "Control+a"
|
||||
sleep 0.4
|
||||
xdotool key Escape
|
||||
|
||||
# Get result, kill xvfb
|
||||
wait "${RPID}"
|
||||
RETV=$?
|
||||
OUTPUT=$(tr '\n' ' ' < output.txt)
|
||||
if [ "${OUTPUT}" != '' ]
|
||||
then
|
||||
echo "Got: '${OUTPUT}' expected nothing"
|
||||
exit 1
|
||||
fi
|
||||
if [ "${RETV}" != 1 ]
|
||||
then
|
||||
exit 1
|
||||
fi
|
|
@ -1,22 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
rofi -show window -modi window &
|
||||
RPID=$!
|
||||
|
||||
# send enter.
|
||||
sleep 5
|
||||
xdotool key 't'
|
||||
sleep 0.4
|
||||
xdotool key 'r'
|
||||
sleep 0.4
|
||||
xdotool key 'u'
|
||||
sleep 0.4
|
||||
xdotool key 'e'
|
||||
sleep 0.4
|
||||
xdotool key Return
|
||||
|
||||
# Get result, kill xvfb
|
||||
wait "${RPID}"
|
||||
RETV=$?
|
||||
|
||||
exit "${RETV}"
|
|
@ -1,24 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
echo -e "aap\nnoot\nmies" | rofi -dmenu &
|
||||
RPID=$!
|
||||
|
||||
# send enter.
|
||||
sleep 5
|
||||
xdotool key 't'
|
||||
sleep 0.4
|
||||
xdotool key 'r'
|
||||
sleep 0.4
|
||||
xdotool key 'u'
|
||||
sleep 0.4
|
||||
xdotool key 'e'
|
||||
sleep 0.4
|
||||
xdotool key End
|
||||
sleep 0.4
|
||||
xdotool key Return
|
||||
|
||||
# Get result, kill xvfb
|
||||
wait "${RPID}"
|
||||
RETV=$?
|
||||
|
||||
exit "${RETV}"
|
|
@ -1,32 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
echo -en "nooty\naap\nnoot\nmies" | rofi -matching regex -dmenu > output.txt &
|
||||
RPID=$!
|
||||
|
||||
# send enter.
|
||||
sleep 5
|
||||
xdotool key Shift+'6'
|
||||
sleep 0.4
|
||||
xdotool key 'n'
|
||||
sleep 0.4
|
||||
xdotool key 'o'
|
||||
sleep 0.4
|
||||
xdotool key 'o'
|
||||
sleep 0.4
|
||||
xdotool key 't'
|
||||
sleep 0.4
|
||||
xdotool key Shift+'4'
|
||||
sleep 0.4
|
||||
xdotool key Return
|
||||
|
||||
# Get result, kill xvfb
|
||||
wait "${RPID}"
|
||||
RETV=$?
|
||||
OUTPUT=$(cat output.txt)
|
||||
if [ "${OUTPUT}" != 'noot' ]
|
||||
then
|
||||
echo "Got: '${OUTPUT}' expected 'noot'"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
exit "${RETV}"
|
|
@ -1,22 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
rofi -show run &
|
||||
RPID=$!
|
||||
|
||||
# send enter.
|
||||
sleep 5
|
||||
xdotool key 't'
|
||||
sleep 0.4
|
||||
xdotool key 'r'
|
||||
sleep 0.4
|
||||
xdotool key 'u'
|
||||
sleep 0.4
|
||||
xdotool key 'e'
|
||||
sleep 0.4
|
||||
xdotool key Return
|
||||
|
||||
# Get result, kill xvfb
|
||||
wait "${RPID}"
|
||||
RETV=$?
|
||||
|
||||
exit "${RETV}"
|
|
@ -1,28 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
export ROFI_PNG_OUTPUT=out.png
|
||||
rofi -show run &
|
||||
RPID=$!
|
||||
|
||||
# send enter.
|
||||
sleep 5
|
||||
xdotool key 't'
|
||||
sleep 0.4
|
||||
xdotool key 'r'
|
||||
sleep 0.4
|
||||
xdotool key 'u'
|
||||
sleep 0.4
|
||||
xdotool key Alt+Shift+s
|
||||
sleep 0.4
|
||||
xdotool key Return
|
||||
|
||||
# Get result, kill xvfb
|
||||
wait "${RPID}"
|
||||
RETV=$?
|
||||
|
||||
if [ ! -f out.png ]
|
||||
then
|
||||
echo "Failed to create screenshot"
|
||||
exit 1
|
||||
fi
|
||||
exit "${RETV}"
|
|
@ -1,26 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
SP=$(readlink -f "$0")
|
||||
DIR=$(dirname "$SP")
|
||||
echo "$DIR/test_script.sh"
|
||||
# wait till it is up, run rofi with error message
|
||||
sleep 1
|
||||
rofi -modi "custom:$DIR/test_script.sh" -show custom &
|
||||
RPID=$!
|
||||
|
||||
# send enter.
|
||||
sleep 5
|
||||
xdotool key 'z'
|
||||
sleep 0.4
|
||||
xdotool key Return
|
||||
|
||||
# Get result, kill xvfb
|
||||
wait "${RPID}"
|
||||
RETV=$?
|
||||
OUTPUT=$( tr '\n' ' ' < output.txt )
|
||||
echo "${OUTPUT}"
|
||||
if [ "${OUTPUT}" != 'mies ' ]
|
||||
then
|
||||
exit 1
|
||||
fi
|
||||
exit "${RETV}"
|
|
@ -1,26 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
SP=$(readlink -f "$0")
|
||||
DIR=$(dirname "$SP")
|
||||
echo "$DIR/test_script.sh"
|
||||
# wait till it is up, run rofi with error message
|
||||
sleep 1
|
||||
rofi -modi "custom:$DIR/test_script.sh" -show custom &
|
||||
RPID=$!
|
||||
|
||||
# send enter.
|
||||
sleep 5
|
||||
xdotool key 'Down'
|
||||
sleep 0.4
|
||||
xdotool key Return
|
||||
|
||||
# Get result, kill xvfb
|
||||
wait "${RPID}"
|
||||
RETV=$?
|
||||
OUTPUT=$( tr '\n' ' ' < output.txt )
|
||||
echo "${OUTPUT}"
|
||||
if [ "${OUTPUT}" != 'noot ' ]
|
||||
then
|
||||
exit 1
|
||||
fi
|
||||
exit "${RETV}"
|
|
@ -1,23 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# wait till it is up, run rofi with error message
|
||||
sleep 1 && rofi -show run -modi run &
|
||||
RPID=$!
|
||||
|
||||
# send enter.
|
||||
sleep 5
|
||||
xdotool key 'shift+slash'
|
||||
sleep 0.4
|
||||
xdotool key 'shift+slash'
|
||||
sleep 0.4
|
||||
xdotool key 'shift+slash'
|
||||
sleep 0.4
|
||||
xdotool key Escape
|
||||
|
||||
# Get result, kill xvfb
|
||||
wait "${RPID}"
|
||||
RETV=$?
|
||||
|
||||
sleep 1
|
||||
|
||||
exit "${RETV}"
|
|
@ -1,58 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
XPID=
|
||||
FPID=
|
||||
create_fake_x()
|
||||
{
|
||||
export DISPLAY=":$1"
|
||||
echo -n "Starting fake X for display ${DISPLAY}: "
|
||||
Xvfb -nolisten tcp +extension XINERAMA +xinerama -screen 0 1280x1024x24 "${DISPLAY}" &>$2-server.log &
|
||||
XPID=$!
|
||||
echo "pid ${XPID}"
|
||||
sleep 1
|
||||
if [ -x "$(which fluxbox 2>/dev/null)" ]; then
|
||||
echo -n "Starting fluxbox for display ${DISPLAY}: "
|
||||
timeout -k 30s 30s fluxbox &>$2-fluxbox.log &
|
||||
FPID=$!
|
||||
echo "pid ${FPID}"
|
||||
sleep 1
|
||||
fi
|
||||
}
|
||||
|
||||
destroy_fake_x()
|
||||
{
|
||||
if [ -n "${XPID}" ]
|
||||
then
|
||||
if [ -n "${FPID}" ]; then
|
||||
echo -n "Stopping fluxbox for display ${DISPLAY} (pid ${FPID}): "
|
||||
if kill "${FPID}" &>$1-kill-fluxbox.log; then
|
||||
echo -n " killed... "
|
||||
wait "${FPID}" &>$1-wait-fluxbox.log
|
||||
echo "stopped"
|
||||
else
|
||||
echo -n " failed to kill"
|
||||
fi
|
||||
fi
|
||||
echo -n "Stopping fake X for display ${DISPLAY} (pid ${XPID}): "
|
||||
if kill "${XPID}" &>$1-kill-X.log; then
|
||||
echo -n " killed... "
|
||||
wait "${XPID}" &>$1-wait-X.log
|
||||
echo "stopped"
|
||||
else
|
||||
echo -n " failed to kill"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
if [ -n "$4" ]
|
||||
then
|
||||
export PATH=$4:$PATH
|
||||
fi
|
||||
|
||||
create_fake_x "$1" "$2"
|
||||
"$3" "$5" &> "$2-test.log"
|
||||
RES=$?
|
||||
|
||||
destroy_fake_x "$2"
|
||||
|
||||
exit "${RES}"
|
|
@ -1,46 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# wait till it is up, run rofi with error message
|
||||
sleep 1
|
||||
xterm -T MonkeySee sh &
|
||||
XPID=$!
|
||||
echo "Started MonkeySee xterm: pid ${XPID}"
|
||||
sleep 1
|
||||
xterm -T TermUnwanted sh &
|
||||
TPID=$!
|
||||
echo "Started TermUnwanted xterm: pid ${TPID}"
|
||||
sleep 1
|
||||
rofi -modi window -show window > output.txt &
|
||||
RPID=$!
|
||||
echo "Started rofi: pid ${RPID}"
|
||||
|
||||
# send enter.
|
||||
sleep 5
|
||||
xdotool type 'MonkeySee'
|
||||
sleep 0.4
|
||||
xdotool key Return
|
||||
sleep 1
|
||||
xdotool key Ctrl+d
|
||||
sleep 1
|
||||
|
||||
echo -n "Killing TermUnwanted: "
|
||||
if kill "${TPID}"; then
|
||||
echo "done"
|
||||
wait "${TPID}"
|
||||
fi
|
||||
|
||||
if ps -q "${XPID}" # pgrep -u $USER xterm
|
||||
then
|
||||
echo "Found remaining xterms: $(pgrep -u "$USER" xterm)"
|
||||
kill "${XPID}"
|
||||
fi
|
||||
if ps -q "${RPID}"
|
||||
then
|
||||
echo "Rofi still running"
|
||||
kill "${RPID}"
|
||||
exit 1
|
||||
fi
|
||||
# Get result, kill xvfb
|
||||
wait "${RPID}"
|
||||
RETV=$?
|
||||
exit "${RETV}"
|
|
@ -1,10 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
if [ -z "$1" ]
|
||||
then
|
||||
echo "aap"
|
||||
echo "noot"
|
||||
echo -ne "mies\0meta\x1fzoom\n"
|
||||
else
|
||||
echo "$1" > output.txt
|
||||
fi
|
Loading…
Reference in a new issue