Skip to content

Conversation

@lpinca
Copy link
Member

Add test_cannot_run_js/entry_point.c to
test/js-native-api/.gitignore.

Add `test_cannot_run_js/entry_point.c` to `test/js-native-api/.gitignore`.
@nodejs-github-botnodejs-github-bot added needs-ci PRs that need a full CI run. node-api Issues and PRs related to the Node-API. test Issues and PRs related to the tests. labels Jun 2, 2023
@lpinca
Copy link
MemberAuthor

See

{
"target_name": "copy_entry_point",
"type": "none",
"copies": [
{
"destination": ".",
"files": [ "../entry_point.c" ]
}
]
},
.

@targos
Copy link
Member

Do you know why it's copied instead of being referenced directly like in all other tests?

@lpinca
Copy link
MemberAuthor

I don't know. The test was created like this.

cc: @gabrielschulhof

@gabrielschulhof
Copy link
Contributor

gabrielschulhof commented Jun 2, 2023

@lpinca@targos somehow, having multiple targets in gyp that refer to a path above the root causes test failures. For example, when I tried to write the binding.gyp file as

{"target_defaults":{"sources": [ "../entry_point.c", ] }, "targets": [{"target_name": "test_cannot_run_js", "sources": [ "test_cannot_run_js.c" ], "defines": [ "NAPI_EXPERIMENTAL" ], },{"target_name": "test_pending_exception", "sources": [ "test_cannot_run_js.c" ], "defines": [ "NAPI_VERSION=8" ], } ]

I got this failure on https://ci.nodejs.org/job/node-test-commit-osx/52335/nodes=osx11-x64/console and a bunch of other platforms:

08:12:41 rm: ./Release/.deps/Release/obj.target/test_cannot_run_js/../entry_point.o.d.raw: No such file or directory 

I tried referring to "../entry_point.c" from each target, and that failed too.

In the end, I had no choice but use this convoluted copy-the-file approach.

@lpincalpinca added the request-ci Add this label to start a Jenkins CI on a PR. label Jun 3, 2023
@github-actionsgithub-actionsbot removed the request-ci Add this label to start a Jenkins CI on a PR. label Jun 3, 2023
@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@lpincalpinca added the commit-queue Add this label to land a pull request using GitHub Actions. label Jun 6, 2023
@nodejs-github-botnodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Jun 6, 2023
@nodejs-github-botnodejs-github-bot merged commit d15652e into nodejs:mainJun 6, 2023
@nodejs-github-bot
Copy link
Collaborator

Landed in d15652e

@lpincalpinca deleted the ignore/entry_point.c branch June 6, 2023 16:23
RafaelGSS pushed a commit that referenced this pull request Jul 3, 2023
Add `test_cannot_run_js/entry_point.c` to `test/js-native-api/.gitignore`. PR-URL: #48297 Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Gabriel Schulhof <[email protected]> Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Darshan Sen <[email protected]> Reviewed-By: LiviaMedeiros <[email protected]> Reviewed-By: James M Snell <[email protected]>
@RafaelGSSRafaelGSS mentioned this pull request Jul 3, 2023
Ceres6 pushed a commit to Ceres6/node that referenced this pull request Aug 14, 2023
Add `test_cannot_run_js/entry_point.c` to `test/js-native-api/.gitignore`. PR-URL: nodejs#48297 Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Gabriel Schulhof <[email protected]> Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Darshan Sen <[email protected]> Reviewed-By: LiviaMedeiros <[email protected]> Reviewed-By: James M Snell <[email protected]>
Ceres6 pushed a commit to Ceres6/node that referenced this pull request Aug 14, 2023
Add `test_cannot_run_js/entry_point.c` to `test/js-native-api/.gitignore`. PR-URL: nodejs#48297 Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Gabriel Schulhof <[email protected]> Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Darshan Sen <[email protected]> Reviewed-By: LiviaMedeiros <[email protected]> Reviewed-By: James M Snell <[email protected]>
ruyadorno pushed a commit that referenced this pull request Aug 29, 2023
Add `test_cannot_run_js/entry_point.c` to `test/js-native-api/.gitignore`. PR-URL: #48297 Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Gabriel Schulhof <[email protected]> Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: Darshan Sen <[email protected]> Reviewed-By: LiviaMedeiros <[email protected]> Reviewed-By: James M Snell <[email protected]>
@ruyadornoruyadorno mentioned this pull request Aug 29, 2023
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-ciPRs that need a full CI run.node-apiIssues and PRs related to the Node-API.testIssues and PRs related to the tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants

@lpinca@targos@gabrielschulhof@nodejs-github-bot@jasnell@tniessen@joyeecheung@RaisinTen@LiviaMedeiros