| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 5293abf commit d5f36c7
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -430,19 +430,21 @@ static void at_exit_callback(void* arg) { | |||
| 430 | 430 | } | |
| 431 | 431 | ``` | |
| 432 | 432 | ||
| 433 | - Next add the test to the `sources` in the `cctest` target in node.gyp: | ||
| 433 | + There is no need to list the file anywhere: `configure.py` collects every `.cc` | ||
| 434 | + and `.h` file under `test/cctest` into the `node_cctest_sources` variable that | ||
| 435 | + the `cctest` target in node.gyp builds. | ||
| 434 | 436 | ||
| 435 | - ```console | ||
| 436 | - 'sources': [ | ||
| 437 | - 'test/cctest/test_env.cc', | ||
| 438 | - ... | ||
| 439 | - ], | ||
| 440 | - ``` | ||
| 437 | + If the test can only be built when a given feature is enabled, add it to the | ||
| 438 | + matching variable in node.gyp so that it is excluded from the build otherwise: | ||
| 439 | + | ||
| 440 | + * `node_cctest_openssl_sources` for tests that require crypto support | ||
| 441 | + * `node_cctest_quic_sources` for tests that require QUIC support | ||
| 442 | + * `node_cctest_inspector_sources` for tests that require the inspector | ||
| 441 | 443 | ||
| 442 | - The only sources that should be included in the cctest target are | ||
| 443 | - actual test or helper source files. There might be a need to include specific | ||
| 444 | - object files that are compiled by the `node` target and this can be done by | ||
| 445 | - adding them to the `libraries` section in the cctest target. | ||
| 444 | + The only sources that should be placed in `test/cctest` are actual test or | ||
| 445 | + helper source files. There might be a need to include specific object files | ||
| 446 | + that are compiled by the `node` target and this can be done by adding them to | ||
| 447 | + the `libraries` section in the cctest target. | ||
| 446 | 448 | ||
| 447 | 449 | The test can be executed by running the `cctest` target: | |
| 448 | 450 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments