Permalink
Browse files

[gyp] use node-gyp

  • Loading branch information...
1 parent 48b18ed commit ec272279b8d1b0601b397acb3dc18a84357e27dd @agnat committed May 2, 2012
Showing with 20 additions and 19 deletions.
  1. +8 −8 Makefile
  2. 0 dns_sd.gyp → binding.gyp
  3. +1 −1 lib/dns_sd.js
  4. +1 −2 package.json
  5. +1 −4 tests/test_dns_sd.js
  6. +5 −0 utils/docpack
  7. +1 −1 utils/lib/mdns_test.js
  8. +2 −2 utils/lib/ncov.js
  9. +1 −1 wscript
View
@@ -1,7 +1,7 @@
BUILDTYPE ?= Release
-GCOV_OUT = out/reports/coverage/cpp
-NCOV_OUT = out/reports/coverage
+GCOV_OUT = build/reports/coverage/cpp
+NCOV_OUT = build/reports/coverage
TEST_OPTIONS=
@@ -12,7 +12,7 @@ endif
all: bindings
bindings:
- $(MAKE) -C out BUILDTYPE=$(BUILDTYPE)
+ $(MAKE) -C build BUILDTYPE=$(BUILDTYPE)
test: bindings
node --expose_gc utils/testrun $(TEST_OPTIONS)
@@ -21,17 +21,17 @@ coverage:
$(MAKE) coverage_run BUILDTYPE=Coverage
coverage_build:
- $(MAKE) -C out BUILDTYPE=Coverage
+ $(MAKE) -C build BUILDTYPE=Coverage
jscoverage:
- jscoverage -v --no-highlight lib/ out/Coverage/lib
+ jscoverage -v --no-highlight lib/ build/Coverage/lib
coverage_run: coverage_build jscoverage
- lcov -d out/$(BUILDTYPE)/obj.target/dns_sd_bindings/src --zerocounters
+ lcov -d build/$(BUILDTYPE)/obj.target/dns_sd_bindings/src --zerocounters
mkdir -p $(GCOV_OUT)/html;
NCOV_OUT=$(NCOV_OUT) node --expose_gc utils/testrun $(TEST_OPTIONS)
- lcov --base-directory out \
- --directory out/$(BUILDTYPE)/obj.target/dns_sd_bindings/src \
+ lcov --base-directory build \
+ --directory build/$(BUILDTYPE)/obj.target/dns_sd_bindings/src \
--output-file $(GCOV_OUT)/testrun_all.info \
--capture
utils/ncov
File renamed without changes.
View
@@ -17,7 +17,7 @@ function product(type) {
if (type === 'Coverage') {
return path.join('..', 'dns_sd_bindings')
}
- return path.join('..', 'out', type, 'dns_sd_bindings')
+ return path.join('..', 'build', type, 'dns_sd_bindings')
}
try {
View
@@ -4,9 +4,8 @@
, "main": "./lib/mdns.js"
, "scripts":
{ "test": "utils/testrun"
- , "preinstall": "node-waf configure build"
}
-, "keywords": ["mdns", "zeroconf", "bonjour", "dns_sd", "mDNSResponder"]
+, "keywords": ["zeroconf", "bonjour", "dns_sd", "mDNSResponder"]
, "devDependencies":
{ "ejs": "*"
, "less": "*"
View
@@ -11,9 +11,6 @@ exports['DNSServiceRef'] = function(t) {
var sr = new dns_sd.DNSServiceRef();
- // coverage: uninitialized serviceRef to cover more destructor branches
- var uninitialized_ref = new dns_sd.DNSServiceRef();
-
t.ok(sr,
'DNSServiceRef must be truthy');
t.strictEqual(sr.fd, -1,
@@ -782,7 +779,7 @@ exports['TXTRecordRef'] = function(t) {
dns_sd.TXTRecordSetValue(new dns_sd.TXTRecordRef(), {not_a_string: true}, null)
}, 'TXTRecordSetValue() must throw when called with non TXTRecordRef object');
- // XXX ahahi doesn't like these. replace with real tests when txt records are
+ // XXX avahi doesn't like these. replace with real tests when txt records are
// implemented in javascript
try {
dns_sd.TXTRecordSetValue(new dns_sd.TXTRecordRef(), 'foo', null);
View
@@ -35,6 +35,7 @@ var prepare = [ [ mkdirp, outd ]
]
, tasks = [ [ ejs2textile, docd + '/README.ejs', rootd + '/README.textile']
, [ render_pages, docd + '/pages/*.ejs']
+ , [ render_build_status_pages ]
, [ render_stylesheets, docd + '/pages/stylesheets/*.less']
, [ ncp, docd + '/pages/images', outd + '/images']
, [ ncp, docd + '/pages/scripts', outd + '/scripts']
@@ -82,6 +83,10 @@ function render_page(source, options, cb) {
piped_comand('redcloth', ejs.render(source, locals), layout_page);
}
+function render_build_status_pages(cb) {
+ cb()
+}
+
function piped_comand(comand, input, args, cb) {
if ( ! cb ) {
cb = args;
View
@@ -5,7 +5,7 @@ var path = require('path')
exports.require = function _require(what) {
if (process.env.npm_config_coverage || process.env.BUILDTYPE === 'Coverage') {
- return require(path.join('../../out/Coverage/lib/' + what))
+ return require(path.join('../../build/Coverage/lib/' + what))
}
return require('../../lib/' + what)
}
View
@@ -24,7 +24,7 @@ filter = function(f) { return filefilter.match(f) };
var chain = slide.chain
, meta = {}
- , outd = path.join(rootd, 'out')
+ , outd = path.join(rootd, 'build')
, pagedir = path.join(outd, 'pages')
, docd = path.join(rootd, 'doc')
, lcov_info_file = path.join(outd, 'reports', 'coverage', 'cpp', 'testrun_all.info')
@@ -49,7 +49,7 @@ chain( [ [ load_prerequisites, meta, prerequisites]
function save_json(report, file, cb) {
fs.writeFile(file, JSON.stringify(report, null, 2), function(err) {
console.log('================================================================================');
- console.log('testrun c++ coverage report saved to', file.replace(/.*\/(out\/.*)/, "$1"));
+ console.log('testrun c++ coverage report saved to', file.replace(/.*\/(build\/.*)/, "$1"));
console.log('================================================================================');
cb(err, report);
});
View
@@ -1,6 +1,6 @@
import os, shutil, subprocess, Scripting, Options
-out = 'out'
+out = 'build'
name = 'dns_sd_bindings'
def set_options(opt):

0 comments on commit ec27227

Please sign in to comment.