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-02-03 21:02:11 +00:00
|
|
|
bio_ssl.c
|
2015-07-31 02:10:13 +01:00
|
|
|
custom_extensions.c
|
2015-01-29 00:37:10 +00:00
|
|
|
d1_both.c
|
|
|
|
d1_lib.c
|
|
|
|
d1_pkt.c
|
|
|
|
d1_srtp.c
|
2016-07-08 17:05:45 +01:00
|
|
|
dtls_method.c
|
2015-07-29 02:34:45 +01:00
|
|
|
dtls_record.c
|
2017-02-01 20:46:01 +00:00
|
|
|
handshake_client.c
|
|
|
|
handshake_server.c
|
2015-01-29 00:37:10 +00:00
|
|
|
s3_both.c
|
|
|
|
s3_lib.c
|
|
|
|
s3_pkt.c
|
2015-03-03 19:20:26 +00:00
|
|
|
ssl_aead_ctx.c
|
2015-01-29 00:37:10 +00:00
|
|
|
ssl_asn1.c
|
2015-07-29 02:34:45 +01:00
|
|
|
ssl_buffer.c
|
2015-01-29 00:37:10 +00:00
|
|
|
ssl_cert.c
|
2015-04-08 07:36:59 +01:00
|
|
|
ssl_cipher.c
|
2015-12-19 05:18:25 +00:00
|
|
|
ssl_ecdh.c
|
2015-09-04 20:05:05 +01:00
|
|
|
ssl_file.c
|
2015-01-29 00:37:10 +00:00
|
|
|
ssl_lib.c
|
2017-02-01 20:46:01 +00:00
|
|
|
ssl_privkey.c
|
|
|
|
ssl_privkey_cc.cc
|
2015-09-13 19:16:39 +01:00
|
|
|
ssl_session.c
|
2015-01-29 00:37:10 +00:00
|
|
|
ssl_stat.c
|
2017-01-12 18:17:07 +00:00
|
|
|
ssl_transcript.c
|
2017-01-24 00:46:16 +00:00
|
|
|
ssl_x509.c
|
2015-01-29 00:37:10 +00:00
|
|
|
t1_enc.c
|
|
|
|
t1_lib.c
|
2016-07-08 17:05:45 +01:00
|
|
|
tls_method.c
|
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)
|
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)
|