From 337f55166f6db7ee3f6e6e253ce786b3b6606216 Mon Sep 17 00:00:00 2001 From: Stefano Brivio Date: Tue, 22 Feb 2022 18:29:45 +0100 Subject: demo, ci: Switch to asciinema(1) for terminal recordings For demos, cool-retro-term(1) looked fancier, but several threads of that and ffmpeg(1) are just messing up with performance testing. The CI videos started getting really big as well, and they were difficult to read. Signed-off-by: Stefano Brivio --- test/lib/term | 27 ++++++++------------------- 1 file changed, 8 insertions(+), 19 deletions(-) (limited to 'test/lib/term') diff --git a/test/lib/term b/test/lib/term index e8a1d38..205a6a9 100755 --- a/test/lib/term +++ b/test/lib/term @@ -539,33 +539,22 @@ pause_continue() { info_nolog "" } -# run_term() - Start tmux session, X terminal if requested, running entry point +# run_term() - Start tmux session, running entry point, with recording if needed run_term() { export SHELL="/bin/sh" tmux set-option -g default-shell "/bin/sh" tmux set-option -g update-environment "PCAP DEBUG" if [ ${CI} -eq 1 ]; then - __xterm_done="$(mktemp)" - if [ ${XVFB} -eq 1 ]; then - xvfb-run -s "-screen 0 4000x4000x24 -ac" ${CI_XTERM} "$(pwd)" -e "sh -c \"printf '\e[8;50;240t'; tmux new-session -s passt_test ./ci from_term; echo >${__xterm_done}\"" - else - ${CI_XTERM} "$(pwd)" -e "sh -c \"printf '\e[8;50;240t'; tmux new-session -s passt_test ./ci from_term; echo >${__xterm_done}\"" - fi - while ! [ -s "${__xterm_done}" ]; do sleep 1; done - rm "${__xterm_done}" + printf '\e[8;50;240t' + asciinema rec --overwrite ci.uncut -c 'tmux new-session -s passt_test ./ci from_term' + video_postprocess ci.uncut elif [ ${DEMO} -eq 1 ]; then - while true; do - if [ ${XVFB} -eq 1 ]; then - xvfb-run -s "-screen 0 4000x4000x24 -ac" ${DEMO_XTERM} "$(pwd)" -e sh -c 'tmux new-session -s passt_test ./run_demo from_term' - else - ${DEMO_XTERM} "$(pwd)" -e sh -c 'tmux new-session -s passt_test ./run_demo from_term' - fi - [ $? -ne 0 ] && { tmux kill-session -t passt_test; continue; } - break - done + printf '\e[8;40;130t' + asciinema rec --overwrite demo.uncut -c 'tmux new-session -s passt_test ./run_demo from_term' + video_postprocess demo.uncut else - tmux new-session -s passt_test ./run from_term + tmux new-session -s passt_test ./run_demo from_term fi } -- cgit v1.2.3