Skip to content

Commit 2b9558f

Browse files
committed
deps: add ngtcp2 test executables
The ngtcp2 test executables are useful for testing QUIC functionality during development. The intent is to be able to run our tests against both the client and server test executables.
1 parent fa74543 commit 2b9558f

215 files changed

Lines changed: 133773 additions & 20 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

deps/nghttp2/nghttp2.gyp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,17 @@
6767
'sources': [
6868
'<@(nghttp2_sources)',
6969
]
70+
},
71+
{
72+
'target_name': 'sfparse',
73+
'type': 'static_library',
74+
'include_dirs': ['lib'],
75+
'sources': [
76+
'lib/sfparse.c',
77+
],
78+
'direct_dependent_settings': {
79+
'include_dirs': [ 'lib/includes' ]
80+
}
7081
}
7182
]
7283
}

deps/ngtcp2/ngtcp2.gyp

Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,36 @@
8787
'nghttp3/lib/nghttp3_unreachable.c',
8888
'nghttp3/lib/nghttp3_vec.c',
8989
'nghttp3/lib/nghttp3_version.c',
90+
],
91+
'ngtcp2_test_server_sources': [
92+
'ngtcp2/examples/tls_server_session_ossl.cc',
93+
'ngtcp2/examples/tls_server_context_ossl.cc',
94+
'ngtcp2/examples/tls_session_base_ossl.cc',
95+
'ngtcp2/examples/util_openssl.cc',
96+
'ngtcp2/examples/http.cc',
97+
'ngtcp2/examples/server_base.cc',
98+
'ngtcp2/examples/shared.cc',
99+
'ngtcp2/examples/server.cc',
100+
'ngtcp2/examples/util.cc',
101+
'ngtcp2/examples/debug.cc',
102+
'ngtcp2/examples/siphash.cc',
103+
'ngtcp2/third-party/urlparse/urlparse.c',
104+
'ngtcp2/third-party/libev/ev.c',
105+
],
106+
'ngtcp2_test_client_sources': [
107+
'ngtcp2/examples/tls_client_session_ossl.cc',
108+
'ngtcp2/examples/tls_client_context_ossl.cc',
109+
'ngtcp2/examples/tls_session_base_ossl.cc',
110+
'ngtcp2/examples/util_openssl.cc',
111+
'ngtcp2/examples/http.cc',
112+
'ngtcp2/examples/client_base.cc',
113+
'ngtcp2/examples/shared.cc',
114+
'ngtcp2/examples/client.cc',
115+
'ngtcp2/examples/util.cc',
116+
'ngtcp2/examples/debug.cc',
117+
'ngtcp2/examples/siphash.cc',
118+
'ngtcp2/third-party/urlparse/urlparse.c',
119+
'ngtcp2/third-party/libev/ev.c',
90120
]
91121
},
92122
'targets': [
@@ -225,6 +255,104 @@
225255
'sources': [
226256
'<@(nghttp3_sources)'
227257
]
258+
},
259+
{
260+
'target_name': 'ngtcp2_test_server',
261+
'type': 'executable',
262+
'cflags': [ '-Wno-everything' ],
263+
'include_dirs': [
264+
'',
265+
'ngtcp2/examples/',
266+
'ngtcp2/lib/includes/',
267+
'ngtcp2/crypto/includes/',
268+
'ngtcp2/third-party/urlparse/',
269+
'ngtcp2/third-party/libev/',
270+
'../../nghttp2/lib',
271+
],
272+
'dependencies': [
273+
'ngtcp2',
274+
'nghttp3',
275+
'../openssl/openssl.gyp:openssl',
276+
'../nghttp2/nghttp2.gyp:sfparse',
277+
],
278+
'defines': [
279+
'HAVE_CONFIG_H',
280+
'WITH_EXAMPLE_OSSL',
281+
'EV_STANDALONE=1',
282+
],
283+
'conditions': [
284+
['OS=="win"', {
285+
'defines': [
286+
'WIN32',
287+
'_WINDOWS',
288+
],
289+
'msvs_settings': {
290+
'VCCLCompilerTool': {
291+
'CompileAs': '1'
292+
},
293+
},
294+
}],
295+
['OS!="win"', {
296+
'defines': [
297+
'HAVE_UNISTD_H',
298+
'HAVE_ARPA_INET_H',
299+
'HAVE_NETINET_IN_H',
300+
'HAVE_NETINET_IP_H',
301+
],
302+
}],
303+
],
304+
'sources': [
305+
'<@(ngtcp2_test_server_sources)'
306+
]
307+
},
308+
{
309+
'target_name': 'ngtcp2_test_client',
310+
'type': 'executable',
311+
'cflags': [ '-Wno-everything' ],
312+
'include_dirs': [
313+
'',
314+
'ngtcp2/examples/',
315+
'ngtcp2/lib/includes/',
316+
'ngtcp2/crypto/includes/',
317+
'ngtcp2/third-party/urlparse/',
318+
'ngtcp2/third-party/libev/',
319+
'../../nghttp2/lib',
320+
],
321+
'dependencies': [
322+
'ngtcp2',
323+
'nghttp3',
324+
'../openssl/openssl.gyp:openssl',
325+
'../nghttp2/nghttp2.gyp:sfparse',
326+
],
327+
'defines': [
328+
'HAVE_CONFIG_H',
329+
'WITH_EXAMPLE_OSSL',
330+
'EV_STANDALONE=1',
331+
],
332+
'conditions': [
333+
['OS=="win"', {
334+
'defines': [
335+
'WIN32',
336+
'_WINDOWS',
337+
],
338+
'msvs_settings': {
339+
'VCCLCompilerTool': {
340+
'CompileAs': '1'
341+
},
342+
},
343+
}],
344+
['OS!="win"', {
345+
'defines': [
346+
'HAVE_UNISTD_H',
347+
'HAVE_ARPA_INET_H',
348+
'HAVE_NETINET_IN_H',
349+
'HAVE_NETINET_IP_H',
350+
],
351+
}],
352+
],
353+
'sources': [
354+
'<@(ngtcp2_test_client_sources)'
355+
]
228356
}
229357
]
230358
}

0 commit comments

Comments
 (0)