Introduce ci-kdl builder and launcher.

A tool to collect relative changes in some registers of sysfs can be used in
the Mesa jobs to record information while the tests are being executed.

Signed-off-by: Sergi Blanch Torne <sergi.blanch.torne@collabora.com>
Reviewed-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24177>
This commit is contained in:
Sergi Blanch Torne
2023-07-17 08:51:00 +02:00
committed by Marge Bot
parent 95c9d3db32
commit 8a1c95caab
2 changed files with 51 additions and 0 deletions

28
.gitlab-ci/common/kdl.sh Executable file
View File

@@ -0,0 +1,28 @@
#!/usr/bin/env bash
# shellcheck disable=SC1091 # the path is created in build-kdl and
# here is check if exist
terminate() {
echo "ci-kdl.sh caught SIGTERM signal! propagating to child processes"
for job in $(jobs -p)
do
kill -15 "$job"
done
}
trap terminate SIGTERM
if [ -f /ci-kdl.venv/bin/activate ]; then
source /ci-kdl.venv/bin/activate
echo -e "Launch ci-kdl"
/ci-kdl.venv/bin/python /ci-kdl.venv/bin/ci-kdl | tee -a /results/kdl.log &
child=$!
wait $child
ls -l
mv kdl_*.json /results/kdl.json
echo -e "ci-kdl json file moved to /results"
ls -ls /results
else
echo -e "Not possible to activate ci-kdl virtual environment"
fi

View File

@@ -0,0 +1,23 @@
#!/usr/bin/env bash
# shellcheck disable=SC1091 # the path is created by the script
set -ex
KDL_REVISION="5056f71b100a68b72b285c6fc845a66a2ed25985"
git clone \
https://gitlab.freedesktop.org/gfx-ci/ci-kdl.git \
--depth 1 \
ci-kdl.git
pushd ci-kdl.git
git checkout ${KDL_REVISION}
popd
python3 -m venv ci-kdl.venv
source ci-kdl.venv/bin/activate
pushd ci-kdl.git
pip install -r requirements.txt
pip install .
popd
rm -rf ci-kdl.git