diff options
author | Andrii Nakryiko <andriin@fb.com> | 2019-07-28 05:25:24 +0200 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2019-07-28 07:36:19 +0200 |
commit | 766f2a59323a7881613af577718bb46cc1267b1f (patch) | |
tree | 70029292eec759666348a5e12b7d7af3b59af7ce /tools/testing/selftests/bpf/Makefile | |
parent | selftests/bpf: prevent headers to be compiled as C code (diff) | |
download | linux-766f2a59323a7881613af577718bb46cc1267b1f.tar.xz linux-766f2a59323a7881613af577718bb46cc1267b1f.zip |
selftests/bpf: revamp test_progs to allow more control
Refactor test_progs to allow better control on what's being run.
Also use argp to do argument parsing, so that it's easier to keep adding
more options.
Signed-off-by: Andrii Nakryiko <andriin@fb.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools/testing/selftests/bpf/Makefile')
-rw-r--r-- | tools/testing/selftests/bpf/Makefile | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/tools/testing/selftests/bpf/Makefile b/tools/testing/selftests/bpf/Makefile index bb66cc4a7f34..3bd0f4a0336a 100644 --- a/tools/testing/selftests/bpf/Makefile +++ b/tools/testing/selftests/bpf/Makefile @@ -239,14 +239,8 @@ $(OUTPUT)/test_progs: test_progs.c $(PROG_TESTS_FILES) | $(PROG_TESTS_H) $(PROG_TESTS_H): $(PROG_TESTS_FILES) | $(PROG_TESTS_DIR) $(shell ( cd prog_tests/; \ echo '/* Generated header, do not edit */'; \ - echo '#ifdef DECLARE'; \ ls *.c 2> /dev/null | \ - sed -e 's@\([^\.]*\)\.c@extern void test_\1(void);@'; \ - echo '#endif'; \ - echo '#ifdef CALL'; \ - ls *.c 2> /dev/null | \ - sed -e 's@\([^\.]*\)\.c@test_\1();@'; \ - echo '#endif' \ + sed -e 's@\([^\.]*\)\.c@DEFINE_TEST(\1)@'; \ ) > $(PROG_TESTS_H)) MAP_TESTS_DIR = $(OUTPUT)/map_tests |