-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enable unit test execution from 'npm test'
- Loading branch information
Showing
10 changed files
with
342 additions
and
88 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
113 changes: 113 additions & 0 deletions
113
LoopBack.xcodeproj/xcshareddata/xcschemes/LoopBackOSX.xcscheme
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,113 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<Scheme | ||
LastUpgradeVersion = "0630" | ||
version = "1.3"> | ||
<BuildAction | ||
parallelizeBuildables = "YES" | ||
buildImplicitDependencies = "YES"> | ||
<BuildActionEntries> | ||
<BuildActionEntry | ||
buildForTesting = "YES" | ||
buildForRunning = "YES" | ||
buildForProfiling = "YES" | ||
buildForArchiving = "YES" | ||
buildForAnalyzing = "YES"> | ||
<BuildableReference | ||
BuildableIdentifier = "primary" | ||
BlueprintIdentifier = "E4C9BC2E1AD6F9C800D70046" | ||
BuildableName = "LoopBack.framework" | ||
BlueprintName = "LoopBackOSX" | ||
ReferencedContainer = "container:LoopBack.xcodeproj"> | ||
</BuildableReference> | ||
</BuildActionEntry> | ||
<BuildActionEntry | ||
buildForTesting = "YES" | ||
buildForRunning = "YES" | ||
buildForProfiling = "NO" | ||
buildForArchiving = "NO" | ||
buildForAnalyzing = "YES"> | ||
<BuildableReference | ||
BuildableIdentifier = "primary" | ||
BlueprintIdentifier = "E4C9BC381AD6F9C800D70046" | ||
BuildableName = "LoopBackOSXTests.xctest" | ||
BlueprintName = "LoopBackOSXTests" | ||
ReferencedContainer = "container:LoopBack.xcodeproj"> | ||
</BuildableReference> | ||
</BuildActionEntry> | ||
</BuildActionEntries> | ||
</BuildAction> | ||
<TestAction | ||
buildConfiguration = "Debug" | ||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" | ||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" | ||
shouldUseLaunchSchemeArgsEnv = "YES"> | ||
<Testables> | ||
<TestableReference | ||
skipped = "NO"> | ||
<BuildableReference | ||
BuildableIdentifier = "primary" | ||
BlueprintIdentifier = "E4C9BC381AD6F9C800D70046" | ||
BuildableName = "LoopBackOSXTests.xctest" | ||
BlueprintName = "LoopBackOSXTests" | ||
ReferencedContainer = "container:LoopBack.xcodeproj"> | ||
</BuildableReference> | ||
</TestableReference> | ||
</Testables> | ||
<MacroExpansion> | ||
<BuildableReference | ||
BuildableIdentifier = "primary" | ||
BlueprintIdentifier = "E4C9BC2E1AD6F9C800D70046" | ||
BuildableName = "LoopBack.framework" | ||
BlueprintName = "LoopBackOSX" | ||
ReferencedContainer = "container:LoopBack.xcodeproj"> | ||
</BuildableReference> | ||
</MacroExpansion> | ||
<AdditionalOptions> | ||
</AdditionalOptions> | ||
</TestAction> | ||
<LaunchAction | ||
buildConfiguration = "Debug" | ||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" | ||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" | ||
launchStyle = "0" | ||
useCustomWorkingDirectory = "NO" | ||
ignoresPersistentStateOnLaunch = "NO" | ||
debugDocumentVersioning = "YES" | ||
debugServiceExtension = "internal" | ||
allowLocationSimulation = "YES"> | ||
<MacroExpansion> | ||
<BuildableReference | ||
BuildableIdentifier = "primary" | ||
BlueprintIdentifier = "E4C9BC2E1AD6F9C800D70046" | ||
BuildableName = "LoopBack.framework" | ||
BlueprintName = "LoopBackOSX" | ||
ReferencedContainer = "container:LoopBack.xcodeproj"> | ||
</BuildableReference> | ||
</MacroExpansion> | ||
<AdditionalOptions> | ||
</AdditionalOptions> | ||
</LaunchAction> | ||
<ProfileAction | ||
buildConfiguration = "Release" | ||
shouldUseLaunchSchemeArgsEnv = "YES" | ||
savedToolIdentifier = "" | ||
useCustomWorkingDirectory = "NO" | ||
debugDocumentVersioning = "YES"> | ||
<MacroExpansion> | ||
<BuildableReference | ||
BuildableIdentifier = "primary" | ||
BlueprintIdentifier = "E4C9BC2E1AD6F9C800D70046" | ||
BuildableName = "LoopBack.framework" | ||
BlueprintName = "LoopBackOSX" | ||
ReferencedContainer = "container:LoopBack.xcodeproj"> | ||
</BuildableReference> | ||
</MacroExpansion> | ||
</ProfileAction> | ||
<AnalyzeAction | ||
buildConfiguration = "Debug"> | ||
</AnalyzeAction> | ||
<ArchiveAction | ||
buildConfiguration = "Release" | ||
revealArchiveInOrganizer = "YES"> | ||
</ArchiveAction> | ||
</Scheme> |
99 changes: 99 additions & 0 deletions
99
LoopBack.xcodeproj/xcshareddata/xcschemes/SLRemotingTests.xcscheme
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<Scheme | ||
LastUpgradeVersion = "0620" | ||
version = "1.3"> | ||
<BuildAction | ||
parallelizeBuildables = "YES" | ||
buildImplicitDependencies = "YES"> | ||
<BuildActionEntries> | ||
<BuildActionEntry | ||
buildForTesting = "YES" | ||
buildForRunning = "YES" | ||
buildForProfiling = "NO" | ||
buildForArchiving = "NO" | ||
buildForAnalyzing = "YES"> | ||
<BuildableReference | ||
BuildableIdentifier = "primary" | ||
BlueprintIdentifier = "47D47190196DF4A1002E2358" | ||
BuildableName = "SLRemotingTests.xctest" | ||
BlueprintName = "SLRemotingTests" | ||
ReferencedContainer = "container:LoopBack.xcodeproj"> | ||
</BuildableReference> | ||
</BuildActionEntry> | ||
</BuildActionEntries> | ||
</BuildAction> | ||
<TestAction | ||
buildConfiguration = "Debug" | ||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" | ||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" | ||
shouldUseLaunchSchemeArgsEnv = "YES"> | ||
<Testables> | ||
<TestableReference | ||
skipped = "NO"> | ||
<BuildableReference | ||
BuildableIdentifier = "primary" | ||
BlueprintIdentifier = "47D47190196DF4A1002E2358" | ||
BuildableName = "SLRemotingTests.xctest" | ||
BlueprintName = "SLRemotingTests" | ||
ReferencedContainer = "container:LoopBack.xcodeproj"> | ||
</BuildableReference> | ||
</TestableReference> | ||
</Testables> | ||
<MacroExpansion> | ||
<BuildableReference | ||
BuildableIdentifier = "primary" | ||
BlueprintIdentifier = "47D47190196DF4A1002E2358" | ||
BuildableName = "SLRemotingTests.xctest" | ||
BlueprintName = "SLRemotingTests" | ||
ReferencedContainer = "container:LoopBack.xcodeproj"> | ||
</BuildableReference> | ||
</MacroExpansion> | ||
<AdditionalOptions> | ||
</AdditionalOptions> | ||
</TestAction> | ||
<LaunchAction | ||
buildConfiguration = "Debug" | ||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" | ||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" | ||
launchStyle = "0" | ||
useCustomWorkingDirectory = "NO" | ||
ignoresPersistentStateOnLaunch = "NO" | ||
debugDocumentVersioning = "YES" | ||
debugServiceExtension = "internal" | ||
allowLocationSimulation = "YES"> | ||
<MacroExpansion> | ||
<BuildableReference | ||
BuildableIdentifier = "primary" | ||
BlueprintIdentifier = "47D47190196DF4A1002E2358" | ||
BuildableName = "SLRemotingTests.xctest" | ||
BlueprintName = "SLRemotingTests" | ||
ReferencedContainer = "container:LoopBack.xcodeproj"> | ||
</BuildableReference> | ||
</MacroExpansion> | ||
<AdditionalOptions> | ||
</AdditionalOptions> | ||
</LaunchAction> | ||
<ProfileAction | ||
buildConfiguration = "Release" | ||
shouldUseLaunchSchemeArgsEnv = "YES" | ||
savedToolIdentifier = "" | ||
useCustomWorkingDirectory = "NO" | ||
debugDocumentVersioning = "YES"> | ||
<MacroExpansion> | ||
<BuildableReference | ||
BuildableIdentifier = "primary" | ||
BlueprintIdentifier = "47D47190196DF4A1002E2358" | ||
BuildableName = "SLRemotingTests.xctest" | ||
BlueprintName = "SLRemotingTests" | ||
ReferencedContainer = "container:LoopBack.xcodeproj"> | ||
</BuildableReference> | ||
</MacroExpansion> | ||
</ProfileAction> | ||
<AnalyzeAction | ||
buildConfiguration = "Debug"> | ||
</AnalyzeAction> | ||
<ArchiveAction | ||
buildConfiguration = "Release" | ||
revealArchiveInOrganizer = "YES"> | ||
</ArchiveAction> | ||
</Scheme> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
#!/bin/bash | ||
set -ex | ||
trap 'kill $(jobs -p)' EXIT | ||
|
||
# record the build environment | ||
xcodebuild -version | ||
xcodebuild -showsdks | ||
instruments -s devices | ||
|
||
# build for iOS | ||
xcodebuild \ | ||
-verbose \ | ||
-project LoopBack.xcodeproj \ | ||
-scheme LoopBackFramework \ | ||
-sdk iphoneos \ | ||
-configuration Debug \ | ||
ONLY_ACTIVE_ARCH=NO \ | ||
${XCODEBUILD_ARGS} \ | ||
clean build | ||
|
||
# prepare for running test servers | ||
npm install | ||
|
||
# run the test servers | ||
node LoopBackTests/server/index.js & | ||
node SLRemotingTests/server/index.js & | ||
|
||
# run the unit tests on iPhone simulator | ||
xcodebuild \ | ||
-verbose \ | ||
-project LoopBack.xcodeproj \ | ||
-scheme LoopBack \ | ||
-sdk iphonesimulator \ | ||
-destination 'platform=iOS Simulator,name=iPhone Retina (4-inch 64-bit),OS=latest' \ | ||
${XCODEBUILD_ARGS} \ | ||
test | ||
|
||
# build for OS X | ||
if [[ -n "${JENKINS_HOME}" ]]; then | ||
# NOTE: the unit-tests fail to run against OS X on the CI, so it is temporarily skipped. | ||
# See https://github.com/strongloop/loopback-sdk-ios/pull/79 for details. | ||
OSX_BUILD_TARGET=build | ||
else | ||
OSX_BUILD_TARGET=test | ||
fi | ||
|
||
xcodebuild \ | ||
-verbose \ | ||
-project LoopBack.xcodeproj \ | ||
-scheme LoopBackOSX \ | ||
-sdk macosx \ | ||
${XCODEBUILD_ARGS} \ | ||
clean ${OSX_BUILD_TARGET} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters