Skip to content

Commit

Permalink
test: fix addons/dlopen-ping-pong for npm 7.0.1
Browse files Browse the repository at this point in the history
This partially reverts c87641a as node-gyp no longer
puts shared objects in an inconsistent location.
  • Loading branch information
MylesBorins committed Oct 16, 2020
1 parent 12929bf commit d803f4b
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions test/addons/dlopen-ping-pong/test.js
Expand Up @@ -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
Expand Down

0 comments on commit d803f4b

Please sign in to comment.