mirror of https://github.com/nodejs/node.git
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: https://github.com/nodejs/node/pull/56791 Refs: https://github.com/nodejs/node/pull/55275 Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Daniel Lemire <daniel@lemire.me> Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
This commit is contained in:
parent
267f17d5f6
commit
31f98d7ccd
29
node.gyp
29
node.gyp
|
@ -401,26 +401,8 @@
|
|||
],
|
||||
'node_cctest_sources': [
|
||||
'src/node_snapshot_stub.cc',
|
||||
'test/cctest/node_test_fixture.cc',
|
||||
'test/cctest/node_test_fixture.h',
|
||||
'test/cctest/test_aliased_buffer.cc',
|
||||
'test/cctest/test_base64.cc',
|
||||
'test/cctest/test_base_object_ptr.cc',
|
||||
'test/cctest/test_cppgc.cc',
|
||||
'test/cctest/test_node_postmortem_metadata.cc',
|
||||
'test/cctest/test_node_task_runner.cc',
|
||||
'test/cctest/test_environment.cc',
|
||||
'test/cctest/test_linked_binding.cc',
|
||||
'test/cctest/test_node_api.cc',
|
||||
'test/cctest/test_path.cc',
|
||||
'test/cctest/test_per_process.cc',
|
||||
'test/cctest/test_platform.cc',
|
||||
'test/cctest/test_report.cc',
|
||||
'test/cctest/test_json_utils.cc',
|
||||
'test/cctest/test_sockaddr.cc',
|
||||
'test/cctest/test_traced_value.cc',
|
||||
'test/cctest/test_util.cc',
|
||||
'test/cctest/test_dataqueue.cc',
|
||||
'<!@(<(python) tools/search_files.py . test/cctest cc)',
|
||||
'<!@(<(python) tools/search_files.py . test/cctest h)',
|
||||
],
|
||||
'node_cctest_openssl_sources': [
|
||||
'test/cctest/test_crypto_clienthello.cc',
|
||||
|
@ -1213,13 +1195,13 @@
|
|||
'dependencies': [
|
||||
'deps/ncrypto/ncrypto.gyp:ncrypto',
|
||||
],
|
||||
'sources': [ '<@(node_cctest_openssl_sources)' ],
|
||||
}, {
|
||||
'sources!': [ '<@(node_cctest_openssl_sources)' ],
|
||||
}],
|
||||
['v8_enable_inspector==1', {
|
||||
'defines': [
|
||||
'HAVE_INSPECTOR=1',
|
||||
],
|
||||
'sources': [ '<@(node_cctest_inspector_sources)' ],
|
||||
'include_dirs': [
|
||||
# TODO(legendecas): make node_inspector.gypi a dependable target.
|
||||
'<(SHARED_INTERMEDIATE_DIR)', # for inspector
|
||||
|
@ -1231,7 +1213,8 @@
|
|||
}, {
|
||||
'defines': [
|
||||
'HAVE_INSPECTOR=0',
|
||||
]
|
||||
],
|
||||
'sources!': [ '<@(node_cctest_inspector_sources)' ],
|
||||
}],
|
||||
['OS=="solaris"', {
|
||||
'ldflags': [ '-I<(SHARED_INTERMEDIATE_DIR)' ]
|
||||
|
|
|
@ -14,6 +14,9 @@ if __name__ == '__main__':
|
|||
try:
|
||||
files = SearchFiles(*sys.argv[2:])
|
||||
files = [ os.path.relpath(x, sys.argv[1]) for x in files ]
|
||||
# Apply the same transform in SearchFiles after relpath
|
||||
if sys.platform == 'win32':
|
||||
files = [ x.replace('\\', '/') for x in files ]
|
||||
print('\n'.join(files))
|
||||
except Exception as e:
|
||||
print(str(e))
|
||||
|
|
Loading…
Reference in New Issue