Skip to content

Commit a83a380

Browse files
richardlaugibfahn
authored andcommitted
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: #1131 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Gibson Fahnestock <[email protected]> Reviewed-By: Michael Dawson <[email protected]>
1 parent 8a76714 commit a83a380

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

test/test-configure-python.js

+5-3
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ var gyp = require('../lib/node-gyp')
66
var requireInject = require('require-inject')
77
var configure = requireInject('../lib/configure', {
88
'graceful-fs': {
9+
'openSync': function (file, mode) { return 0; },
10+
'closeSync': function (fd) { },
911
'writeFile': function (file, data, cb) { cb() },
1012
'stat': function (file, cb) { cb(null, {}) }
1113
}
@@ -26,7 +28,7 @@ test('configure PYTHONPATH with no existing env', function (t) {
2628
t.equal(process.env.PYTHONPATH, EXPECTED_PYPATH)
2729
return SPAWN_RESULT
2830
}
29-
configure(prog, [])
31+
configure(prog, [], t.fail)
3032
})
3133

3234
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) {
4648

4749
return SPAWN_RESULT
4850
}
49-
configure(prog, [])
51+
configure(prog, [], t.fail)
5052
})
5153

5254
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) {
6870

6971
return SPAWN_RESULT
7072
}
71-
configure(prog, [])
73+
configure(prog, [], t.fail)
7274
})

0 commit comments

Comments
 (0)