Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warning when running cctest of nodejs #46647

Closed
ArchanaWind opened this issue Feb 14, 2023 · 15 comments
Closed

Warning when running cctest of nodejs #46647

ArchanaWind opened this issue Feb 14, 2023 · 15 comments

Comments

@ArchanaWind
Copy link

Version

16.18.1 & 18.12.1

Platform

Linux, 15.0-58-generic #64-Ubuntu SMP Thu Jan 5 11:43:13 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

Subsystem

No response

What steps will reproduce the bug?

$ ./configure
$ make -j4 test

will get below warning:
[----------] 19 tests from EnvironmentTest
[ RUN ] EnvironmentTest.EnvironmentWithESMLoader
(node:15120) ExperimentalWarning: VM Modules is an experimental feature. This feature could change at any time
(Use node --trace-warnings ... to show where the warning was created)

$ node --trace-warnings ...
node:internal/modules/cjs/loader:988
throw err;
^

Error: Cannot find module '/opt/wr-test/...'
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:985:15)
at Function.Module._load (node:internal/modules/cjs/loader:833:27)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
at node:internal/main/run_main_module:22:47

{ code: 'MODULE_NOT_FOUND', requireStack: [] }

How often does it reproduce? Is there a required condition?

Always

What is the expected behavior?

No response

What do you see instead?

[----------] 19 tests from EnvironmentTest
[ RUN ] EnvironmentTest.EnvironmentWithESMLoader
(node:15120) ExperimentalWarning: VM Modules is an experimental feature. This feature could change at any time
(Use node --trace-warnings ... to show where the warning was created)

$ node --trace-warnings ...
node:internal/modules/cjs/loader:988
throw err;
^

Error: Cannot find module '/opt/wr-test/...'
at Function.Module._resolveFilename (node:internal/modules/cjs/loader:985:15)
at Function.Module._load (node:internal/modules/cjs/loader:833:27)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
at node:internal/main/run_main_module:22:47

{ code: 'MODULE_NOT_FOUND', requireStack: [] }

Additional information

No response

@bnoordhuis
Copy link
Member

I think you're interpreting node --trace-warnings ... a bit too literally. :-)

What exactly are you trying to do? cctest is part of node's test suite, it's not something you normally run standalone.

@ArchanaWind
Copy link
Author

I am trying to run Nodejs test suite

$make -s cctest

@bnoordhuis
Copy link
Member

Ah, okay. Just ignore the ExperimentalWarning, it's harmless.

cctest basically contains an embedded copy of node and node of course prints a warning when you use any of the --experimental-* flags.

@ArchanaWind
Copy link
Author

Thank you very much

@bnoordhuis
Copy link
Member

No problem. I'll go ahead and close the issue.

@bnoordhuis bnoordhuis closed this as not planned Won't fix, can't repro, duplicate, stale Feb 14, 2023
@ArchanaWind
Copy link
Author

ArchanaWind commented Feb 15, 2023

Hi Ben,

make -j4 test is just building the tests, Can you please tell where I can find the executable to run tests
Thanks in advance

@bnoordhuis
Copy link
Member

make test definitely runs the test suite, unless you have build errors.

@ArchanaWind
Copy link
Author

I could not able to see test results for "$make -s build-addons", can you please suggest where I can find test results for build-addons

@bnoordhuis
Copy link
Member

Try make test-addons

@ArchanaWind
Copy link
Author

ArchanaWind commented Apr 4, 2023

Hi Ben,

To build the tests, is node binary is required?

Thanks in advance

@bnoordhuis
Copy link
Member

addon-tests yes, cctests no. With the exception of cctests you're going to need node to actually run any tests though.

@ArchanaWind
Copy link
Author

Thank you for quick response
As I know to run tests, package binaries are required, My requirement is I just want to build tests not to run.
To do only build tests, Is Nodejs binary is required?

$make -j4 test -> will it do both build and run tests or will it do only build tests
my requirement is build tests on host machine and copy test binary to target and run on target

Short description on my task:
I am working on adding ptest support for Nodejs on Yocto environment
ptest is nothing but package test, I think you are aware of Yocto framework
Yocto framework is used to build customized linux distribution

The usual process ptest follows is build tests on host and run test binaries on target

@bnoordhuis
Copy link
Member

Tests from tests/addons, test/js-native-api and test/node-api need node-gyp to build and node-gyp in turn needs node.

Rule of thumb: needs node if it has a binding.gyp file.

@ArchanaWind
Copy link
Author

Got it, Thank you

@ArchanaWind
Copy link
Author

Hi @bnoordhuis ,
As part of package test can we exclude Jstest. Is it ok to add only addons, node-api and js-native-api to perform functionality test

Thanks in advance

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

No branches or pull requests

2 participants