diff options
author | Stefano Brivio <sbrivio@redhat.com> | 2022-02-22 18:29:45 +0100 |
---|---|---|
committer | Stefano Brivio <sbrivio@redhat.com> | 2022-02-22 18:36:24 +0100 |
commit | 337f55166f6db7ee3f6e6e253ce786b3b6606216 (patch) | |
tree | 6f6c02ed1cae7a5130789497438b98b5332c8a74 /test/lib/term | |
parent | be2a7898e9de236da7c42d1fb37a5a2017ac192b (diff) | |
download | passt-337f55166f6db7ee3f6e6e253ce786b3b6606216.tar passt-337f55166f6db7ee3f6e6e253ce786b3b6606216.tar.gz passt-337f55166f6db7ee3f6e6e253ce786b3b6606216.tar.bz2 passt-337f55166f6db7ee3f6e6e253ce786b3b6606216.tar.lz passt-337f55166f6db7ee3f6e6e253ce786b3b6606216.tar.xz passt-337f55166f6db7ee3f6e6e253ce786b3b6606216.tar.zst passt-337f55166f6db7ee3f6e6e253ce786b3b6606216.zip |
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 <sbrivio@redhat.com>
Diffstat (limited to 'test/lib/term')
-rwxr-xr-x | test/lib/term | 27 |
1 files changed, 8 insertions, 19 deletions
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 } |