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/macosx | |
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/macosx')
14 files changed, 11 insertions, 36 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/macosx/duplicate-archive-members/Makefile b/lldb/packages/Python/lldbsuite/test/macosx/duplicate-archive-members/Makefile index 5bb3a3ce3f1..b880d9e722b 100644 --- a/lldb/packages/Python/lldbsuite/test/macosx/duplicate-archive-members/Makefile +++ b/lldb/packages/Python/lldbsuite/test/macosx/duplicate-archive-members/Makefile @@ -1,5 +1,3 @@ -LEVEL = ../../make - C_SOURCES := main.c # Make an archive that has two object files with the same name, but @@ -14,7 +12,7 @@ libfoo.a: a.c sub1/a.c $(AR) $(ARFLAGS) $@ a.o sub1/a.o rm a.o sub1/a.o -include $(LEVEL)/Makefile.rules +include Makefile.rules # Needs to come after include OBJECTS += libfoo.a diff --git a/lldb/packages/Python/lldbsuite/test/macosx/find-app-in-bundle/Makefile b/lldb/packages/Python/lldbsuite/test/macosx/find-app-in-bundle/Makefile index 18a4934cca3..68012d22f5b 100644 --- a/lldb/packages/Python/lldbsuite/test/macosx/find-app-in-bundle/Makefile +++ b/lldb/packages/Python/lldbsuite/test/macosx/find-app-in-bundle/Makefile @@ -1,5 +1,4 @@ SRCDIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))/ - CC ?= clang ifeq "$(ARCH)" "" diff --git a/lldb/packages/Python/lldbsuite/test/macosx/find-dsym/bundle-with-dot-in-filename/Makefile b/lldb/packages/Python/lldbsuite/test/macosx/find-dsym/bundle-with-dot-in-filename/Makefile index 313c83e990d..658c9a93870 100644 --- a/lldb/packages/Python/lldbsuite/test/macosx/find-dsym/bundle-with-dot-in-filename/Makefile +++ b/lldb/packages/Python/lldbsuite/test/macosx/find-dsym/bundle-with-dot-in-filename/Makefile @@ -1,5 +1,4 @@ SRCDIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))/ - CC ?= clang ifeq "$(ARCH)" "" diff --git a/lldb/packages/Python/lldbsuite/test/macosx/find-dsym/deep-bundle/Makefile b/lldb/packages/Python/lldbsuite/test/macosx/find-dsym/deep-bundle/Makefile index d52d6f1f0d3..b2a66c2ad41 100644 --- a/lldb/packages/Python/lldbsuite/test/macosx/find-dsym/deep-bundle/Makefile +++ b/lldb/packages/Python/lldbsuite/test/macosx/find-dsym/deep-bundle/Makefile @@ -1,5 +1,4 @@ SRCDIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))/ - CC ?= clang ifeq "$(ARCH)" "" diff --git a/lldb/packages/Python/lldbsuite/test/macosx/function-starts/Makefile b/lldb/packages/Python/lldbsuite/test/macosx/function-starts/Makefile index 091876d51c3..0d6f5172939 100644 --- a/lldb/packages/Python/lldbsuite/test/macosx/function-starts/Makefile +++ b/lldb/packages/Python/lldbsuite/test/macosx/function-starts/Makefile @@ -1,10 +1,8 @@ -LEVEL = ../../make - CXX_SOURCES := main.cpp EXE := StripMe MAKE_DSYM := NO -include $(LEVEL)/Makefile.rules +include Makefile.rules main.o: main.cpp $(CC) $(CFLAGS_NO_DEBUG) -c $< -o $@ diff --git a/lldb/packages/Python/lldbsuite/test/macosx/indirect_symbol/Makefile b/lldb/packages/Python/lldbsuite/test/macosx/indirect_symbol/Makefile index 69fd86e575e..5bea8dc4ab5 100644 --- a/lldb/packages/Python/lldbsuite/test/macosx/indirect_symbol/Makefile +++ b/lldb/packages/Python/lldbsuite/test/macosx/indirect_symbol/Makefile @@ -1,6 +1,4 @@ -LEVEL = ../../make - -include $(LEVEL)/Makefile.rules +include Makefile.rules LIB_PREFIX := lib diff --git a/lldb/packages/Python/lldbsuite/test/macosx/lc-note/kern-ver-str/Makefile b/lldb/packages/Python/lldbsuite/test/macosx/lc-note/kern-ver-str/Makefile index b440cf32189..af03cf6ff5d 100644 --- a/lldb/packages/Python/lldbsuite/test/macosx/lc-note/kern-ver-str/Makefile +++ b/lldb/packages/Python/lldbsuite/test/macosx/lc-note/kern-ver-str/Makefile @@ -1,5 +1,3 @@ -LEVEL = ../../../make - MAKE_DSYM := NO C_SOURCES := main.c @@ -12,4 +10,4 @@ create-empty-corefile: clean:: $(MAKE) -f create-empty-corefile.mk clean -include $(LEVEL)/Makefile.rules +include Makefile.rules diff --git a/lldb/packages/Python/lldbsuite/test/macosx/lc-note/kern-ver-str/create-empty-corefile.mk b/lldb/packages/Python/lldbsuite/test/macosx/lc-note/kern-ver-str/create-empty-corefile.mk index 4d3e320f041..4967e956679 100644 --- a/lldb/packages/Python/lldbsuite/test/macosx/lc-note/kern-ver-str/create-empty-corefile.mk +++ b/lldb/packages/Python/lldbsuite/test/macosx/lc-note/kern-ver-str/create-empty-corefile.mk @@ -1,8 +1,6 @@ -LEVEL = ../../../make - MAKE_DSYM := NO CXX_SOURCES := create-empty-corefile.cpp EXE = create-empty-corefile -include $(LEVEL)/Makefile.rules +include Makefile.rules diff --git a/lldb/packages/Python/lldbsuite/test/macosx/nslog/Makefile b/lldb/packages/Python/lldbsuite/test/macosx/nslog/Makefile index de2b618b3d7..a68dad547ec 100644 --- a/lldb/packages/Python/lldbsuite/test/macosx/nslog/Makefile +++ b/lldb/packages/Python/lldbsuite/test/macosx/nslog/Makefile @@ -1,6 +1,4 @@ -LEVEL = ../../make - OBJC_SOURCES := main.m LD_EXTRAS = -framework Foundation -include $(LEVEL)/Makefile.rules +include Makefile.rules diff --git a/lldb/packages/Python/lldbsuite/test/macosx/order/Makefile b/lldb/packages/Python/lldbsuite/test/macosx/order/Makefile index ff5f1886ef5..357a6032bcd 100644 --- a/lldb/packages/Python/lldbsuite/test/macosx/order/Makefile +++ b/lldb/packages/Python/lldbsuite/test/macosx/order/Makefile @@ -1,7 +1,5 @@ -LEVEL = ../../make - C_SOURCES := main.c LDFLAGS = $(CFLAGS) -Xlinker -order_file -Xlinker $(SRCDIR)/order-file MAKE_DSYM := NO -include $(LEVEL)/Makefile.rules +include Makefile.rules diff --git a/lldb/packages/Python/lldbsuite/test/macosx/queues/Makefile b/lldb/packages/Python/lldbsuite/test/macosx/queues/Makefile index 0d70f259501..10495940055 100644 --- a/lldb/packages/Python/lldbsuite/test/macosx/queues/Makefile +++ b/lldb/packages/Python/lldbsuite/test/macosx/queues/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/macosx/safe-to-func-call/Makefile b/lldb/packages/Python/lldbsuite/test/macosx/safe-to-func-call/Makefile index 0d70f259501..10495940055 100644 --- a/lldb/packages/Python/lldbsuite/test/macosx/safe-to-func-call/Makefile +++ b/lldb/packages/Python/lldbsuite/test/macosx/safe-to-func-call/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/macosx/thread-names/Makefile b/lldb/packages/Python/lldbsuite/test/macosx/thread-names/Makefile index 0d70f259501..10495940055 100644 --- a/lldb/packages/Python/lldbsuite/test/macosx/thread-names/Makefile +++ b/lldb/packages/Python/lldbsuite/test/macosx/thread-names/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/macosx/universal/Makefile b/lldb/packages/Python/lldbsuite/test/macosx/universal/Makefile index a83de2a6c7e..efdeb1fd131 100644 --- a/lldb/packages/Python/lldbsuite/test/macosx/universal/Makefile +++ b/lldb/packages/Python/lldbsuite/test/macosx/universal/Makefile @@ -1,8 +1,6 @@ -LEVEL := ../../make - EXE := testit -include $(LEVEL)/Makefile.rules +include Makefile.rules all: testit |