|
@ -1,20 +1,19 @@ |
|
|
common = require("../common"); |
|
|
common = require("../common"); |
|
|
assert = common.assert |
|
|
assert = common.assert; |
|
|
|
|
|
|
|
|
path = require("path"); |
|
|
path = require("path"); |
|
|
|
|
|
|
|
|
isDebug = (process.version.indexOf('debug') >= 0); |
|
|
isDebug = (process.version.indexOf('debug') >= 0); |
|
|
|
|
|
|
|
|
nodePath = path.join(__dirname, |
|
|
debugPath = path.normalize(path.join(__dirname, '..', '..', 'build', 'debug', 'node_g')); |
|
|
"..", |
|
|
defaultPath = path.normalize(path.join(__dirname, '..', '..', 'build', 'default', 'node')); |
|
|
"..", |
|
|
|
|
|
"build", |
|
|
|
|
|
isDebug ? 'debug' : 'default', |
|
|
|
|
|
isDebug ? 'node_g' : 'node'); |
|
|
|
|
|
nodePath = path.normalize(nodePath); |
|
|
|
|
|
|
|
|
|
|
|
console.log('nodePath: ' + nodePath); |
|
|
console.log('debugPath: ' + debugPath); |
|
|
|
|
|
console.log('defaultPath: ' + defaultPath); |
|
|
console.log('process.execPath: ' + process.execPath); |
|
|
console.log('process.execPath: ' + process.execPath); |
|
|
|
|
|
|
|
|
|
|
|
if (/node_g$/.test(process.execPath)) { |
|
|
|
|
|
assert.equal(debugPath, process.execPath); |
|
|
|
|
|
} else { |
|
|
|
|
|
assert.equal(defaultPath, process.execPath); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
assert.equal(nodePath, process.execPath); |
|
|
|
|
|