Tiny testsuite tweaks. Don't run the apple simulator

tests when targetting a device.  Add an include to 
safe-to-call-func to work around a modules issue with
a certain combination of header files.  Add rules for
Darwin systems to ad-hoc codesign binaries that the
testsuite builds.

llvm-svn: 344635
This commit is contained in:
Jason Molenda 2018-10-16 18:14:30 +00:00
parent 2493707818
commit 0128e7f540
3 changed files with 11 additions and 0 deletions

View File

@ -1,3 +1,4 @@
#include <sys/time.h> // work around module map issue with iOS sdk, <rdar://problem/35159346>
#include <sys/select.h>
#include <stdio.h>
#include <pthread.h>

View File

@ -153,6 +153,7 @@ ifeq "$(OS)" "Darwin"
DSYM = $(EXE).dSYM
AR := $(CROSS_COMPILE)libtool
ARFLAGS := -static -o
CODESIGN = codesign
else
AR := $(CROSS_COMPILE)ar
# On non-Apple platforms, -arch becomes -m
@ -513,6 +514,9 @@ endif
else
$(EXE) : $(OBJECTS) $(ARCHIVE_NAME)
$(LD) $(OBJECTS) $(LDFLAGS) $(ARCHIVE_NAME) -o "$(EXE)"
ifneq "$(CODESIGN)" ""
$(CODESIGN) -s - "$(EXE)"
endif
endif
#----------------------------------------------------------------------
@ -557,6 +561,9 @@ endif
$(DYLIB_FILENAME) : $(DYLIB_OBJECTS)
ifeq "$(OS)" "Darwin"
$(LD) $(DYLIB_OBJECTS) $(LDFLAGS) -install_name "$(DYLIB_EXECUTABLE_PATH)/$(DYLIB_FILENAME)" -dynamiclib -o "$(DYLIB_FILENAME)"
ifneq "$(CODESIGN)" ""
$(CODESIGN) -s - "$(DYLIB_FILENAME)"
endif
ifneq "$(MAKE_DSYM)" "NO"
ifneq "$(DS)" ""
"$(DS)" $(DSFLAGS) "$(DYLIB_FILENAME)"

View File

@ -95,18 +95,21 @@ class TestAppleSimulatorOSType(gdbremote_testcase.GdbRemoteTestCaseBase):
@apple_simulator_test('iphone')
@debugserver_test
@skipIfDarwinEmbedded
def test_simulator_ostype_ios(self):
self.check_simulator_ostype(sdk='iphonesimulator',
platform='ios')
@apple_simulator_test('appletv')
@debugserver_test
@skipIfDarwinEmbedded
def test_simulator_ostype_tvos(self):
self.check_simulator_ostype(sdk='appletvsimulator',
platform='tvos')
@apple_simulator_test('watch')
@debugserver_test
@skipIfDarwinEmbedded
def test_simulator_ostype_watchos(self):
self.check_simulator_ostype(sdk='watchsimulator',
platform='watchos', arch='i386')