Skip to content

Commit 82ac335

Browse files
legendecasnodejs-github-bot
authored andcommitted
test: search cctest files
To prevent a new cctest missing from the `node.gyp`, search cctest files with tool `search_files.py` at configure time. PR-URL: #56791 Refs: #55275 Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Daniel Lemire <[email protected]> Reviewed-By: Richard Lau <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Luigi Pinca <[email protected]>
1 parent 3c105b6 commit 82ac335

File tree

2 files changed

+9
-23
lines changed

2 files changed

+9
-23
lines changed

node.gyp

+6-23
Original file line numberDiff line numberDiff line change
@@ -402,26 +402,8 @@
402402
],
403403
'node_cctest_sources': [
404404
'src/node_snapshot_stub.cc',
405-
'test/cctest/node_test_fixture.cc',
406-
'test/cctest/node_test_fixture.h',
407-
'test/cctest/test_aliased_buffer.cc',
408-
'test/cctest/test_base64.cc',
409-
'test/cctest/test_base_object_ptr.cc',
410-
'test/cctest/test_cppgc.cc',
411-
'test/cctest/test_node_postmortem_metadata.cc',
412-
'test/cctest/test_node_task_runner.cc',
413-
'test/cctest/test_environment.cc',
414-
'test/cctest/test_linked_binding.cc',
415-
'test/cctest/test_node_api.cc',
416-
'test/cctest/test_path.cc',
417-
'test/cctest/test_per_process.cc',
418-
'test/cctest/test_platform.cc',
419-
'test/cctest/test_report.cc',
420-
'test/cctest/test_json_utils.cc',
421-
'test/cctest/test_sockaddr.cc',
422-
'test/cctest/test_traced_value.cc',
423-
'test/cctest/test_util.cc',
424-
'test/cctest/test_dataqueue.cc',
405+
'<!@(<(python) tools/search_files.py . test/cctest cc)',
406+
'<!@(<(python) tools/search_files.py . test/cctest h)',
425407
],
426408
'node_cctest_openssl_sources': [
427409
'test/cctest/test_crypto_clienthello.cc',
@@ -1204,13 +1186,13 @@
12041186
'dependencies': [
12051187
'deps/ncrypto/ncrypto.gyp:ncrypto',
12061188
],
1207-
'sources': [ '<@(node_cctest_openssl_sources)' ],
1189+
}, {
1190+
'sources!': [ '<@(node_cctest_openssl_sources)' ],
12081191
}],
12091192
['v8_enable_inspector==1', {
12101193
'defines': [
12111194
'HAVE_INSPECTOR=1',
12121195
],
1213-
'sources': [ '<@(node_cctest_inspector_sources)' ],
12141196
'include_dirs': [
12151197
# TODO(legendecas): make node_inspector.gypi a dependable target.
12161198
'<(SHARED_INTERMEDIATE_DIR)', # for inspector
@@ -1222,7 +1204,8 @@
12221204
}, {
12231205
'defines': [
12241206
'HAVE_INSPECTOR=0',
1225-
]
1207+
],
1208+
'sources!': [ '<@(node_cctest_inspector_sources)' ],
12261209
}],
12271210
['OS=="solaris"', {
12281211
'ldflags': [ '-I<(SHARED_INTERMEDIATE_DIR)' ]

tools/search_files.py

+3
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414
try:
1515
files = SearchFiles(*sys.argv[2:])
1616
files = [ os.path.relpath(x, sys.argv[1]) for x in files ]
17+
# Apply the same transform in SearchFiles after relpath
18+
if sys.platform == 'win32':
19+
files = [ x.replace('\\', '/') for x in files ]
1720
print('\n'.join(files))
1821
except Exception as e:
1922
print(str(e))

0 commit comments

Comments
 (0)