foot/pgo/full-inner.sh
Daniel Eklöf a9fc7ce180
pgo: run xtgettcap without any arguments
We execute xtgettcap in the parent terminal. Thus we don’t know if it
implements XTGETTCAP, and thus it’s not guaranteed to exit - it may
hang indefinitely waiting for a reply.

Fix by not actually quering anything.
2022-10-10 17:18:04 +02:00

32 lines
668 B
Bash
Executable file

#!/bin/sh
set -eux
srcdir=$(realpath "${1}")
blddir=$(realpath "${2}")
. "${srcdir}"/pgo/options
pgo_data=$(mktemp)
trap "rm -f '${pgo_data}'" EXIT INT HUP TERM
rm -f "${blddir}"/pgo-ok
# To ensure profiling data is generated in the build directory
cd "${blddir}"
"${blddir}"/utils/xtgettcap
"${blddir}"/footclient --version
"${blddir}"/foot \
--config=/dev/null \
--override tweak.grapheme-shaping=no \
--term=xterm \
sh -c "
set -eux
'${srcdir}/scripts/generate-alt-random-writes.py' \
${script_options} \"${pgo_data}\"
cat \"${pgo_data}\"
"
touch "${blddir}"/pgo-ok