ci: Use new arguments to ci-kdl to avoid child management

Instead of using a tee to the log, step the verbosity down - we already
know by this point that it's working pretty well. Passing --output-file
directly also lets us avoid a messy 'mv'.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31110>
This commit is contained in:
Daniel Stone 2024-08-28 17:59:46 +01:00
parent c96ee18086
commit f07bfe0b1d

View file

@ -1,24 +1,18 @@
#!/usr/bin/env bash #!/usr/bin/env bash
# shellcheck disable=SC1091 # the path is created in build-kdl and # shellcheck disable=SC1091 # the path is created in build-kdl and
# here is check if exist # here is check if exist
# shellcheck disable=SC2086 # we want the arguments to be expanded
terminate() { if ! [ -f /ci-kdl/bin/activate ]; then
echo "ci-kdl.sh caught SIGTERM signal! propagating to child processes" echo -e "ci-kdl not installed; not monitoring temperature"
for job in $(jobs -p) exit 0
do
kill -15 "$job"
done
}
trap terminate SIGTERM
if [ -f /ci-kdl/bin/activate ]; then
source /ci-kdl/bin/activate
/ci-kdl/bin/python /ci-kdl/bin/ci-kdl | tee -a "$RESULTS_DIR/kdl.log" &
child=$!
wait $child
mv kdl_*.json "$RESULTS_DIR/kdl.json"
else
echo -e "Not possible to activate ci-kdl virtual environment"
fi fi
KDL_ARGS="
--output-file=${RESULTS_DIR}/kdl.json
--log-level=WARNING
--num-samples=-1
"
source /ci-kdl/bin/activate
exec /ci-kdl/bin/ci-kdl ${KDL_ARGS}