summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/bpf/test_doc_build.sh
diff options
context:
space:
mode:
authorJoe Stringer <joe@cilium.io>2021-03-02 20:19:43 +0300
committerAlexei Starovoitov <ast@kernel.org>2021-03-05 05:39:45 +0300
commita01d935b2e0916d32cb567f90c32a0c4eb46993c (patch)
treede8dd76c0939096e3a39a3f6989c879f24ddf00f /tools/testing/selftests/bpf/test_doc_build.sh
parenta67882a221e348ab1c925b47efdfec8b11272d3f (diff)
downloadlinux-a01d935b2e0916d32cb567f90c32a0c4eb46993c.tar.xz
tools/bpf: Remove bpf-helpers from bpftool docs
This logic is used for validating the manual pages from selftests, so move the infra under tools/testing/selftests/bpf/ and rely on selftests for validation rather than tying it into the bpftool build. Signed-off-by: Joe Stringer <joe@cilium.io> Signed-off-by: Alexei Starovoitov <ast@kernel.org> Reviewed-by: Quentin Monnet <quentin@isovalent.com> Acked-by: Toke Høiland-Jørgensen <toke@redhat.com> Link: https://lore.kernel.org/bpf/20210302171947.2268128-12-joe@cilium.io
Diffstat (limited to 'tools/testing/selftests/bpf/test_doc_build.sh')
-rwxr-xr-xtools/testing/selftests/bpf/test_doc_build.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/tools/testing/selftests/bpf/test_doc_build.sh b/tools/testing/selftests/bpf/test_doc_build.sh
new file mode 100755
index 000000000000..7eb940a7b2eb
--- /dev/null
+++ b/tools/testing/selftests/bpf/test_doc_build.sh
@@ -0,0 +1,13 @@
+#!/bin/bash
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+
+# Assume script is located under tools/testing/selftests/bpf/. We want to start
+# build attempts from the top of kernel repository.
+SCRIPT_REL_PATH=$(realpath --relative-to=$PWD $0)
+SCRIPT_REL_DIR=$(dirname $SCRIPT_REL_PATH)
+KDIR_ROOT_DIR=$(realpath $PWD/$SCRIPT_REL_DIR/../../../../)
+cd $KDIR_ROOT_DIR
+
+for tgt in docs docs-clean; do
+ make -s -C $PWD/$SCRIPT_REL_DIR $tgt;
+done