Browse Source

CI runs SSK tests

Clean up Makefile cruft

// FREEBIE
Michael Kirk 2 years ago
parent
commit
1b8efb5255

+ 1 - 1
.travis.yml

@@ -12,5 +12,5 @@ before_install:
     - bundle
     - bundle exec pod repo update --silent # log output is too long without --silent
 
-script: make ci_scan
+script: make ci
 

+ 2 - 21
Makefile

@@ -1,20 +1,15 @@
 # Make sure we're failing even though we pipe to xcpretty
 SHELL=/bin/bash -o pipefail -o errexit
 
-# iPhone6, iOS10
-DEVICE_UUID:=$(shell xcrun instruments -s | grep -o "iPhone 6 (10.0) \[.*\]" | grep -o "\[.*\]" | sed "s/^\[\(.*\)\]$$/\1/")
-BUILD_DESTINATION = platform=iOS Simulator,id=${DEVICE_UUID}
 WORKING_DIR = ./
 SCHEME = Signal
-XCODE_BUILD = xcrun xcodebuild -workspace $(SCHEME).xcworkspace -scheme $(SCHEME) -sdk iphonesimulator
 
 .PHONY: build test retest clean dependencies
 
 default: test
 
 ci: dependencies test
-
-ci_scan: dependencies scan
+	cd SignalServiceKit && make ci
 
 update_dependencies:
 	bundle exec pod update
@@ -30,26 +25,12 @@ build: dependencies
 	cd $(WORKING_DIR) && \
 		$(XCODE_BUILD) build | xcpretty
 
-scan:
+test:
 	bundle exec fastlane scan
 
-test: optional_early_start_simulator
-	cd $(WORKING_DIR) && \
-		$(XCODE_BUILD) \
-			-destination '${BUILD_DESTINATION}' \
-			test | xcpretty
-
 clean:
 	cd $(WORKING_DIR) && \
 		rm -fr Carthage/Build && \
 		$(XCODE_BUILD) \
 			clean | xcpretty
 
-optional_early_start_simulator:
-ifdef EARLY_START_SIMULATOR
-		echo "Waiting for simulator to start to help with testing timeouts" &&\
-		xcrun instruments -w '${DEVICE_UUID}' || true # xcrun can return irrelevant non-zeroes.
-else
-		echo "Not waiting for simulator."
-endif
-

+ 0 - 1
Podfile

@@ -9,7 +9,6 @@ target 'Signal' do
     #pod 'JSQMessagesViewController',   path: '../JSQMessagesViewController'
     pod 'PureLayout'
     pod 'Reachability'
-    #pod 'SignalServiceKit',           git: 'https://github.com/WhisperSystems/Signal-iOS.git'
     pod 'SignalServiceKit',           path: '.'
     pod 'SocketRocket',               :git => 'https://github.com/facebook/SocketRocket.git'
     target 'SignalTests' do

+ 1 - 1
Podfile.lock

@@ -161,6 +161,6 @@ SPEC CHECKSUMS:
   UnionFind: c33be5adb12983981d6e827ea94fc7f9e370f52d
   YapDatabase: cd911121580ff16675f65ad742a9eb0ab4d9e266
 
-PODFILE CHECKSUM: 354c63d01f78442b541ac178dff04045b94eee8d
+PODFILE CHECKSUM: 13b48854ce4b92e887ffb55d72029fe49b45a789
 
 COCOAPODS: 1.2.1

+ 1 - 1
SignalServiceKit/Example/TSKitiOSTestApp/Podfile

@@ -4,7 +4,7 @@ source 'https://github.com/CocoaPods/Specs.git'
 target 'TSKitiOSTestApp' do
   pod 'SocketRocket', git: 'https://github.com/facebook/SocketRocket.git'
   pod 'AxolotlKit',  git: 'https://github.com/WhisperSystems/SignalProtocolKit.git'
-  pod 'SignalServiceKit', :path => '../../SignalServiceKit.podspec'
+  pod 'SignalServiceKit', :path => '../../../SignalServiceKit.podspec'
 
   target 'TSKitiOSTestAppTests' do
      inherit! :search_paths

+ 4 - 4
SignalServiceKit/Example/TSKitiOSTestApp/Podfile.lock

@@ -104,14 +104,14 @@ PODS:
 
 DEPENDENCIES:
   - AxolotlKit (from `https://github.com/WhisperSystems/SignalProtocolKit.git`)
-  - SignalServiceKit (from `../../SignalServiceKit.podspec`)
+  - SignalServiceKit (from `../../../SignalServiceKit.podspec`)
   - SocketRocket (from `https://github.com/facebook/SocketRocket.git`)
 
 EXTERNAL SOURCES:
   AxolotlKit:
     :git: https://github.com/WhisperSystems/SignalProtocolKit.git
   SignalServiceKit:
-    :path: ../../SignalServiceKit.podspec
+    :path: "../../../SignalServiceKit.podspec"
   SocketRocket:
     :git: https://github.com/facebook/SocketRocket.git
 
@@ -133,13 +133,13 @@ SPEC CHECKSUMS:
   Mantle: 2fa750afa478cd625a94230fbf1c13462f29395b
   ProtocolBuffers: d509225eb2ea43d9582a59e94348fcf86e2abd65
   SAMKeychain: 1865333198217411f35327e8da61b43de79b635b
-  SignalServiceKit: 2ad8d86da055e24ac3ea0354ec1d4b13251af28f
+  SignalServiceKit: 0fa1aa668c13b51bca399ce970bc1f1d9297184b
   SocketRocket: dbb1554b8fc288ef8ef370d6285aeca7361be31e
   SQLCipher: 43d12c0eb9c57fb438749618fc3ce0065509a559
   TwistedOakCollapsingFutures: f359b90f203e9ab13dfb92c9ff41842a7fe1cd0c
   UnionFind: c33be5adb12983981d6e827ea94fc7f9e370f52d
   YapDatabase: cd911121580ff16675f65ad742a9eb0ab4d9e266
 
-PODFILE CHECKSUM: a0f4507b6b4e6f9da3250901b06187a67236e083
+PODFILE CHECKSUM: 5bfff8cb73ff80b5e5c383fda4dca6aeff2fa8d3
 
 COCOAPODS: 1.2.1

+ 4 - 21
SignalServiceKit/Makefile

@@ -4,19 +4,16 @@ SHELL=/bin/bash -o pipefail -o errexit
 WORKING_DIR = Example/TSKitiOSTestApp
 SCHEME = TSKitiOSTestApp
 
-DEVICE_UUID:=$(shell xcrun instruments -s | grep -o "iPhone 6 (9.3) \[.*\]" | grep -o "\[.*\]" | sed "s/^\[\(.*\)\]$$/\1/")
-BUILD_DESTINATION = platform=iOS Simulator,id=${DEVICE_UUID}
 XCODE_BUILD = xcrun xcodebuild -workspace $(SCHEME).xcworkspace -scheme $(SCHEME) -sdk iphonesimulator
 
 .PHONY: build test retest clean
 
 default: test
+ci: test
 
-test: pod_install retest
+test: dependencies test
 
-scan_test: pod_install scan
-
-pod_install:
+dependencies:
 	cd $(WORKING_DIR) && \
 		bundle exec pod install
 
@@ -24,13 +21,7 @@ build: pod_install
 	cd $(WORKING_DIR) && \
 		$(XCODE_BUILD) build | xcpretty
 
-retest: optional_early_start_simulator
-	cd $(WORKING_DIR) && \
-		$(XCODE_BUILD) \
-			-destination '${BUILD_DESTINATION}' \
-			test | xcpretty
-
-scan:
+test:
 	bundle exec fastlane scan
 
 clean:
@@ -38,11 +29,3 @@ clean:
 		$(XCODE_BUILD) \
 			clean | xcpretty
 
-optional_early_start_simulator:
-ifdef EARLY_START_SIMULATOR
-		echo "Waiting for simulator to start to help with testing timeouts" &&\
-		xcrun instruments -w '${DEVICE_UUID}' || true # xcrun can return irrelevant non-zeroes.
-else
-		echo "Not waiting for simulator."
-endif
-