mirror of
https://github.com/zebrajr/node.git
synced 2026-01-15 12:15:26 +00:00
test: fix addons/dlopen-ping-pong for npm 7.0.1
This partially reverts c87641aa97 as node-gyp no longer
puts shared objects in an inconsistent location.
PR-URL: https://github.com/nodejs/node/pull/35667
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
This commit is contained in:
committed by
Node.js GitHub Bot
parent
5b9593f727
commit
089d654dd8
@@ -12,16 +12,8 @@ const bindingPath = require.resolve(`./build/${common.buildType}/binding`);
|
||||
console.log('process.dlopen:', bindingPath);
|
||||
process.dlopen(module, bindingPath,
|
||||
os.constants.dlopen.RTLD_NOW | os.constants.dlopen.RTLD_GLOBAL);
|
||||
|
||||
let pingSOPath = `${path.dirname(bindingPath)}/lib.target/ping.so`;
|
||||
|
||||
if (common.isOSX) {
|
||||
pingSOPath = `${path.dirname(bindingPath)}/ping.so`;
|
||||
}
|
||||
|
||||
console.log('module.exports.load:', pingSOPath);
|
||||
module.exports.load(pingSOPath);
|
||||
|
||||
console.log('module.exports.load:', `${path.dirname(bindingPath)}/ping.so`);
|
||||
module.exports.load(`${path.dirname(bindingPath)}/ping.so`);
|
||||
assert.strictEqual(module.exports.ping(), 'pong');
|
||||
|
||||
// Check that after the addon is loaded with
|
||||
|
||||
Reference in New Issue
Block a user