Build BoringSSL tests as BoringSSL does.

BoringSSL builds its crypto_test and ssl_test as single targets, while
gRPC was building them with a target per file. This no longer works with
tip-of-tree BoringSSL.

This change aligns gRPC with the way that BoringSSL builds its tests.
The changes to boringssl/gen_build_yaml.py were done by hand, all other
changes result from generate_projects.sh.
pull/18466/head
Adam Langley 6 years ago
parent 6ffdb37f50
commit 271807df79
  1. 11799
      Makefile
  2. 561
      grpc.gyp
  3. 29
      src/boringssl/gen_build_yaml.py
  4. 3867
      tools/run_tests/generated/sources_and_headers.json
  5. 1278
      tools/run_tests/generated/tests.json

11799
Makefile

File diff suppressed because it is too large Load Diff

@ -2058,567 +2058,6 @@
'third_party/boringssl/crypto/test/test_util.cc',
],
},
{
'target_name': 'boringssl_crypto_test_data_lib',
'type': 'static_library',
'dependencies': [
'boringssl_test_util',
'boringssl',
],
'sources': [
'src/boringssl/crypto_test_data.cc',
],
},
{
'target_name': 'boringssl_asn1_test_lib',
'type': 'static_library',
'dependencies': [
'boringssl_test_util',
'boringssl',
],
'sources': [
'third_party/boringssl/crypto/asn1/asn1_test.cc',
],
},
{
'target_name': 'boringssl_base64_test_lib',
'type': 'static_library',
'dependencies': [
'boringssl_test_util',
'boringssl',
],
'sources': [
'third_party/boringssl/crypto/base64/base64_test.cc',
],
},
{
'target_name': 'boringssl_bio_test_lib',
'type': 'static_library',
'dependencies': [
'boringssl_test_util',
'boringssl',
],
'sources': [
'third_party/boringssl/crypto/bio/bio_test.cc',
],
},
{
'target_name': 'boringssl_buf_test_lib',
'type': 'static_library',
'dependencies': [
'boringssl_test_util',
'boringssl',
],
'sources': [
'third_party/boringssl/crypto/buf/buf_test.cc',
],
},
{
'target_name': 'boringssl_bytestring_test_lib',
'type': 'static_library',
'dependencies': [
'boringssl_test_util',
'boringssl',
],
'sources': [
'third_party/boringssl/crypto/bytestring/bytestring_test.cc',
],
},
{
'target_name': 'boringssl_chacha_test_lib',
'type': 'static_library',
'dependencies': [
'boringssl_test_util',
'boringssl',
],
'sources': [
'third_party/boringssl/crypto/chacha/chacha_test.cc',
],
},
{
'target_name': 'boringssl_aead_test_lib',
'type': 'static_library',
'dependencies': [
'boringssl_test_util',
'boringssl',
],
'sources': [
'third_party/boringssl/crypto/cipher_extra/aead_test.cc',
],
},
{
'target_name': 'boringssl_cipher_test_lib',
'type': 'static_library',
'dependencies': [
'boringssl_test_util',
'boringssl',
],
'sources': [
'third_party/boringssl/crypto/cipher_extra/cipher_test.cc',
],
},
{
'target_name': 'boringssl_cmac_test_lib',
'type': 'static_library',
'dependencies': [
'boringssl_test_util',
'boringssl',
],
'sources': [
'third_party/boringssl/crypto/cmac/cmac_test.cc',
],
},
{
'target_name': 'boringssl_compiler_test_lib',
'type': 'static_library',
'dependencies': [
'boringssl_test_util',
'boringssl',
],
'sources': [
'third_party/boringssl/crypto/compiler_test.cc',
],
},
{
'target_name': 'boringssl_constant_time_test_lib',
'type': 'static_library',
'dependencies': [
'boringssl_test_util',
'boringssl',
],
'sources': [
'third_party/boringssl/crypto/constant_time_test.cc',
],
},
{
'target_name': 'boringssl_ed25519_test_lib',
'type': 'static_library',
'dependencies': [
'boringssl_test_util',
'boringssl',
],
'sources': [
'third_party/boringssl/crypto/curve25519/ed25519_test.cc',
],
},
{
'target_name': 'boringssl_spake25519_test_lib',
'type': 'static_library',
'dependencies': [
'boringssl_test_util',
'boringssl',
],
'sources': [
'third_party/boringssl/crypto/curve25519/spake25519_test.cc',
],
},
{
'target_name': 'boringssl_x25519_test_lib',
'type': 'static_library',
'dependencies': [
'boringssl_test_util',
'boringssl',
],
'sources': [
'third_party/boringssl/crypto/curve25519/x25519_test.cc',
],
},
{
'target_name': 'boringssl_dh_test_lib',
'type': 'static_library',
'dependencies': [
'boringssl_test_util',
'boringssl',
],
'sources': [
'third_party/boringssl/crypto/dh/dh_test.cc',
],
},
{
'target_name': 'boringssl_digest_test_lib',
'type': 'static_library',
'dependencies': [
'boringssl_test_util',
'boringssl',
],
'sources': [
'third_party/boringssl/crypto/digest_extra/digest_test.cc',
],
},
{
'target_name': 'boringssl_dsa_test_lib',
'type': 'static_library',
'dependencies': [
'boringssl_test_util',
'boringssl',
],
'sources': [
'third_party/boringssl/crypto/dsa/dsa_test.cc',
],
},
{
'target_name': 'boringssl_ecdh_test_lib',
'type': 'static_library',
'dependencies': [
'boringssl_test_util',
'boringssl',
],
'sources': [
'third_party/boringssl/crypto/ecdh/ecdh_test.cc',
],
},
{
'target_name': 'boringssl_err_test_lib',
'type': 'static_library',
'dependencies': [
'boringssl_test_util',
'boringssl',
],
'sources': [
'third_party/boringssl/crypto/err/err_test.cc',
],
},
{
'target_name': 'boringssl_evp_extra_test_lib',
'type': 'static_library',
'dependencies': [
'boringssl_test_util',
'boringssl',
],
'sources': [
'third_party/boringssl/crypto/evp/evp_extra_test.cc',
],
},
{
'target_name': 'boringssl_evp_test_lib',
'type': 'static_library',
'dependencies': [
'boringssl_test_util',
'boringssl',
],
'sources': [
'third_party/boringssl/crypto/evp/evp_test.cc',
],
},
{
'target_name': 'boringssl_pbkdf_test_lib',
'type': 'static_library',
'dependencies': [
'boringssl_test_util',
'boringssl',
],
'sources': [
'third_party/boringssl/crypto/evp/pbkdf_test.cc',
],
},
{
'target_name': 'boringssl_scrypt_test_lib',
'type': 'static_library',
'dependencies': [
'boringssl_test_util',
'boringssl',
],
'sources': [
'third_party/boringssl/crypto/evp/scrypt_test.cc',
],
},
{
'target_name': 'boringssl_aes_test_lib',
'type': 'static_library',
'dependencies': [
'boringssl_test_util',
'boringssl',
],
'sources': [
'third_party/boringssl/crypto/fipsmodule/aes/aes_test.cc',
],
},
{
'target_name': 'boringssl_bn_test_lib',
'type': 'static_library',
'dependencies': [
'boringssl_test_util',
'boringssl',
],
'sources': [
'third_party/boringssl/crypto/fipsmodule/bn/bn_test.cc',
],
},
{
'target_name': 'boringssl_ec_test_lib',
'type': 'static_library',
'dependencies': [
'boringssl_test_util',
'boringssl',
],
'sources': [
'third_party/boringssl/crypto/fipsmodule/ec/ec_test.cc',
],
},
{
'target_name': 'boringssl_p256-x86_64_test_lib',
'type': 'static_library',
'dependencies': [
'boringssl_test_util',
'boringssl',
],
'sources': [
'third_party/boringssl/crypto/fipsmodule/ec/p256-x86_64_test.cc',
],
},
{
'target_name': 'boringssl_ecdsa_test_lib',
'type': 'static_library',
'dependencies': [
'boringssl_test_util',
'boringssl',
],
'sources': [
'third_party/boringssl/crypto/fipsmodule/ecdsa/ecdsa_test.cc',
],
},
{
'target_name': 'boringssl_gcm_test_lib',
'type': 'static_library',
'dependencies': [
'boringssl_test_util',
'boringssl',
],
'sources': [
'third_party/boringssl/crypto/fipsmodule/modes/gcm_test.cc',
],
},
{
'target_name': 'boringssl_ctrdrbg_test_lib',
'type': 'static_library',
'dependencies': [
'boringssl_test_util',
'boringssl',
],
'sources': [
'third_party/boringssl/crypto/fipsmodule/rand/ctrdrbg_test.cc',
],
},
{
'target_name': 'boringssl_hkdf_test_lib',
'type': 'static_library',
'dependencies': [
'boringssl_test_util',
'boringssl',
],
'sources': [
'third_party/boringssl/crypto/hkdf/hkdf_test.cc',
],
},
{
'target_name': 'boringssl_hmac_test_lib',
'type': 'static_library',
'dependencies': [
'boringssl_test_util',
'boringssl',
],
'sources': [
'third_party/boringssl/crypto/hmac_extra/hmac_test.cc',
],
},
{
'target_name': 'boringssl_lhash_test_lib',
'type': 'static_library',
'dependencies': [
'boringssl_test_util',
'boringssl',
],
'sources': [
'third_party/boringssl/crypto/lhash/lhash_test.cc',
],
},
{
'target_name': 'boringssl_obj_test_lib',
'type': 'static_library',
'dependencies': [
'boringssl_test_util',
'boringssl',
],
'sources': [
'third_party/boringssl/crypto/obj/obj_test.cc',
],
},
{
'target_name': 'boringssl_pkcs7_test_lib',
'type': 'static_library',
'dependencies': [
'boringssl_test_util',
'boringssl',
],
'sources': [
'third_party/boringssl/crypto/pkcs7/pkcs7_test.cc',
],
},
{
'target_name': 'boringssl_pkcs12_test_lib',
'type': 'static_library',
'dependencies': [
'boringssl_test_util',
'boringssl',
],
'sources': [
'third_party/boringssl/crypto/pkcs8/pkcs12_test.cc',
],
},
{
'target_name': 'boringssl_pkcs8_test_lib',
'type': 'static_library',
'dependencies': [
'boringssl_test_util',
'boringssl',
],
'sources': [
'third_party/boringssl/crypto/pkcs8/pkcs8_test.cc',
],
},
{
'target_name': 'boringssl_poly1305_test_lib',
'type': 'static_library',
'dependencies': [
'boringssl_test_util',
'boringssl',
],
'sources': [
'third_party/boringssl/crypto/poly1305/poly1305_test.cc',
],
},
{
'target_name': 'boringssl_pool_test_lib',
'type': 'static_library',
'dependencies': [
'boringssl_test_util',
'boringssl',
],
'sources': [
'third_party/boringssl/crypto/pool/pool_test.cc',
],
},
{
'target_name': 'boringssl_refcount_test_lib',
'type': 'static_library',
'dependencies': [
'boringssl_test_util',
'boringssl',
],
'sources': [
'third_party/boringssl/crypto/refcount_test.cc',
],
},
{
'target_name': 'boringssl_rsa_test_lib',
'type': 'static_library',
'dependencies': [
'boringssl_test_util',
'boringssl',
],
'sources': [
'third_party/boringssl/crypto/rsa_extra/rsa_test.cc',
],
},
{
'target_name': 'boringssl_self_test_lib',
'type': 'static_library',
'dependencies': [
'boringssl_test_util',
'boringssl',
],
'sources': [
'third_party/boringssl/crypto/self_test.cc',
],
},
{
'target_name': 'boringssl_file_test_gtest_lib',
'type': 'static_library',
'dependencies': [
'boringssl_test_util',
'boringssl',
],
'sources': [
'third_party/boringssl/crypto/test/file_test_gtest.cc',
],
},
{
'target_name': 'boringssl_gtest_main_lib',
'type': 'static_library',
'dependencies': [
'boringssl_test_util',
'boringssl',
],
'sources': [
'third_party/boringssl/crypto/test/gtest_main.cc',
],
},
{
'target_name': 'boringssl_thread_test_lib',
'type': 'static_library',
'dependencies': [
'boringssl_test_util',
'boringssl',
],
'sources': [
'third_party/boringssl/crypto/thread_test.cc',
],
},
{
'target_name': 'boringssl_x509_test_lib',
'type': 'static_library',
'dependencies': [
'boringssl_test_util',
'boringssl',
],
'sources': [
'third_party/boringssl/crypto/x509/x509_test.cc',
],
},
{
'target_name': 'boringssl_tab_test_lib',
'type': 'static_library',
'dependencies': [
'boringssl_test_util',
'boringssl',
],
'sources': [
'third_party/boringssl/crypto/x509v3/tab_test.cc',
],
},
{
'target_name': 'boringssl_v3name_test_lib',
'type': 'static_library',
'dependencies': [
'boringssl_test_util',
'boringssl',
],
'sources': [
'third_party/boringssl/crypto/x509v3/v3name_test.cc',
],
},
{
'target_name': 'boringssl_span_test_lib',
'type': 'static_library',
'dependencies': [
'boringssl_test_util',
'boringssl',
],
'sources': [
'third_party/boringssl/ssl/span_test.cc',
],
},
{
'target_name': 'boringssl_ssl_test_lib',
'type': 'static_library',
'dependencies': [
'boringssl_test_util',
'boringssl',
],
'sources': [
'third_party/boringssl/ssl/ssl_test.cc',
],
},
{
'target_name': 'benchmark',
'type': 'static_library',

@ -48,6 +48,7 @@ class Grpc(object):
yaml = None
def WriteFiles(self, files, asm_outputs):
test_binaries = ['ssl_test', 'crypto_test']
self.yaml = {
'#': 'generated with tools/buildgen/gen_boring_ssl_build_yaml.py',
@ -86,45 +87,28 @@ class Grpc(object):
for f in sorted(files['test_support'])
],
}
] + [
{
'name': 'boringssl_%s_lib' % os.path.splitext(os.path.basename(test))[0],
'build': 'private',
'secure': 'no',
'language': 'c' if os.path.splitext(test)[1] == '.c' else 'c++',
'src': [map_dir(test)],
'vs_proj_dir': 'test/boringssl',
'boringssl': True,
'defaults': 'boringssl',
'deps': [
'boringssl_test_util',
'boringssl',
]
}
for test in list(sorted(set(files['ssl_test'] + files['crypto_test'])))
],
'targets': [
{
'name': 'boringssl_%s' % os.path.splitext(os.path.basename(test))[0],
'name': 'boringssl_%s' % test,
'build': 'test',
'run': False,
'secure': 'no',
'language': 'c++',
'src': ["third_party/boringssl/crypto/test/gtest_main.cc"],
'src': sorted(map_dir(f) for f in files[test]),
'vs_proj_dir': 'test/boringssl',
'boringssl': True,
'defaults': 'boringssl',
'deps': [
'boringssl_%s_lib' % os.path.splitext(os.path.basename(test))[0],
'boringssl_test_util',
'boringssl',
]
}
for test in list(sorted(set(files['ssl_test'] + files['crypto_test'])))
for test in test_binaries
],
'tests': [
{
'name': 'boringssl_%s' % os.path.splitext(os.path.basename(test))[0],
'name': 'boringssl_%s' % test,
'args': [],
'exclude_configs': ['asan', 'ubsan'],
'ci_platforms': ['linux', 'mac', 'posix', 'windows'],
@ -136,9 +120,8 @@ class Grpc(object):
'defaults': 'boringssl',
'cpu_cost': 1.0
}
for test in list(sorted(set(files['ssl_test'] + files['crypto_test'])))
for test in test_binaries
]
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save