Skip to content

Commit 23afc73

Browse files
authored
Apple Unified Logging System Support (#46)
* Added `UnifiedLoggingWriter` for writing to the Apple Unified Logging System. * Remove OS_ACTIVITY_MODE disable from example schemes so os_log output writes to logs. * Update podspec version and run pod update. * Change test and example platform for OSX to 10.12. * Removing performance tests that write to standard out. * Removing Swiftlint. * Removing xcpretty to simplify build. * Remove stdout performance tests on ObjC. * Remove playground and xctest_tool.rb * Removing older tests for 9.3.
1 parent bc120b0 commit 23afc73

File tree

30 files changed

+1118
-1438
lines changed

30 files changed

+1118
-1438
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ DerivedData
2424
# http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control
2525
#
2626
#Pods/
27+
#Podfile.lock
28+
#Manifest.lock
2729

2830
#####
2931
# OS X temporary files that should never be committed
@@ -43,6 +45,7 @@ DerivedData
4345
# Swift Compile output on Linux
4446
#
4547
.build
48+
Package.resolved
4649

4750
#
4851
# Vagrant

.swiftlint.yml

Lines changed: 0 additions & 226 deletions
This file was deleted.

.travis.yml

Lines changed: 27 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,21 @@ env:
99

1010
matrix:
1111
include:
12-
-
12+
-
1313
os: linux
1414
dist: trusty
1515
sudo: required
16-
env:
16+
env:
1717
- BUILD="swift build"
18-
-
18+
-
1919
os: osx
2020
osx_image: xcode9.3
21-
env:
21+
env:
2222
- BUILD="swift build"
2323
-
2424
os: osx
2525
osx_image: xcode9.3
26-
env:
26+
env:
2727
- BUILD="pod lint"
2828
-
2929
os: osx
@@ -33,54 +33,15 @@ matrix:
3333
- TEST_DEST="platform=iOS Simulator,OS=11.3,name=iPhone 8"
3434
- TEST_SDK=iphonesimulator
3535
- SCHEME=TraceLog-iOS-Example
36-
-
37-
os: osx
38-
osx_image: xcode9.3
39-
env:
40-
- BUILD="xcodebuild"
41-
- TEST_DEST="platform=iOS Simulator,OS=10.0,name=iPhone 6s"
42-
- TEST_SDK=iphonesimulator
43-
- SCHEME=TraceLog-iOS-Example
44-
-
45-
os: osx
46-
osx_image: xcode9.3
47-
env:
48-
- BUILD="xcodebuild"
49-
- TEST_DEST="platform=iOS Simulator,OS=10.0,name=iPhone 6"
50-
- TEST_SDK=iphonesimulator
51-
- SCHEME=TraceLog-iOS-Example
52-
-
53-
os: osx
54-
osx_image: xcode9.3
55-
env:
56-
- BUILD="xcodebuild"
57-
- TEST_DEST="platform=iOS Simulator,OS=9.3,name=iPhone 6"
58-
- TEST_SDK=iphonesimulator
59-
- SCHEME=TraceLog-iOS-Example
60-
-
61-
os: osx
62-
osx_image: xcode9.3
63-
env:
64-
- BUILD="xcodebuild"
65-
- TEST_DEST="platform=iOS Simulator,OS=9.2,name=iPhone 5s"
66-
- TEST_SDK=iphonesimulator
67-
- SCHEME=TraceLog-iOS-Example
68-
-
69-
os: osx
70-
osx_image: xcode9.3
71-
env:
72-
- BUILD="xcodebuild"
73-
- TEST_DEST="platform=iOS Simulator,OS=9.0,name=iPhone 4s"
74-
- TEST_SDK=iphonesimulator
75-
- SCHEME=TraceLog-iOS-Example
76-
-
36+
37+
-
7738
os: osx
7839
osx_image: xcode9.3
79-
env:
40+
env:
8041
- BUILD="xcodebuild"
81-
- TEST_DEST="platform=OS X,arch=x86_64"
42+
- TEST_DEST="platform=OS X,arch=x86_64"
8243
- TEST_SDK=macosx
83-
- SCHEME=TraceLog-OSX-Example
44+
- SCHEME=TraceLog-OSX-Example
8445

8546
before_install:
8647
#
@@ -93,6 +54,17 @@ before_install:
9354
bundler install
9455
fi
9556
#
57+
# OSX
58+
#
59+
- |
60+
if [[ "${TRAVIS_OS_NAME}" == "osx" ]]; then
61+
# Fix travis issue: https://github.com/travis-ci/travis-ci/issues/6307
62+
rvm get head --auto-dotfiles || true
63+
sudo log config --subsystem "xctest" --mode "persist:debug"
64+
sudo log config --subsystem "TraceLog-OSX" --mode "persist:debug"
65+
sudo log config --subsystem "TraceLog-iOS" --mode "persist:debug"
66+
fi
67+
#
9668
# Linux requires downloading Swift and tools
9769
#
9870
- |
@@ -108,26 +80,23 @@ before_install:
10880
fi
10981
11082
script:
111-
- |
112-
if [[ "${TRAVIS_OS_NAME}" == "osx" ]]; then
113-
# Fix travis issue: https://github.com/travis-ci/travis-ci/issues/6307
114-
rvm get head --auto-dotfiles || true
115-
fi
11683
- |
11784
if [[ "$BUILD" == "swift build" ]]; then
11885
swift test
11986
fi
12087
- |
12188
if [[ "$BUILD" == "pod lint" ]]; then
89+
set -e # Fail (and stop build) on first non zero exit code
12290
bundler exec pod repo update
12391
bundler exec pod lib lint
92+
set +e
12493
fi
12594
- |
12695
if [[ "$BUILD" == "xcodebuild" ]]; then
127-
set -o pipefail
128-
xcodebuild -workspace "$WORKSPACE" -scheme "$SCHEME" -destination "$TEST_DEST" -sdk "$TEST_SDK" -enableCodeCoverage YES build-for-testing | bundler exec xcpretty
129-
xcodebuild -workspace "$WORKSPACE" -scheme "$SCHEME" -destination "$TEST_DEST" -sdk "$TEST_SDK" -enableCodeCoverage YES test | bundler exec xcpretty
130-
set +o pipefail
96+
set -e # Fail (and stop build) on first non zero exit code
97+
xcodebuild -workspace "$WORKSPACE" -scheme "$SCHEME" -destination "$TEST_DEST" -sdk "$TEST_SDK" -enableCodeCoverage YES build-for-testing
98+
xcodebuild -workspace "$WORKSPACE" -scheme "$SCHEME" -destination "$TEST_DEST" -sdk "$TEST_SDK" -enableCodeCoverage YES test
99+
set +e
131100
fi
132101
133102
after_success:

0 commit comments

Comments
 (0)