-
Notifications
You must be signed in to change notification settings - Fork 30k
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
Test failing in Debug mode #7860
Comments
I think the issue with that particular test is that it looks at the default_configuration whereas most other add-on tests simply load the the binding.node from a hard-coded path. Does this patch fix the issue for you? diff --git a/test/addons/repl-domain-abort/test.js b/test/addons/repl-domain-abort/test.js
index 5591b4f..057af4f 100644
--- a/test/addons/repl-domain-abort/test.js
+++ b/test/addons/repl-domain-abort/test.js
@@ -4,8 +4,7 @@ var assert = require('assert');
var repl = require('repl');
var stream = require('stream');
var path = require('path');
-var buildType = process.config.target_defaults.default_configuration;
-var buildPath = path.join(__dirname, 'build', buildType, 'binding');
+var buildPath = path.join(__dirname, 'build/Release/binding');
// On Windows, escape backslashes in the path before passing it to REPL.
if (common.isWindows)
buildPath = buildPath.replace(/\\/g, '/');
As mentioned, most tests use a hard-coded path but that is arguably wrong: node-gyp builds add-ons in debug mode when a) IOW, build/Debug is the correct path some of the time but the tests don't currently respect it. |
Thanks, that fixes it. I can't figure out how to generate build/Debug. I thought |
You have to pass |
I don't mean to high jack this issue but it is somewhat related. I had an issue getting the add-on tests to run again after configured with My issue was that when running the tests, the Should the removal of |
@danbev I'm having similar issues. Especially after switching back from older branches. |
@fhinkel Good to know that it is not just me :) I'll create a PR with a suggestion for handling. |
Currently the build-addons target is called as part of the test target, and it has test/addons/.buildstamp as a dependency. When running ./configure --debug and later switching/ updating branches you can be in a situation where the config.gypi files in the addons build directories are using an incorrect value for default_configuration. Currently this can happen and you will get test errors as there are a few test that depend on the value of default_configuration to be Release. Ben Noordhuis provided the solution for this by adding a dependency to config.gypi, which is generated when running ./configure, and will correct this situation. This commit is related to nodejs#7860. Please see the dicussion in that issue regarding the test using hard-coded paths.
Currently the build-addons target is called as part of the test target, and it has test/addons/.buildstamp as a dependency. When running ./configure --debug and later switching/ updating branches you can be in a situation where the config.gypi files in the addons build directories are using an incorrect value for default_configuration. Currently this can happen and you will get test errors as there are a few test that depend on the value of default_configuration to be Release. Ben Noordhuis provided the solution for this by adding a dependency to config.gypi, which is generated when running ./configure, and will correct this situation. This commit is related to #7860. Please see the dicussion in that issue regarding the test using hard-coded paths. PR-URL: #7893 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]>
Currently the build-addons target is called as part of the test target, and it has test/addons/.buildstamp as a dependency. When running ./configure --debug and later switching/ updating branches you can be in a situation where the config.gypi files in the addons build directories are using an incorrect value for default_configuration. Currently this can happen and you will get test errors as there are a few test that depend on the value of default_configuration to be Release. Ben Noordhuis provided the solution for this by adding a dependency to config.gypi, which is generated when running ./configure, and will correct this situation. This commit is related to #7860. Please see the dicussion in that issue regarding the test using hard-coded paths. PR-URL: #7893 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]>
Currently the build-addons target is called as part of the test target, and it has test/addons/.buildstamp as a dependency. When running ./configure --debug and later switching/ updating branches you can be in a situation where the config.gypi files in the addons build directories are using an incorrect value for default_configuration. Currently this can happen and you will get test errors as there are a few test that depend on the value of default_configuration to be Release. Ben Noordhuis provided the solution for this by adding a dependency to config.gypi, which is generated when running ./configure, and will correct this situation. This commit is related to nodejs#7860. Please see the dicussion in that issue regarding the test using hard-coded paths. Ref: nodejs#7893
Currently the build-addons target is called as part of the test target, and it has test/addons/.buildstamp as a dependency. When running ./configure --debug and later switching/ updating branches you can be in a situation where the config.gypi files in the addons build directories are using an incorrect value for default_configuration. Currently this can happen and you will get test errors as there are a few test that depend on the value of default_configuration to be Release. Ben Noordhuis provided the solution for this by adding a dependency to config.gypi, which is generated when running ./configure, and will correct this situation. This commit is related to #7860. Please see the dicussion in that issue regarding the test using hard-coded paths. Ref: #8905 PR-URL: #7893 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]>
Currently the build-addons target is called as part of the test target, and it has test/addons/.buildstamp as a dependency. When running ./configure --debug and later switching/ updating branches you can be in a situation where the config.gypi files in the addons build directories are using an incorrect value for default_configuration. Currently this can happen and you will get test errors as there are a few test that depend on the value of default_configuration to be Release. Ben Noordhuis provided the solution for this by adding a dependency to config.gypi, which is generated when running ./configure, and will correct this situation. This commit is related to #7860. Please see the dicussion in that issue regarding the test using hard-coded paths. Ref: #8905 PR-URL: #7893 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]>
Currently the build-addons target is called as part of the test target, and it has test/addons/.buildstamp as a dependency. When running ./configure --debug and later switching/ updating branches you can be in a situation where the config.gypi files in the addons build directories are using an incorrect value for default_configuration. Currently this can happen and you will get test errors as there are a few test that depend on the value of default_configuration to be Release. Ben Noordhuis provided the solution for this by adding a dependency to config.gypi, which is generated when running ./configure, and will correct this situation. This commit is related to #7860. Please see the dicussion in that issue regarding the test using hard-coded paths. Ref: #8905 PR-URL: #7893 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]>
Currently the build-addons target is called as part of the test target, and it has test/addons/.buildstamp as a dependency. When running ./configure --debug and later switching/ updating branches you can be in a situation where the config.gypi files in the addons build directories are using an incorrect value for default_configuration. Currently this can happen and you will get test errors as there are a few test that depend on the value of default_configuration to be Release. Ben Noordhuis provided the solution for this by adding a dependency to config.gypi, which is generated when running ./configure, and will correct this situation. This commit is related to #7860. Please see the dicussion in that issue regarding the test using hard-coded paths. Ref: #8905 PR-URL: #7893 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]>
@fhinkel Should this issue remain open? |
No 🤣 |
The test for addons/repl-domain-abort is failing, when configure was run in debug mode:
./configure --debug && make -j48 test
The assertion in the test
test/addons/repl-domain-abort/test.js
fails:With some debug statements, turns out the binding module cannot be found:
Error: Cannot find module '/usr/local/google/home/franzih/node/test/addons/repl-domain-abort/build/Debug/binding'
Should
build/Debug
be created or should the correct path bebuild/Release/binding
?The text was updated successfully, but these errors were encountered: