2015-08-25 02:03:17 +01:00
|
|
|
include_directories(../include)
|
2014-06-20 20:00:00 +01:00
|
|
|
|
|
|
|
add_library(
|
2015-01-29 00:37:10 +00:00
|
|
|
ssl
|
2014-06-20 20:00:00 +01:00
|
|
|
|
2017-07-09 21:17:55 +01:00
|
|
|
bio_ssl.cc
|
|
|
|
custom_extensions.cc
|
|
|
|
d1_both.cc
|
|
|
|
d1_lib.cc
|
|
|
|
d1_pkt.cc
|
|
|
|
d1_srtp.cc
|
|
|
|
dtls_method.cc
|
|
|
|
dtls_record.cc
|
2017-07-12 21:25:57 +01:00
|
|
|
handshake_client.cc
|
|
|
|
handshake_server.cc
|
2017-07-09 21:17:55 +01:00
|
|
|
s3_both.cc
|
|
|
|
s3_lib.cc
|
|
|
|
s3_pkt.cc
|
2017-07-12 22:16:39 +01:00
|
|
|
ssl_aead_ctx.cc
|
2017-07-09 21:17:55 +01:00
|
|
|
ssl_asn1.cc
|
2017-07-12 21:31:08 +01:00
|
|
|
ssl_buffer.cc
|
|
|
|
ssl_cert.cc
|
|
|
|
ssl_cipher.cc
|
2017-07-12 22:08:45 +01:00
|
|
|
ssl_ecdh.cc
|
2017-07-12 22:16:39 +01:00
|
|
|
ssl_file.cc
|
|
|
|
ssl_lib.cc
|
2017-07-12 22:26:06 +01:00
|
|
|
ssl_privkey.cc
|
2017-07-12 22:35:14 +01:00
|
|
|
ssl_session.cc
|
|
|
|
ssl_stat.cc
|
|
|
|
ssl_transcript.cc
|
|
|
|
ssl_versions.cc
|
2017-07-09 21:17:55 +01:00
|
|
|
ssl_x509.cc
|
2017-07-12 22:35:14 +01:00
|
|
|
t1_enc.cc
|
2015-01-29 00:37:10 +00:00
|
|
|
t1_lib.c
|
2017-07-12 22:35:14 +01:00
|
|
|
tls_method.cc
|
2015-07-29 02:34:45 +01:00
|
|
|
tls_record.c
|
2016-07-11 18:19:03 +01:00
|
|
|
tls13_both.c
|
|
|
|
tls13_client.c
|
|
|
|
tls13_enc.c
|
|
|
|
tls13_server.c
|
2014-06-20 20:00:00 +01:00
|
|
|
)
|
2014-07-16 19:37:51 +01:00
|
|
|
|
2015-10-06 02:32:10 +01:00
|
|
|
target_link_libraries(ssl crypto)
|
|
|
|
|
2014-07-16 19:37:51 +01:00
|
|
|
add_executable(
|
2015-01-29 00:37:10 +00:00
|
|
|
ssl_test
|
2014-07-16 19:37:51 +01:00
|
|
|
|
2015-03-22 21:22:08 +00:00
|
|
|
ssl_test.cc
|
2015-05-16 00:08:49 +01:00
|
|
|
|
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-20 00:05:47 +00:00
|
|
|
$<TARGET_OBJECTS:gtest_main>
|
2015-05-16 00:08:49 +01:00
|
|
|
$<TARGET_OBJECTS:test_support>
|
2014-07-16 19:37:51 +01:00
|
|
|
)
|
|
|
|
|
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-20 00:05:47 +00:00
|
|
|
target_link_libraries(ssl_test ssl crypto gtest)
|
2017-03-09 06:13:07 +00:00
|
|
|
if (WIN32)
|
|
|
|
target_link_libraries(ssl_test ws2_32)
|
|
|
|
endif()
|
Add a run_tests target to run all tests.
It's very annoying having to remember the right incant every time I want
to switch around between my build, build-release, build-asan, etc.,
output directories.
Unfortunately, this target is pretty unfriendly without CMake 3.2+ (and
Ninja 1.5+). This combination gives a USES_TERMINAL flag to
add_custom_target which uses Ninja's "console" pool, otherwise the
output buffering gets in the way. Ubuntu LTS is still on an older CMake,
so do a version check in the meantime.
CMake also has its own test mechanism (CTest), but this doesn't use it.
It seems to prefer knowing what all the tests are and then tries to do
its own output management and parallelizing and such. We already have
our own runners. all_tests.go could actually be converted tidily, but
generate_build_files.py also needs to read it, and runner.go has very
specific needs.
Naming the target ninja -C build test would be nice, but CTest squats
that name and CMake grumps when you use a reserved name, so I've gone
with run_tests.
Change-Id: Ibd20ebd50febe1b4e91bb19921f3bbbd9fbcf66c
Reviewed-on: https://boringssl-review.googlesource.com/6270
Reviewed-by: Adam Langley <alangley@gmail.com>
2015-10-15 02:34:40 +01:00
|
|
|
add_dependencies(all_tests ssl_test)
|