aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohnny Chen <johnny.chen@apple.com>2010-09-03 23:49:16 +0000
committerJohnny Chen <johnny.chen@apple.com>2010-09-03 23:49:16 +0000
commit1b1b9accd10a0a72768075cb09b3b50875c32b7f (patch)
tree523566fd228cd44203652cdc1007356746cc70d4
parent7829d0e74b25af296ec9b5cd4dec3a1604b35826 (diff)
downloadllvm-1b1b9accd10a0a72768075cb09b3b50875c32b7f.zip
llvm-1b1b9accd10a0a72768075cb09b3b50875c32b7f.tar.gz
llvm-1b1b9accd10a0a72768075cb09b3b50875c32b7f.tar.bz2
Marked test_process_launch_for_universal() test case as requiring 'darwin' and 'i386'
in order to be run. And added a default build phase at the beginning of the method. llvm-svn: 113037
-rw-r--r--lldb/test/lldbtest.py6
-rw-r--r--lldb/test/macosx/universal/TestUniversal.py5
-rw-r--r--lldb/test/plugins/darwin.py6
3 files changed, 17 insertions, 0 deletions
diff --git a/lldb/test/lldbtest.py b/lldb/test/lldbtest.py
index 51d2afd..40a8903 100644
--- a/lldb/test/lldbtest.py
+++ b/lldb/test/lldbtest.py
@@ -458,6 +458,12 @@ class TestBase(unittest2.TestCase):
# End of while loop.
+ def buildDefault(self):
+ """Platform specific way to build the default binaries."""
+ module = __import__(sys.platform)
+ if not module.buildDefault():
+ raise Exception("Don't know how to build default binary")
+
def buildDsym(self):
"""Platform specific way to build binaries with dsym info."""
module = __import__(sys.platform)
diff --git a/lldb/test/macosx/universal/TestUniversal.py b/lldb/test/macosx/universal/TestUniversal.py
index 6a93e4a..7785f63 100644
--- a/lldb/test/macosx/universal/TestUniversal.py
+++ b/lldb/test/macosx/universal/TestUniversal.py
@@ -9,9 +9,14 @@ class UniversalTestCase(TestBase):
mydir = "macosx/universal"
+ @unittest2.skipUnless(sys.platform.startswith("darwin") and os.uname()[4]=='i386',
+ "requires Darwin & i386")
def test_process_launch_for_universal(self):
"""Test process launch of a universal binary."""
+ # Invoke the default build rule.
+ self.buildDefault()
+
# Note that "testit" is a universal binary.
exe = os.path.join(os.getcwd(), "testit")
diff --git a/lldb/test/plugins/darwin.py b/lldb/test/plugins/darwin.py
index 6a2cadf..f5a6ee0 100644
--- a/lldb/test/plugins/darwin.py
+++ b/lldb/test/plugins/darwin.py
@@ -2,6 +2,12 @@ import lldbtest
#print "Hello, darwin plugin!"
+def buildDefault():
+ lldbtest.system(["/bin/sh", "-c", "make clean; make"])
+
+ # True signifies that we can handle building default.
+ return True
+
def buildDsym():
lldbtest.system(["/bin/sh", "-c", "make clean; make MAKE_DSYM=YES"])