Skip to content

Commit

Permalink
addons: build and test examples
Browse files Browse the repository at this point in the history
  • Loading branch information
indutny committed Jan 21, 2014
1 parent 2a0b619 commit 1442c1c
Show file tree
Hide file tree
Showing 10 changed files with 277 additions and 117 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ ipch/
/dist-osx
/npm.wxs
/tools/msvs/npm.wixobj
/test/addons/doc-*/
email.md
deps/v8-*
./node_modules
Expand Down
29 changes: 22 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -100,26 +100,38 @@ test/gc/node_modules/weak/build/Release/weakref.node:
--directory="$(shell pwd)/test/gc/node_modules/weak" \
--nodedir="$(shell pwd)"

build-addons:
@if [ ! -f node ]; then make all; fi
rm -rf test/addons/doc-*/
./node tools/doc/addon-verify.js
$(foreach dir, \
$(sort $(dir $(wildcard test/addons/*/*.gyp))), \
./node deps/npm/node_modules/node-gyp/bin/node-gyp rebuild \
--directory="$(shell pwd)/$(dir)" \
--nodedir="$(shell pwd)" && ) echo "build done"

test-gc: all test/gc/node_modules/weak/build/Release/weakref.node
$(PYTHON) tools/test.py --mode=release gc

test-all: all test/gc/node_modules/weak/build/Release/weakref.node
test-build: all build-addons

test-all: test-build test/gc/node_modules/weak/build/Release/weakref.node
$(PYTHON) tools/test.py --mode=debug,release
make test-npm

test-all-http1: all
test-all-http1: test-build
$(PYTHON) tools/test.py --mode=debug,release --use-http1

test-all-valgrind: all
test-all-valgrind: test-build
$(PYTHON) tools/test.py --mode=debug,release --valgrind

test-release: all
test-release: test-build
$(PYTHON) tools/test.py --mode=release

test-debug: all
test-debug: test-build
$(PYTHON) tools/test.py --mode=debug

test-message: all
test-message: test-build
$(PYTHON) tools/test.py message

test-simple: all
Expand All @@ -140,6 +152,9 @@ test-npm: node
test-npm-publish: node
npm_package_config_publishtest=true ./node deps/npm/test/run.js

test-addons: test-build
$(PYTHON) tools/test.py --mode=release addons

apidoc_sources = $(wildcard doc/api/*.markdown)
apidocs = $(addprefix out/,$(apidoc_sources:.markdown=.html)) \
$(addprefix out/,$(apidoc_sources:.markdown=.json))
Expand Down Expand Up @@ -418,4 +433,4 @@ cpplint:

lint: jslint cpplint

.PHONY: lint cpplint jslint bench clean docopen docclean doc dist distclean check uninstall install install-includes install-bin all staticlib dynamiclib test test-all website-upload pkg blog blogclean tar binary release-only bench-http-simple bench-idle bench-all bench bench-misc bench-array bench-buffer bench-net bench-http bench-fs bench-tls
.PHONY: lint cpplint jslint bench clean docopen docclean doc dist distclean check uninstall install install-includes install-bin all staticlib dynamiclib test test-all test-addons build-addons website-upload pkg blog blogclean tar binary release-only bench-http-simple bench-idle bench-all bench bench-misc bench-array bench-buffer bench-net bench-http bench-fs bench-tls
Loading

0 comments on commit 1442c1c

Please sign in to comment.