From d803f4b7a27ca7d281d19b3ca3379f06ffe1639a Mon Sep 17 00:00:00 2001 From: Myles Borins Date: Thu, 15 Oct 2020 22:22:57 -0400 Subject: [PATCH] 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. --- test/addons/dlopen-ping-pong/test.js | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/test/addons/dlopen-ping-pong/test.js b/test/addons/dlopen-ping-pong/test.js index eca516619a1484..c3461d8bd269c5 100644 --- a/test/addons/dlopen-ping-pong/test.js +++ b/test/addons/dlopen-ping-pong/test.js @@ -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