[node] create npm test and npm run test-suite targets

This commit is contained in:
Konstantin Käfer
2015-10-21 10:58:58 +02:00
parent 9173589cc0
commit 6dd07c3f70
4 changed files with 116 additions and 1 deletions

View File

@@ -0,0 +1,7 @@
#!/usr/bin/env bash
CMD=$@
DIR="build/binding.xcodeproj/xcshareddata/xcschemes"
FILE="${DIR}/npm ${CMD}.xcscheme"
mkdir -p "${DIR}"
sed "s#{{NODE_PATH}}#$(dirname `which node`)#;s#{{BLUEPRINT_IDENTIFIER}}#$(hexdump -n 12 -v -e '/1 "%02X"' /dev/urandom)#;s#{{WORKING_DIRECTORY}}#$(pwd)#;s#{{NPM_COMMAND}}#${CMD}#" scripts/node/npm.xcscheme > "${FILE}"

102
scripts/node/npm.xcscheme Normal file
View File

@@ -0,0 +1,102 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0700"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "{{BLUEPRINT_IDENTIFIER}}"
BuildableName = "action_after_build"
BlueprintName = "action_after_build"
ReferencedContainer = "container:build/binding.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "YES"
customWorkingDirectory = "{{WORKING_DIRECTORY}}"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<PathRunnable
runnableDebuggingMode = "0"
FilePath = "{{NODE_PATH}}/node">
</PathRunnable>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "{{BLUEPRINT_IDENTIFIER}}"
BuildableName = "action_after_build"
BlueprintName = "action_after_build"
ReferencedContainer = "container:build/binding.xcodeproj">
</BuildableReference>
</MacroExpansion>
<CommandLineArguments>
<CommandLineArgument
argument = "{{NODE_PATH}}/npm"
isEnabled = "YES">
</CommandLineArgument>
<CommandLineArgument
argument = "{{NPM_COMMAND}}"
isEnabled = "YES">
</CommandLineArgument>
</CommandLineArguments>
<EnvironmentVariables>
<EnvironmentVariable
key = "PATH"
value = "{{NODE_PATH}}:$PATH"
isEnabled = "YES">
</EnvironmentVariable>
</EnvironmentVariables>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "{{BLUEPRINT_IDENTIFIER}}"
BuildableName = "action_after_build"
BlueprintName = "action_after_build"
ReferencedContainer = "container:build/binding.xcodeproj">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>