selftests, bpftool: Skip the build test if not in tree
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 <naresh.kamboju@linaro.org> Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com> Signed-off-by: Quentin Monnet <quentin.monnet@netronome.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Link: https://lore.kernel.org/bpf/20191119105010.19189-3-quentin.monnet@netronome.com
This commit is contained in:
parent
31f8b8295b
commit
5940c5bf65
|
@ -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=
|
||||
|
|
Loading…
Reference in New Issue