Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Commit

Permalink
gyp: fix test runner
Browse files Browse the repository at this point in the history
  • Loading branch information
ry committed Aug 6, 2011
1 parent a979ab9 commit 43d7cfc
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 5 deletions.
11 changes: 11 additions & 0 deletions gyp/all.gyp → build/node.gyp
Expand Up @@ -159,6 +159,17 @@
}, },


'actions': [ 'actions': [

# {
# 'action_name': 'test',
# 'inputs': [],
# 'outputs': [],
# 'action': [
# 'python',
# '../tools/test.py',
# ],
# },

{ {
'action_name': 'node_js2c', 'action_name': 'node_js2c',


Expand Down
6 changes: 3 additions & 3 deletions test/simple/test-executable-path.js
Expand Up @@ -26,15 +26,15 @@ var path = require('path');
var isDebug = (process.version.indexOf('debug') >= 0); var isDebug = (process.version.indexOf('debug') >= 0);


var debugPath = path.normalize(path.join(__dirname, '..', '..', var debugPath = path.normalize(path.join(__dirname, '..', '..',
'build', 'debug', 'node_g')); 'out', 'Debug', 'node'));
var defaultPath = path.normalize(path.join(__dirname, '..', '..', var defaultPath = path.normalize(path.join(__dirname, '..', '..',
'build', 'default', 'node')); 'out', 'Release', 'node'));


console.error('debugPath: ' + debugPath); console.error('debugPath: ' + debugPath);
console.error('defaultPath: ' + defaultPath); console.error('defaultPath: ' + defaultPath);
console.error('process.execPath: ' + process.execPath); console.error('process.execPath: ' + process.execPath);


if (/node_g$/.test(process.execPath)) { if (isDebug) {
assert.ok(process.execPath.indexOf(debugPath) == 0); assert.ok(process.execPath.indexOf(debugPath) == 0);
} else { } else {
assert.ok(process.execPath.indexOf(defaultPath) == 0); assert.ok(process.execPath.indexOf(defaultPath) == 0);
Expand Down
4 changes: 2 additions & 2 deletions tools/test.py
Expand Up @@ -663,9 +663,9 @@ def __init__(self, workspace, buildspace, verbose, vm, timeout, processor, suppr


def GetVm(self, mode): def GetVm(self, mode):
if mode == 'debug': if mode == 'debug':
name = 'build/debug/node_g' name = 'out/Debug/node'
else: else:
name = 'build/default/node' name = 'out/Release/node'


if utils.IsWindows() and not name.endswith('.exe'): if utils.IsWindows() and not name.endswith('.exe'):
name = os.path.abspath(name + '.exe') name = os.path.abspath(name + '.exe')
Expand Down

0 comments on commit 43d7cfc

Please sign in to comment.