summaryrefslogtreecommitdiff
path: root/packages/Python/lldbsuite/test/macosx/find-dsym/bundle-with-dot-in-filename
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2018-07-28 11:09:23 +0000
committerDimitry Andric <dim@FreeBSD.org>2018-07-28 11:09:23 +0000
commitf73363f1dd94996356cefbf24388f561891acf0b (patch)
treee3c31248bdb36eaec5fd833490d4278162dba2a0 /packages/Python/lldbsuite/test/macosx/find-dsym/bundle-with-dot-in-filename
parent160ee69dd7ae18978f4068116777639ea98dc951 (diff)
Notes
Diffstat (limited to 'packages/Python/lldbsuite/test/macosx/find-dsym/bundle-with-dot-in-filename')
-rw-r--r--packages/Python/lldbsuite/test/macosx/find-dsym/bundle-with-dot-in-filename/Makefile6
-rw-r--r--packages/Python/lldbsuite/test/macosx/find-dsym/bundle-with-dot-in-filename/TestBundleWithDotInFilename.py4
2 files changed, 7 insertions, 3 deletions
diff --git a/packages/Python/lldbsuite/test/macosx/find-dsym/bundle-with-dot-in-filename/Makefile b/packages/Python/lldbsuite/test/macosx/find-dsym/bundle-with-dot-in-filename/Makefile
index 7b321e3deae0a..313c83e990d56 100644
--- a/packages/Python/lldbsuite/test/macosx/find-dsym/bundle-with-dot-in-filename/Makefile
+++ b/packages/Python/lldbsuite/test/macosx/find-dsym/bundle-with-dot-in-filename/Makefile
@@ -1,3 +1,5 @@
+SRCDIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))/
+
CC ?= clang
ifeq "$(ARCH)" ""
@@ -7,7 +9,7 @@ endif
CFLAGS ?= -g -O0 -arch $(ARCH)
all: clean
- $(CC) $(CFLAGS) -dynamiclib -o com.apple.sbd bundle.c
+ $(CC) $(CFLAGS) -dynamiclib -o com.apple.sbd $(SRCDIR)/bundle.c
mkdir com.apple.sbd.xpc
mv com.apple.sbd com.apple.sbd.xpc/
mkdir -p com.apple.sbd.xpc.dSYM/Contents/Resources/DWARF
@@ -15,7 +17,7 @@ all: clean
rm -rf com.apple.sbd.dSYM
mkdir hide.app
tar cf - com.apple.sbd.xpc com.apple.sbd.xpc.dSYM | ( cd hide.app;tar xBpf -)
- $(CC) $(CFLAGS) -o find-bundle-with-dots-in-fn main.c
+ $(CC) $(CFLAGS) -o find-bundle-with-dots-in-fn $(SRCDIR)/main.c
clean:
rm -rf a.out a.out.dSYM hide.app com.apple.sbd com.apple.sbd.dSYM com.apple.sbd.xpc com.apple.sbd.xpc.dSYM find-bundle-with-dots-in-fn find-bundle-with-dots-in-fn.dSYM
diff --git a/packages/Python/lldbsuite/test/macosx/find-dsym/bundle-with-dot-in-filename/TestBundleWithDotInFilename.py b/packages/Python/lldbsuite/test/macosx/find-dsym/bundle-with-dot-in-filename/TestBundleWithDotInFilename.py
index 104e88752ec22..9a046cf0b294d 100644
--- a/packages/Python/lldbsuite/test/macosx/find-dsym/bundle-with-dot-in-filename/TestBundleWithDotInFilename.py
+++ b/packages/Python/lldbsuite/test/macosx/find-dsym/bundle-with-dot-in-filename/TestBundleWithDotInFilename.py
@@ -37,8 +37,9 @@ class BundleWithDotInFilenameTestCase(TestBase):
def test_attach_and_check_dsyms(self):
"""Test attach to binary, see if the bundle dSYM is found"""
- exe = os.path.join(os.getcwd(), exe_name)
+ exe = self.getBuildArtifact(exe_name)
self.build()
+ os.chdir(self.getBuildDir());
popen = self.spawnSubprocess(exe)
self.addTearDownHook(self.cleanupSubprocesses)
@@ -66,6 +67,7 @@ class BundleWithDotInFilenameTestCase(TestBase):
dsym_name = mod.GetSymbolFileSpec().GetFilename()
self.assertTrue (dsym_name == 'com.apple.sbd', "Check that we found the dSYM for the bundle that was loaded")
i=i+1
+ os.chdir(self.getSourceDir());
if __name__ == '__main__':
unittest.main()