diff --git a/core/test.py b/core/test.py index f56582e9..3785a511 100644 --- a/core/test.py +++ b/core/test.py @@ -130,6 +130,13 @@ def _exec_run(self, tree, thing, result_dir): if hasattr(thing, 'first_in_series'): env["FIRST_IN_SERIES"] = str(int(thing.first_in_series)) + if hasattr(thing, 'pw_series'): + pw_series = thing.pw_series + if pw_series['cover_letter']: + env["MSGID"] = str(pw_series['cover_letter']['msgid']) + elif pw_series['patches']: + env["MSGID"] = str(pw_series['patches'][0]['msgid']) + out, err = CMD.cmd_run(self.info["run"], include_stderr=True, cwd=tree.path, pass_fds=[wfd], add_env=env) except core.cmd.CmdError as e: diff --git a/docker/build/Dockerfile b/docker/build/Dockerfile index 20a0a58b..684182e2 100644 --- a/docker/build/Dockerfile +++ b/docker/build/Dockerfile @@ -7,7 +7,7 @@ LABEL name=nipa-build RUN sudo dnf install -y \ clang llvm lld \ - ruff pylint yamllint jsonschema shellcheck \ + b4 ruff pylint yamllint jsonschema shellcheck \ dwarves libasan libasan-static glibc-devel.i686 \ rustc \ perl-Git lei \ diff --git a/tests/series/diff/diff.sh b/tests/series/diff/diff.sh new file mode 100755 index 00000000..33901f04 --- /dev/null +++ b/tests/series/diff/diff.sh @@ -0,0 +1,20 @@ +#!/bin/bash +# SPDX-License-Identifier: GPL-2.0 +# +# Copyright (c) 2026 Matthieu Baerts + +if [ -z "${MSGID}" ]; then + echo "MSGID not set" >&"${DESC_FD}" + exit 0 +fi + +OUT="${RESULTS_DIR}/b4-diff.ansi" + +# ignore errors, we just want to see the diff if available +b4 diff --color --output-diff "${OUT}" "${MSGID}" || true + +if [ -s "${OUT}" ]; then + echo "Diff with the previous version in $(basename "${OUT}")" >&"${DESC_FD}" +else + echo "No diff available" >&"${DESC_FD}" +fi diff --git a/tests/series/diff/info.json b/tests/series/diff/info.json new file mode 100644 index 00000000..20870b77 --- /dev/null +++ b/tests/series/diff/info.json @@ -0,0 +1,3 @@ +{ + "run": ["diff.sh"] +} diff --git a/ui/ansiview.html b/ui/ansiview.html new file mode 100644 index 00000000..0a72f27d --- /dev/null +++ b/ui/ansiview.html @@ -0,0 +1,438 @@ + + + + + +NIPA log viewer + + + + +
+ loading… + | + raw +
+

+
+
+