[v3,1/6] ci: check traces validity
Checks
Commit Message
We currently do not validate if generated traces can be parsed by a
tracing tool.
Add some check.
Signed-off-by: David Marchand <david.marchand@redhat.com>
---
Changes since v2:
- added this check, as v2 was breaking CTF metadata content,
---
.ci/linux-build.sh | 10 ++++++++++
.github/workflows/build.yml | 2 +-
2 files changed, 11 insertions(+), 1 deletion(-)
@@ -44,6 +44,14 @@ catch_coredump() {
return 1
}
+check_traces() {
+ which babeltrace >/dev/null || return 0
+ for file in $(sudo find $HOME -name metadata); do
+ ! sudo babeltrace $(dirname $file) >/dev/null 2>&1 || continue
+ sudo babeltrace $(dirname $file)
+ done
+}
+
cross_file=
if [ "$AARCH64" = "true" ]; then
@@ -133,6 +141,7 @@ if [ -z "$cross_file" ]; then
configure_coredump
devtools/test-null.sh || failed="true"
catch_coredump
+ check_traces
[ "$failed" != "true" ]
fi
@@ -173,6 +182,7 @@ if [ "$RUN_TESTS" = "true" ]; then
configure_coredump
sudo meson test -C build --suite fast-tests -t 3 || failed="true"
catch_coredump
+ check_traces
[ "$failed" != "true" ]
fi
@@ -151,7 +151,7 @@ jobs:
run: sudo apt install -y crossbuild-essential-riscv64
- name: Install test tools packages
if: env.AARCH64 != 'true' || env.PPC64LE != 'true' || env.RISCV64 != 'true' || env.RUN_TESTS == 'true'
- run: sudo apt install -y gdb jq
+ run: sudo apt install -y babeltrace gdb jq
- name: Install doc generation packages
if: env.BUILD_DOCS == 'true'
run: sudo apt install -y doxygen graphviz man-db python3-sphinx