Skip to content

test: removed the usage of default_configuration.#1226

Closed
NickNaso wants to merge 5 commits intonodejs:mainfrom
NickNaso:issue1207
Closed

test: removed the usage of default_configuration.#1226
NickNaso wants to merge 5 commits intonodejs:mainfrom
NickNaso:issue1207

Conversation

@NickNaso
Copy link
Copy Markdown
Member

This PR remove the usage of process.config.target_defaults.default_configuration in all test suite.
A new function whichBuildType has been introduced and it has the reponsability to check which type of build node-gyp made so the test can refer to the right folders.

Refs:

Comment thread test/common/index.js
Comment thread test/common/index.js Outdated
if (await checkBuildType(buildTypes.Debug)) {
buildType = buildTypes.Debug;
let buildType;
const envBuildType = process.env.BUILD_TYPE;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const envBuildType = process.env.BUILD_TYPE;
const envBuildType = process.env.BUILD_TYPE || 'Release';

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion in meeting from @vmoroz how about process.env.NODE_API_BUILD_CONFIG

Copy link
Copy Markdown
Member

@mhdawson mhdawson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

mhdawson pushed a commit that referenced this pull request Dec 2, 2022
PR-URL: #1226
Reviewed-By: Michael Dawson <midawson@redhat.com
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
@mhdawson
Copy link
Copy Markdown
Member

mhdawson commented Dec 2, 2022

Landed as 10ad762

@mhdawson mhdawson closed this Dec 2, 2022
johnfrench3 pushed a commit to johnfrench3/node-addon-api-git that referenced this pull request Aug 11, 2023
PR-URL: nodejs/node-addon-api#1226
Reviewed-By: Michael Dawson <midawson@redhat.com
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants