summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite
diff options
context:
space:
mode:
authorSean Callanan <scallanan@apple.com>2016-06-07 17:22:18 +0000
committerSean Callanan <scallanan@apple.com>2016-06-07 17:22:18 +0000
commit968bb72f5869fe524c64ab520f66b05a57c3f561 (patch)
tree432e3778b2d3a4fbfbb5202c91bd9ebad8edecc8 /lldb/packages/Python/lldbsuite
parent486f49cc63fa593bbc29817dba9f375b6aeb7e3c (diff)
downloadbcm5719-llvm-968bb72f5869fe524c64ab520f66b05a57c3f561.tar.gz
bcm5719-llvm-968bb72f5869fe524c64ab520f66b05a57c3f561.zip
Make lldbinline.py regenerate the Makefile each time it builds.
If a lldbinline test's source file changed language, then the Makefile wasn't updated. This was a problem if the Makefile was checked into the repository. Now lldbinline.py always regenerates the Makefile and asserts if the newly-generated version is not the same as the one already there. This ensures that the repository will never be out of date without a buildbot failing. http://reviews.llvm.org/D21032 llvm-svn: 272024
Diffstat (limited to 'lldb/packages/Python/lldbsuite')
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/dump_dynamic/Makefile11
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/setvaluefromcstring/Makefile11
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/stringprinter/Makefile11
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/typedef_array/Makefile9
-rw-r--r--lldb/packages/Python/lldbsuite/test/lang/c/struct_types/Makefile9
-rw-r--r--lldb/packages/Python/lldbsuite/test/lang/cpp/const_this/Makefile5
-rw-r--r--lldb/packages/Python/lldbsuite/test/lang/cpp/extern_c/Makefile10
-rw-r--r--lldb/packages/Python/lldbsuite/test/lang/objc/objc-runtime-ivars/Makefile9
-rw-r--r--lldb/packages/Python/lldbsuite/test/lldbinline.py24
-rw-r--r--lldb/packages/Python/lldbsuite/test/python_api/sbvalue_const_addrof/Makefile9
10 files changed, 91 insertions, 17 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/dump_dynamic/Makefile b/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/dump_dynamic/Makefile
index 69dde1b7618..ced3f7aab56 100644
--- a/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/dump_dynamic/Makefile
+++ b/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/dump_dynamic/Makefile
@@ -1,12 +1,13 @@
LEVEL = ../../../make
CXX_SOURCES := main.cpp
CXXFLAGS += -std=c++11
-
-# clang-3.5+ outputs FullDebugInfo by default for Darwin/FreeBSD
-# targets. Other targets do not, which causes this test to fail.
-# This flag enables FullDebugInfo for all targets.
ifneq (,$(findstring clang,$(CC)))
- CFLAGS_EXTRAS += -fno-limit-debug-info
+ CFLAGS_EXTRAS += -fno-limit-debug-info
endif
include $(LEVEL)/Makefile.rules
+
+
+cleanup:
+ rm -f Makefile *.d
+
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/setvaluefromcstring/Makefile b/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/setvaluefromcstring/Makefile
index 62a57f6cd9b..23b1e08598b 100644
--- a/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/setvaluefromcstring/Makefile
+++ b/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/setvaluefromcstring/Makefile
@@ -1,4 +1,13 @@
LEVEL = ../../../make
OBJC_SOURCES := main.m
+LDFLAGS = $(CFLAGS) -lobjc -framework Foundation
+ifneq (,$(findstring clang,$(CC)))
+ CFLAGS_EXTRAS += -fno-limit-debug-info
+endif
+
include $(LEVEL)/Makefile.rules
-LDFLAGS += -framework Foundation
+
+
+cleanup:
+ rm -f Makefile *.d
+
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/stringprinter/Makefile b/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/stringprinter/Makefile
index 69dde1b7618..ced3f7aab56 100644
--- a/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/stringprinter/Makefile
+++ b/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/stringprinter/Makefile
@@ -1,12 +1,13 @@
LEVEL = ../../../make
CXX_SOURCES := main.cpp
CXXFLAGS += -std=c++11
-
-# clang-3.5+ outputs FullDebugInfo by default for Darwin/FreeBSD
-# targets. Other targets do not, which causes this test to fail.
-# This flag enables FullDebugInfo for all targets.
ifneq (,$(findstring clang,$(CC)))
- CFLAGS_EXTRAS += -fno-limit-debug-info
+ CFLAGS_EXTRAS += -fno-limit-debug-info
endif
include $(LEVEL)/Makefile.rules
+
+
+cleanup:
+ rm -f Makefile *.d
+
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/typedef_array/Makefile b/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/typedef_array/Makefile
index 3e2b0187b95..ced3f7aab56 100644
--- a/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/typedef_array/Makefile
+++ b/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/typedef_array/Makefile
@@ -1,4 +1,13 @@
LEVEL = ../../../make
CXX_SOURCES := main.cpp
CXXFLAGS += -std=c++11
+ifneq (,$(findstring clang,$(CC)))
+ CFLAGS_EXTRAS += -fno-limit-debug-info
+endif
+
include $(LEVEL)/Makefile.rules
+
+
+cleanup:
+ rm -f Makefile *.d
+
diff --git a/lldb/packages/Python/lldbsuite/test/lang/c/struct_types/Makefile b/lldb/packages/Python/lldbsuite/test/lang/c/struct_types/Makefile
index cd9ca5c86d8..e2eb16515a6 100644
--- a/lldb/packages/Python/lldbsuite/test/lang/c/struct_types/Makefile
+++ b/lldb/packages/Python/lldbsuite/test/lang/c/struct_types/Makefile
@@ -1,3 +1,12 @@
LEVEL = ../../../make
C_SOURCES := main.c
+ifneq (,$(findstring clang,$(CC)))
+ CFLAGS_EXTRAS += -fno-limit-debug-info
+endif
+
include $(LEVEL)/Makefile.rules
+
+
+cleanup:
+ rm -f Makefile *.d
+
diff --git a/lldb/packages/Python/lldbsuite/test/lang/cpp/const_this/Makefile b/lldb/packages/Python/lldbsuite/test/lang/cpp/const_this/Makefile
index 52a92c0b61a..ced3f7aab56 100644
--- a/lldb/packages/Python/lldbsuite/test/lang/cpp/const_this/Makefile
+++ b/lldb/packages/Python/lldbsuite/test/lang/cpp/const_this/Makefile
@@ -1,8 +1,13 @@
LEVEL = ../../../make
CXX_SOURCES := main.cpp
CXXFLAGS += -std=c++11
+ifneq (,$(findstring clang,$(CC)))
+ CFLAGS_EXTRAS += -fno-limit-debug-info
+endif
+
include $(LEVEL)/Makefile.rules
+
cleanup:
rm -f Makefile *.d
diff --git a/lldb/packages/Python/lldbsuite/test/lang/cpp/extern_c/Makefile b/lldb/packages/Python/lldbsuite/test/lang/cpp/extern_c/Makefile
index 99bfa7e03b4..ced3f7aab56 100644
--- a/lldb/packages/Python/lldbsuite/test/lang/cpp/extern_c/Makefile
+++ b/lldb/packages/Python/lldbsuite/test/lang/cpp/extern_c/Makefile
@@ -1,3 +1,13 @@
LEVEL = ../../../make
CXX_SOURCES := main.cpp
+CXXFLAGS += -std=c++11
+ifneq (,$(findstring clang,$(CC)))
+ CFLAGS_EXTRAS += -fno-limit-debug-info
+endif
+
include $(LEVEL)/Makefile.rules
+
+
+cleanup:
+ rm -f Makefile *.d
+
diff --git a/lldb/packages/Python/lldbsuite/test/lang/objc/objc-runtime-ivars/Makefile b/lldb/packages/Python/lldbsuite/test/lang/objc/objc-runtime-ivars/Makefile
index a1608fe5a66..23b1e08598b 100644
--- a/lldb/packages/Python/lldbsuite/test/lang/objc/objc-runtime-ivars/Makefile
+++ b/lldb/packages/Python/lldbsuite/test/lang/objc/objc-runtime-ivars/Makefile
@@ -1,6 +1,13 @@
LEVEL = ../../../make
-
OBJC_SOURCES := main.m
LDFLAGS = $(CFLAGS) -lobjc -framework Foundation
+ifneq (,$(findstring clang,$(CC)))
+ CFLAGS_EXTRAS += -fno-limit-debug-info
+endif
include $(LEVEL)/Makefile.rules
+
+
+cleanup:
+ rm -f Makefile *.d
+
diff --git a/lldb/packages/Python/lldbsuite/test/lldbinline.py b/lldb/packages/Python/lldbsuite/test/lldbinline.py
index 6a61b2eaf55..8d619cf829d 100644
--- a/lldb/packages/Python/lldbsuite/test/lldbinline.py
+++ b/lldb/packages/Python/lldbsuite/test/lldbinline.py
@@ -2,7 +2,9 @@ from __future__ import print_function
from __future__ import absolute_import
# System modules
+import filecmp
import os
+import sys
# Third-party modules
@@ -89,9 +91,6 @@ class InlineTest(TestBase):
return "-N dsym %s" % (self.mydir)
def BuildMakefile(self):
- if os.path.exists("Makefile"):
- return
-
categories = {}
for f in os.listdir(os.getcwd()):
@@ -102,7 +101,7 @@ class InlineTest(TestBase):
else:
categories[t] = [f]
- makefile = open("Makefile", 'w+')
+ makefile = open("Makefile.tmp", 'w+')
level = os.sep.join([".."] * len(self.mydir.split(os.sep))) + os.sep + "make"
@@ -118,11 +117,26 @@ class InlineTest(TestBase):
if ('CXX_SOURCES' in list(categories.keys())):
makefile.write("CXXFLAGS += -std=c++11\n")
- makefile.write("include $(LEVEL)/Makefile.rules\n")
+ # clang-3.5+ outputs FullDebugInfo by default for Darwin/FreeBSD
+ # targets. Other targets do not, which causes this test to fail.
+ # This flag enables FullDebugInfo for all targets.
+
+ makefile.write("ifneq (,$(findstring clang,$(CC)))\n")
+ makefile.write(" CFLAGS_EXTRAS += -fno-limit-debug-info\n")
+ makefile.write("endif\n\n")
+
+ makefile.write("include $(LEVEL)/Makefile.rules\n\n")
+
makefile.write("\ncleanup:\n\trm -f Makefile *.d\n\n")
makefile.flush()
makefile.close()
+ if os.path.exists("Makefile"):
+ if not filecmp.cmp("Makefile", "Makefile.tmp"):
+ sys.exit("Existing Makefile doesn't match generated Makefile!")
+
+ os.rename("Makefile.tmp", "Makefile")
+
@skipUnlessDarwin
def __test_with_dsym(self):
self.using_dsym = True
diff --git a/lldb/packages/Python/lldbsuite/test/python_api/sbvalue_const_addrof/Makefile b/lldb/packages/Python/lldbsuite/test/python_api/sbvalue_const_addrof/Makefile
index a9c1edd1bdc..18bf477fa9f 100644
--- a/lldb/packages/Python/lldbsuite/test/python_api/sbvalue_const_addrof/Makefile
+++ b/lldb/packages/Python/lldbsuite/test/python_api/sbvalue_const_addrof/Makefile
@@ -1,4 +1,13 @@
LEVEL = ../../make
CXX_SOURCES := main.cpp
CXXFLAGS += -std=c++11
+ifneq (,$(findstring clang,$(CC)))
+ CFLAGS_EXTRAS += -fno-limit-debug-info
+endif
+
include $(LEVEL)/Makefile.rules
+
+
+cleanup:
+ rm -f Makefile *.d
+
OpenPOWER on IntegriCloud