diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2015-10-21 10:58:58 +0200 |
---|---|---|
committer | Konstantin Käfer <mail@kkaefer.com> | 2015-10-26 18:02:29 +0100 |
commit | 6dd07c3f70b7f72b778773a0b2a2a292a5f27f71 (patch) | |
tree | 31d6235ab22f29c5610a44a7d31f2282a69007d2 /scripts | |
parent | 9173589cc01c4460f3fc3e1a2c005807d677735c (diff) | |
download | qtlocation-mapboxgl-6dd07c3f70b7f72b778773a0b2a2a292a5f27f71.tar.gz |
[node] create `npm test` and `npm run test-suite` targets
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/main.mk | 2 | ||||
-rwxr-xr-x | scripts/node/create_npm_scheme.sh | 7 | ||||
-rw-r--r-- | scripts/node/npm.xcscheme | 102 |
3 files changed, 111 insertions, 0 deletions
diff --git a/scripts/main.mk b/scripts/main.mk index d902eebfaf..deba6db9d4 100644 --- a/scripts/main.mk +++ b/scripts/main.mk @@ -100,6 +100,8 @@ node/configure: node/xproj: $(QUIET)$(ENV) $(NODE_PRE_GYP) configure --clang -- \ $(GYP_FLAGS) -f xcode -Dlibuv_cflags= -Dlibuv_ldflags= -Dlibuv_static_libs= + $(QUIET)$(ENV) ./scripts/node/create_npm_scheme.sh test + $(QUIET)$(ENV) ./scripts/node/create_npm_scheme.sh run test-suite Makefile/node: Makefile/__project__ node/configure @printf "$(TEXT_BOLD)$(COLOR_GREEN)* Building target node...$(FORMAT_END)\n" diff --git a/scripts/node/create_npm_scheme.sh b/scripts/node/create_npm_scheme.sh new file mode 100755 index 0000000000..e5dae401c4 --- /dev/null +++ b/scripts/node/create_npm_scheme.sh @@ -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}"
\ No newline at end of file diff --git a/scripts/node/npm.xcscheme b/scripts/node/npm.xcscheme new file mode 100644 index 0000000000..e7ae4ece3d --- /dev/null +++ b/scripts/node/npm.xcscheme @@ -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> |