diff options
author | Pavel Labath <pavel@labath.sk> | 2019-09-04 07:46:25 +0000 |
---|---|---|
committer | Pavel Labath <pavel@labath.sk> | 2019-09-04 07:46:25 +0000 |
commit | 418a272f4ab4221c37a9272d48fd31d5ac1bddc1 (patch) | |
tree | 1bcc614932022201607d7f9e3f148f3c27cc5b14 /lldb/packages/Python/lldbsuite/test/tools | |
parent | 5bfe8b562ffb33fc09fa4a4c62f0146087d16ef6 (diff) | |
download | bcm5719-llvm-418a272f4ab4221c37a9272d48fd31d5ac1bddc1.tar.gz bcm5719-llvm-418a272f4ab4221c37a9272d48fd31d5ac1bddc1.zip |
[dotest] Avoid the need for LEVEL= makefile boilerplate
Summary:
Instead of each test case knowing its depth relative to the test root,
we can just have dotest add the folder containing Makefile.rules to the
include path.
This was motivated by r370616, though I have been wanting to do this
ever since we moved to building tests out-of-tree.
The only manually modified files in this patch are lldbinline.py and
plugins/builder_base.py. The rest of the patch has been produced by this
shell command:
find . \( -name Makefile -o -name '*.mk' \) -exec sed --in-place -e '/LEVEL *:\?=/d' -e '1,2{/^$/d}' -e 's,\$(LEVEL)/,,' {} +
Reviewers: teemperor, aprantl, espindola, jfb
Subscribers: emaste, javed.absar, arichardson, christof, arphaman, lldb-commits
Differential Revision: https://reviews.llvm.org/D67083
llvm-svn: 370845
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/tools')
15 files changed, 15 insertions, 45 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/tools/lldb-server/Makefile b/lldb/packages/Python/lldbsuite/test/tools/lldb-server/Makefile index 28aba3cf546..1e0987a3022 100644 --- a/lldb/packages/Python/lldbsuite/test/tools/lldb-server/Makefile +++ b/lldb/packages/Python/lldbsuite/test/tools/lldb-server/Makefile @@ -1,8 +1,6 @@ -LEVEL = ../../make - override CFLAGS_EXTRAS += -D__STDC_LIMIT_MACROS -D__STDC_FORMAT_MACROS ENABLE_THREADS := YES CXX_SOURCES := main.cpp MAKE_DSYM :=NO -include $(LEVEL)/Makefile.rules +include Makefile.rules diff --git a/lldb/packages/Python/lldbsuite/test/tools/lldb-server/inferior-crash/Makefile b/lldb/packages/Python/lldbsuite/test/tools/lldb-server/inferior-crash/Makefile index a47e2797fd8..7fe9a3e92a7 100644 --- a/lldb/packages/Python/lldbsuite/test/tools/lldb-server/inferior-crash/Makefile +++ b/lldb/packages/Python/lldbsuite/test/tools/lldb-server/inferior-crash/Makefile @@ -1,8 +1,6 @@ -LEVEL = ../../../make - CFLAGS_EXTRAS += -D__STDC_LIMIT_MACROS -D__STDC_FORMAT_MACROS -std=c++11 # LD_EXTRAS := -lpthread CXX_SOURCES := main.cpp MAKE_DSYM :=NO -include $(LEVEL)/Makefile.rules +include Makefile.rules diff --git a/lldb/packages/Python/lldbsuite/test/tools/lldb-server/libraries-svr4/Makefile b/lldb/packages/Python/lldbsuite/test/tools/lldb-server/libraries-svr4/Makefile index 265c8ca3c41..e5ed078d1e3 100644 --- a/lldb/packages/Python/lldbsuite/test/tools/lldb-server/libraries-svr4/Makefile +++ b/lldb/packages/Python/lldbsuite/test/tools/lldb-server/libraries-svr4/Makefile @@ -1,12 +1,10 @@ -LEVEL = ../../../make - LIB_PREFIX := svr4lib LD_EXTRAS := -L. -l$(LIB_PREFIX)_a -l$(LIB_PREFIX)_b\" CXX_SOURCES := main.cpp USE_LIBDL := 1 MAKE_DSYM := NO -include $(LEVEL)/Makefile.rules +include Makefile.rules a.out: $(LIB_PREFIX)_a $(LIB_PREFIX)_b_quote diff --git a/lldb/packages/Python/lldbsuite/test/tools/lldb-server/libraries-svr4/svr4lib_a.mk b/lldb/packages/Python/lldbsuite/test/tools/lldb-server/libraries-svr4/svr4lib_a.mk index 626babbd6b2..3d741857c02 100644 --- a/lldb/packages/Python/lldbsuite/test/tools/lldb-server/libraries-svr4/svr4lib_a.mk +++ b/lldb/packages/Python/lldbsuite/test/tools/lldb-server/libraries-svr4/svr4lib_a.mk @@ -1,9 +1,7 @@ -LEVEL = ../../../make - LIB_PREFIX := svr4lib DYLIB_NAME := $(LIB_PREFIX)_a DYLIB_CXX_SOURCES := $(LIB_PREFIX)_a.cpp DYLIB_ONLY := YES -include $(LEVEL)/Makefile.rules +include Makefile.rules diff --git a/lldb/packages/Python/lldbsuite/test/tools/lldb-server/libraries-svr4/svr4lib_b_quote.mk b/lldb/packages/Python/lldbsuite/test/tools/lldb-server/libraries-svr4/svr4lib_b_quote.mk index 5ed7a053b42..fc20cf05c4e 100644 --- a/lldb/packages/Python/lldbsuite/test/tools/lldb-server/libraries-svr4/svr4lib_b_quote.mk +++ b/lldb/packages/Python/lldbsuite/test/tools/lldb-server/libraries-svr4/svr4lib_b_quote.mk @@ -1,9 +1,7 @@ -LEVEL = ../../../make - LIB_PREFIX := svr4lib DYLIB_NAME := $(LIB_PREFIX)_b\" DYLIB_CXX_SOURCES := $(LIB_PREFIX)_b_quote.cpp DYLIB_ONLY := YES -include $(LEVEL)/Makefile.rules +include Makefile.rules diff --git a/lldb/packages/Python/lldbsuite/test/tools/lldb-server/platform-process-connect/Makefile b/lldb/packages/Python/lldbsuite/test/tools/lldb-server/platform-process-connect/Makefile index 314f1cb2f07..99998b20bcb 100644 --- a/lldb/packages/Python/lldbsuite/test/tools/lldb-server/platform-process-connect/Makefile +++ b/lldb/packages/Python/lldbsuite/test/tools/lldb-server/platform-process-connect/Makefile @@ -1,5 +1,3 @@ -LEVEL = ../../../make - CXX_SOURCES := main.cpp -include $(LEVEL)/Makefile.rules +include Makefile.rules diff --git a/lldb/packages/Python/lldbsuite/test/tools/lldb-server/register-reading/Makefile b/lldb/packages/Python/lldbsuite/test/tools/lldb-server/register-reading/Makefile index 314f1cb2f07..99998b20bcb 100644 --- a/lldb/packages/Python/lldbsuite/test/tools/lldb-server/register-reading/Makefile +++ b/lldb/packages/Python/lldbsuite/test/tools/lldb-server/register-reading/Makefile @@ -1,5 +1,3 @@ -LEVEL = ../../../make - CXX_SOURCES := main.cpp -include $(LEVEL)/Makefile.rules +include Makefile.rules diff --git a/lldb/packages/Python/lldbsuite/test/tools/lldb-server/signal-filtering/Makefile b/lldb/packages/Python/lldbsuite/test/tools/lldb-server/signal-filtering/Makefile index 314f1cb2f07..99998b20bcb 100644 --- a/lldb/packages/Python/lldbsuite/test/tools/lldb-server/signal-filtering/Makefile +++ b/lldb/packages/Python/lldbsuite/test/tools/lldb-server/signal-filtering/Makefile @@ -1,5 +1,3 @@ -LEVEL = ../../../make - CXX_SOURCES := main.cpp -include $(LEVEL)/Makefile.rules +include Makefile.rules diff --git a/lldb/packages/Python/lldbsuite/test/tools/lldb-server/thread-name/Makefile b/lldb/packages/Python/lldbsuite/test/tools/lldb-server/thread-name/Makefile index 8817fff55e8..de4ec12b13c 100644 --- a/lldb/packages/Python/lldbsuite/test/tools/lldb-server/thread-name/Makefile +++ b/lldb/packages/Python/lldbsuite/test/tools/lldb-server/thread-name/Makefile @@ -1,6 +1,4 @@ -LEVEL = ../../../make - ENABLE_THREADS := YES CXX_SOURCES := main.cpp -include $(LEVEL)/Makefile.rules +include Makefile.rules diff --git a/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/attach/Makefile b/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/attach/Makefile index b09a579159d..10495940055 100644 --- a/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/attach/Makefile +++ b/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/attach/Makefile @@ -1,5 +1,3 @@ -LEVEL = ../../../make - C_SOURCES := main.c -include $(LEVEL)/Makefile.rules +include Makefile.rules diff --git a/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/breakpoint/Makefile b/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/breakpoint/Makefile index 314f1cb2f07..99998b20bcb 100644 --- a/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/breakpoint/Makefile +++ b/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/breakpoint/Makefile @@ -1,5 +1,3 @@ -LEVEL = ../../../make - CXX_SOURCES := main.cpp -include $(LEVEL)/Makefile.rules +include Makefile.rules diff --git a/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/launch/Makefile b/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/launch/Makefile index b09a579159d..10495940055 100644 --- a/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/launch/Makefile +++ b/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/launch/Makefile @@ -1,5 +1,3 @@ -LEVEL = ../../../make - C_SOURCES := main.c -include $(LEVEL)/Makefile.rules +include Makefile.rules diff --git a/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/stackTrace/Makefile b/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/stackTrace/Makefile index b09a579159d..10495940055 100644 --- a/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/stackTrace/Makefile +++ b/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/stackTrace/Makefile @@ -1,5 +1,3 @@ -LEVEL = ../../../make - C_SOURCES := main.c -include $(LEVEL)/Makefile.rules +include Makefile.rules diff --git a/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/step/Makefile b/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/step/Makefile index f24bb9f4d26..b7f3072e28c 100644 --- a/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/step/Makefile +++ b/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/step/Makefile @@ -1,7 +1,5 @@ -LEVEL = ../../../make - ENABLE_THREADS := YES CXX_SOURCES := main.cpp -include $(LEVEL)/Makefile.rules +include Makefile.rules diff --git a/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/variables/Makefile b/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/variables/Makefile index 314f1cb2f07..99998b20bcb 100644 --- a/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/variables/Makefile +++ b/lldb/packages/Python/lldbsuite/test/tools/lldb-vscode/variables/Makefile @@ -1,5 +1,3 @@ -LEVEL = ../../../make - CXX_SOURCES := main.cpp -include $(LEVEL)/Makefile.rules +include Makefile.rules |