boringssl/ssl
David Benjamin 966284337d Do a cursory conversion of a few tests to GTest.
For now, this is the laziest conversion possible. The intent is to just
get the build setup ready so that we can get everything working in our
consumers. The intended end state is:

- The standalone build produces three test targets, one per library:
  {crypto,ssl,decrepit}_tests.

- Each FOO_test is made up of:
    FOO/**/*_test.cc
    crypto/test/gtest_main.cc
    test_support

- generate_build_files.py emits variables crypto_test_sources and
  ssl_test_sources. These variables are populated with FindCFiles,
  looking for *_test.cc.

- The consuming file assembles those variables into the two test targets
  (plus decrepit) from there. This avoids having generate_build_files.py
  emit actual build rules.

- Our standalone builders, Chromium, and Android just run the top-level
  test targets using whatever GTest-based reporting story they have.

In transition, we start by converting one of two tests in each library
to populate the three test targets. Those are added to all_tests.json
and all_tests.go hacked to handle them transparently. This keeps our
standalone builder working.

generate_build_files.py, to start with, populates the new source lists
manually and subtracts them out of the old machinery. We emit both for
the time being. When this change rolls in, we'll write all the build
glue needed to build the GTest-based tests and add it to consumers'
continuous builders.

Next, we'll subsume a file-based test and get the consumers working with
that. (I.e. make sure the GTest targets can depend on a data file.)

Once that's all done, we'll be sure all this will work. At that point,
we start subsuming the remaining tests into the GTest targets and,
asynchronously, rewriting tests to use GTest properly rather than
cursory conversion here.

When all non-GTest tests are gone, the old generate_build_files.py hooks
will be removed, consumers updated to not depend on them, and standalone
builders converted to not rely on all_tests.go, which can then be
removed. (Unless bits end up being needed as a malloc test driver. I'm
thinking we'll want to do something with --gtest_filter.)

As part of this CL, I've bumped the CMake requirements (for
target_include_directories) and added a few suppressions for warnings
that GTest doesn't pass.

BUG=129

Change-Id: I881b26b07a8739cc0b52dbb51a30956908e1b71a
Reviewed-on: https://boringssl-review.googlesource.com/13232
Reviewed-by: Adam Langley <agl@google.com>
2017-01-21 00:17:05 +00:00
..
test Run select_certificate_cb multiple times 2017-01-20 23:55:50 +00:00
CMakeLists.txt Do a cursory conversion of a few tests to GTest. 2017-01-21 00:17:05 +00:00
custom_extensions.c Pass explicit hs parameters into custom_extensions.c. 2016-12-06 19:49:36 +00:00
d1_both.c Work around language and compiler bug in memcpy, etc. 2016-12-21 20:34:47 +00:00
d1_lib.c Add a helper function for resetting SSL_get_error state. 2017-01-04 04:48:44 +00:00
d1_pkt.c Work around language and compiler bug in memcpy, etc. 2016-12-21 20:34:47 +00:00
d1_srtp.c Fix ssl_ctx_make_profiles error handling. 2016-09-27 13:27:06 +00:00
dtls_method.c Work around language and compiler bug in memcpy, etc. 2016-12-21 20:34:47 +00:00
dtls_record.c Work around language and compiler bug in memcpy, etc. 2016-12-21 20:34:47 +00:00
handshake_client.c Don't clear cert_request in ssl3_send_client_certificate. 2017-01-04 04:50:00 +00:00
handshake_server.c Run select_certificate_cb multiple times 2017-01-20 23:55:50 +00:00
internal.h Remove old ChaCha20-Poly1305 AEAD. 2017-01-19 23:27:54 +00:00
s3_both.c Enabling 0-RTT on new Session Tickets. 2017-01-06 16:24:43 +00:00
s3_enc.c Work around language and compiler bug in memcpy, etc. 2016-12-21 20:34:47 +00:00
s3_lib.c Work around language and compiler bug in memcpy, etc. 2016-12-21 20:34:47 +00:00
s3_pkt.c Work around language and compiler bug in memcpy, etc. 2016-12-21 20:34:47 +00:00
ssl_aead_ctx.c Work around language and compiler bug in memcpy, etc. 2016-12-21 20:34:47 +00:00
ssl_asn1.c Enabling 0-RTT on new Session Tickets. 2017-01-06 16:24:43 +00:00
ssl_buffer.c Work around language and compiler bug in memcpy, etc. 2016-12-21 20:34:47 +00:00
ssl_cert.c Clean up certificate auto-chaining. 2017-01-04 01:36:26 +00:00
ssl_cipher.c Remove old ChaCha20-Poly1305 AEAD. 2017-01-19 23:27:54 +00:00
ssl_ecdh.c Remove New Hope key agreement. 2016-12-10 01:06:31 +00:00
ssl_file.c Check for sk_X509_NAME_push failures. 2016-09-27 13:18:37 +00:00
ssl_lib.c Add a getter for SSL_set_session_id_context. 2017-01-20 04:39:42 +00:00
ssl_rsa_cc.cc Convert one libssl function to C++11. 2017-01-17 21:51:06 +00:00
ssl_rsa.c Convert one libssl function to C++11. 2017-01-17 21:51:06 +00:00
ssl_session.c Enabling 0-RTT on new Session Tickets. 2017-01-06 16:24:43 +00:00
ssl_stat.c Move state and next_state to SSL_HANDSHAKE. 2016-12-12 22:09:01 +00:00
ssl_test.cc Do a cursory conversion of a few tests to GTest. 2017-01-21 00:17:05 +00:00
t1_enc.c Work around language and compiler bug in memcpy, etc. 2016-12-21 20:34:47 +00:00
t1_lib.c Never send SNI warning alerts. 2017-01-19 23:03:11 +00:00
tls13_both.c Enabling 0-RTT on new Session Tickets. 2017-01-06 16:24:43 +00:00
tls13_client.c Fix TLS 1.3 NewSessionTicket processing. 2017-01-09 03:37:19 +00:00
tls13_enc.c Work around language and compiler bug in memcpy, etc. 2016-12-21 20:34:47 +00:00
tls13_server.c Enabling 0-RTT on new Session Tickets. 2017-01-06 16:24:43 +00:00
tls_method.c Work around language and compiler bug in memcpy, etc. 2016-12-21 20:34:47 +00:00
tls_record.c Enabling 0-RTT on new Session Tickets. 2017-01-06 16:24:43 +00:00