Skip to content

Commit

Permalink
standardize relative build path
Browse files Browse the repository at this point in the history
  • Loading branch information
Deepak Rajamohan committed Aug 27, 2021
1 parent e02e8a4 commit d836a47
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions test/common/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,12 @@ exports.mustNotCall = function(msg) {
};
};

exports.runTest = async function(test, buildType) {
exports.runTest = async function(test, buildType, relativeBuildPath = process.env.REL_BUILD_PATH || '') {
buildType = buildType || process.config.target_defaults.default_configuration || 'Release';

const bindings = [
`../build/${buildType}/binding.node`,
`../build/${buildType}/binding_noexcept.node`,
`${relativeBuildPath}../build/${buildType}/binding.node`,
`${relativeBuildPath}../build/${buildType}/binding_noexcept.node`,
].map(it => require.resolve(it));

for (const item of bindings) {
Expand All @@ -89,12 +89,12 @@ exports.runTest = async function(test, buildType) {
}
}

exports.runTestWithBindingPath = async function(test, buildType) {
exports.runTestWithBindingPath = async function(test, buildType, relativeBuildPath = process.env.REL_BUILD_PATH || '') {
buildType = buildType || process.config.target_defaults.default_configuration || 'Release';

const bindings = [
`../build/${buildType}/binding.node`,
`../build/${buildType}/binding_noexcept.node`,
`${relativeBuildPath}../build/${buildType}/binding.node`,
`${relativeBuildPath}../build/${buildType}/binding_noexcept.node`,
].map(it => require.resolve(it));

for (const item of bindings) {
Expand Down

0 comments on commit d836a47

Please sign in to comment.