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.

PR-URL: #35667
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com>
  • Loading branch information
MylesBorins authored and nodejs-github-bot committed Oct 18, 2020
1 parent 5b9593f commit 089d654
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions test/addons/dlopen-ping-pong/test.js
Original file line number Diff line number Diff line change
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 089d654

Please sign in to comment.