mirror of
https://github.com/electron/node-gyp.git
synced 2025-08-15 12:58:19 +02:00
test: fix test/test-configure-python on AIX
On AIX, lib/configure.js attempts to locate node.exp via calls to fs.openSync() and fs.closeSync(). Add these functions to the mocked `graceful-fs` object in test/test-configure-python.js. PR-URL: https://github.com/nodejs/node-gyp/pull/1131 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
This commit is contained in:
parent
8a767145c9
commit
a83a3801fc
1 changed files with 5 additions and 3 deletions
|
@ -6,6 +6,8 @@ var gyp = require('../lib/node-gyp')
|
|||
var requireInject = require('require-inject')
|
||||
var configure = requireInject('../lib/configure', {
|
||||
'graceful-fs': {
|
||||
'openSync': function (file, mode) { return 0; },
|
||||
'closeSync': function (fd) { },
|
||||
'writeFile': function (file, data, cb) { cb() },
|
||||
'stat': function (file, cb) { cb(null, {}) }
|
||||
}
|
||||
|
@ -26,7 +28,7 @@ test('configure PYTHONPATH with no existing env', function (t) {
|
|||
t.equal(process.env.PYTHONPATH, EXPECTED_PYPATH)
|
||||
return SPAWN_RESULT
|
||||
}
|
||||
configure(prog, [])
|
||||
configure(prog, [], t.fail)
|
||||
})
|
||||
|
||||
test('configure PYTHONPATH with existing env of one dir', function (t) {
|
||||
|
@ -46,7 +48,7 @@ test('configure PYTHONPATH with existing env of one dir', function (t) {
|
|||
|
||||
return SPAWN_RESULT
|
||||
}
|
||||
configure(prog, [])
|
||||
configure(prog, [], t.fail)
|
||||
})
|
||||
|
||||
test('configure PYTHONPATH with existing env of multiple dirs', function (t) {
|
||||
|
@ -68,5 +70,5 @@ test('configure PYTHONPATH with existing env of multiple dirs', function (t) {
|
|||
|
||||
return SPAWN_RESULT
|
||||
}
|
||||
configure(prog, [])
|
||||
configure(prog, [], t.fail)
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue