Skip to content

Commit

Permalink
selftests, bpftool: Skip the build test if not in tree
Browse files Browse the repository at this point in the history
If selftests are copied over to another machine/location
for execution the build test of bpftool will obviously
not work, since the sources are not copied.
Skip it if we can't find bpftool's Makefile.

Reported-by: Naresh Kamboju <[email protected]>
Signed-off-by: Jakub Kicinski <[email protected]>
Signed-off-by: Quentin Monnet <[email protected]>
Signed-off-by: Daniel Borkmann <[email protected]>
Link: https://lore.kernel.org/bpf/[email protected]
  • Loading branch information
Jakub Kicinski authored and Alexei Starovoitov committed Nov 25, 2019
1 parent 31f8b82 commit 5940c5b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tools/testing/selftests/bpf/test_bpftool_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ 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
if [ ! -e tools/bpf/bpftool/Makefile ]; then
echo -e "skip: bpftool files not found!\n"
exit 0
fi

ERROR=0
TMPDIR=
Expand Down

0 comments on commit 5940c5b

Please sign in to comment.