2015-08-25 02:03:17 +01:00
|
|
|
include_directories(../include)
|
2014-06-20 20:00:00 +01:00
|
|
|
|
2017-06-06 16:25:35 +01:00
|
|
|
if(NOT OPENSSL_NO_ASM)
|
|
|
|
if(UNIX)
|
|
|
|
if (${ARCH} STREQUAL "aarch64")
|
|
|
|
# The "armx" Perl scripts look for "64" in the style argument
|
|
|
|
# in order to decide whether to generate 32- or 64-bit asm.
|
|
|
|
if (APPLE)
|
|
|
|
set(PERLASM_STYLE ios64)
|
|
|
|
else()
|
|
|
|
set(PERLASM_STYLE linux64)
|
|
|
|
endif()
|
|
|
|
elseif (${ARCH} STREQUAL "arm")
|
|
|
|
if (APPLE)
|
|
|
|
set(PERLASM_STYLE ios32)
|
|
|
|
else()
|
|
|
|
set(PERLASM_STYLE linux32)
|
|
|
|
endif()
|
|
|
|
elseif (${ARCH} STREQUAL "ppc64le")
|
|
|
|
set(PERLASM_STYLE linux64le)
|
2017-04-07 04:26:04 +01:00
|
|
|
else()
|
2017-06-06 16:25:35 +01:00
|
|
|
if (${ARCH} STREQUAL "x86")
|
|
|
|
set(PERLASM_FLAGS "-fPIC -DOPENSSL_IA32_SSE2")
|
|
|
|
endif()
|
|
|
|
if (APPLE)
|
|
|
|
set(PERLASM_STYLE macosx)
|
|
|
|
else()
|
|
|
|
set(PERLASM_STYLE elf)
|
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
set(ASM_EXT S)
|
|
|
|
enable_language(ASM)
|
|
|
|
set(CMAKE_ASM_FLAGS "${CMAKE_ASM_FLAGS} -Wa,--noexecstack")
|
|
|
|
|
|
|
|
# Clang's integerated assembler does not support debug symbols.
|
|
|
|
if(NOT CMAKE_ASM_COMPILER_ID MATCHES "Clang")
|
|
|
|
set(CMAKE_ASM_FLAGS "${CMAKE_ASM_FLAGS} -Wa,-g")
|
2017-04-07 04:26:04 +01:00
|
|
|
endif()
|
2017-06-06 16:25:35 +01:00
|
|
|
|
|
|
|
# CMake does not add -isysroot and -arch flags to assembly.
|
2017-04-07 04:26:04 +01:00
|
|
|
if (APPLE)
|
2017-06-06 16:25:35 +01:00
|
|
|
if (CMAKE_OSX_SYSROOT)
|
2017-10-02 20:09:04 +01:00
|
|
|
set(CMAKE_ASM_FLAGS "${CMAKE_ASM_FLAGS} -isysroot \"${CMAKE_OSX_SYSROOT}\"")
|
2017-06-06 16:25:35 +01:00
|
|
|
endif()
|
|
|
|
foreach(arch ${CMAKE_OSX_ARCHITECTURES})
|
|
|
|
set(CMAKE_ASM_FLAGS "${CMAKE_ASM_FLAGS} -arch ${arch}")
|
|
|
|
endforeach()
|
2017-04-07 04:26:04 +01:00
|
|
|
endif()
|
2015-01-29 00:37:10 +00:00
|
|
|
else()
|
2017-08-16 20:25:27 +01:00
|
|
|
if (${ARCH} STREQUAL "x86_64")
|
2017-06-06 16:25:35 +01:00
|
|
|
set(PERLASM_STYLE nasm)
|
2017-04-07 04:26:04 +01:00
|
|
|
else()
|
2017-06-06 16:25:35 +01:00
|
|
|
set(PERLASM_STYLE win32n)
|
|
|
|
set(PERLASM_FLAGS "-DOPENSSL_IA32_SSE2")
|
2017-04-07 04:26:04 +01:00
|
|
|
endif()
|
2017-10-05 20:04:08 +01:00
|
|
|
set(CMAKE_ASM_NASM_FLAGS "-g cv8")
|
2017-05-10 16:52:23 +01:00
|
|
|
|
2017-06-06 16:25:35 +01:00
|
|
|
# On Windows, we use the NASM output, specifically built with Yasm.
|
|
|
|
set(ASM_EXT asm)
|
|
|
|
enable_language(ASM_NASM)
|
2017-04-07 04:26:04 +01:00
|
|
|
endif()
|
2014-06-20 20:00:00 +01:00
|
|
|
endif()
|
|
|
|
|
|
|
|
function(perlasm dest src)
|
2015-01-29 00:37:10 +00:00
|
|
|
add_custom_command(
|
|
|
|
OUTPUT ${dest}
|
2016-06-26 18:18:50 +01:00
|
|
|
COMMAND ${PERL_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/${src} ${PERLASM_STYLE} ${PERLASM_FLAGS} ${ARGN} ${dest}
|
2015-01-29 00:37:10 +00:00
|
|
|
DEPENDS
|
|
|
|
${src}
|
2015-04-20 18:25:46 +01:00
|
|
|
${PROJECT_SOURCE_DIR}/crypto/perlasm/arm-xlate.pl
|
2016-09-23 20:47:24 +01:00
|
|
|
${PROJECT_SOURCE_DIR}/crypto/perlasm/ppc-xlate.pl
|
2015-01-29 00:37:10 +00:00
|
|
|
${PROJECT_SOURCE_DIR}/crypto/perlasm/x86_64-xlate.pl
|
|
|
|
${PROJECT_SOURCE_DIR}/crypto/perlasm/x86asm.pl
|
|
|
|
${PROJECT_SOURCE_DIR}/crypto/perlasm/x86gas.pl
|
|
|
|
${PROJECT_SOURCE_DIR}/crypto/perlasm/x86masm.pl
|
|
|
|
${PROJECT_SOURCE_DIR}/crypto/perlasm/x86nasm.pl
|
|
|
|
WORKING_DIRECTORY .
|
|
|
|
)
|
2014-06-20 20:00:00 +01:00
|
|
|
endfunction()
|
|
|
|
|
|
|
|
# Level 0.1 - depends on nothing outside this set.
|
|
|
|
add_subdirectory(stack)
|
|
|
|
add_subdirectory(lhash)
|
|
|
|
add_subdirectory(err)
|
|
|
|
add_subdirectory(buf)
|
|
|
|
add_subdirectory(base64)
|
|
|
|
add_subdirectory(bytestring)
|
2016-10-26 01:33:49 +01:00
|
|
|
add_subdirectory(pool)
|
2014-06-20 20:00:00 +01:00
|
|
|
|
|
|
|
# Level 0.2 - depends on nothing but itself
|
|
|
|
add_subdirectory(rc4)
|
|
|
|
add_subdirectory(conf)
|
2014-06-20 20:00:00 +01:00
|
|
|
add_subdirectory(chacha)
|
|
|
|
add_subdirectory(poly1305)
|
2015-11-13 21:09:47 +00:00
|
|
|
add_subdirectory(curve25519)
|
2014-06-20 20:00:00 +01:00
|
|
|
|
|
|
|
# Level 1, depends only on 0.*
|
2017-04-04 22:21:43 +01:00
|
|
|
add_subdirectory(digest_extra)
|
2017-05-03 21:23:37 +01:00
|
|
|
add_subdirectory(cipher_extra)
|
2017-04-14 19:16:20 +01:00
|
|
|
add_subdirectory(rand_extra)
|
2014-06-20 20:00:00 +01:00
|
|
|
add_subdirectory(bio)
|
2017-04-28 22:47:06 +01:00
|
|
|
add_subdirectory(bn_extra)
|
2014-06-20 20:00:00 +01:00
|
|
|
add_subdirectory(obj)
|
|
|
|
add_subdirectory(asn1)
|
|
|
|
|
|
|
|
# Level 2
|
|
|
|
add_subdirectory(engine)
|
|
|
|
add_subdirectory(dh)
|
|
|
|
add_subdirectory(dsa)
|
2017-05-03 19:50:51 +01:00
|
|
|
add_subdirectory(rsa_extra)
|
2017-05-02 22:25:39 +01:00
|
|
|
add_subdirectory(ec_extra)
|
2014-06-20 20:00:00 +01:00
|
|
|
add_subdirectory(ecdh)
|
2017-05-02 22:25:39 +01:00
|
|
|
add_subdirectory(ecdsa_extra)
|
2014-06-20 20:00:00 +01:00
|
|
|
|
|
|
|
# Level 3
|
2015-05-06 00:36:32 +01:00
|
|
|
add_subdirectory(cmac)
|
2014-06-20 20:00:00 +01:00
|
|
|
add_subdirectory(evp)
|
2014-12-09 23:51:28 +00:00
|
|
|
add_subdirectory(hkdf)
|
2014-06-20 20:00:00 +01:00
|
|
|
add_subdirectory(pem)
|
|
|
|
add_subdirectory(x509)
|
|
|
|
add_subdirectory(x509v3)
|
|
|
|
|
|
|
|
# Level 4
|
2017-04-15 23:40:41 +01:00
|
|
|
add_subdirectory(pkcs7)
|
2014-06-20 20:00:00 +01:00
|
|
|
add_subdirectory(pkcs8)
|
|
|
|
|
2015-05-10 03:46:47 +01:00
|
|
|
# Test support code
|
|
|
|
add_subdirectory(test)
|
|
|
|
|
2017-04-04 22:21:43 +01:00
|
|
|
add_subdirectory(fipsmodule)
|
|
|
|
|
2014-06-20 20:00:00 +01:00
|
|
|
add_library(
|
2017-04-04 22:21:43 +01:00
|
|
|
crypto_base
|
|
|
|
|
|
|
|
OBJECT
|
2015-01-29 00:37:10 +00:00
|
|
|
|
Rewrite ARM feature detection.
This removes the thread-unsafe SIGILL-based detection and the
multi-consumer-hostile CRYPTO_set_NEON_capable API. (Changing
OPENSSL_armcap_P after initialization is likely to cause problems.)
The right way to detect ARM features on Linux is getauxval. On aarch64,
we should be able to rely on this, so use it straight. Split this out
into its own file. The #ifdefs in the old cpu-arm.c meant it shared all
but no code with its arm counterpart anyway.
Unfortunately, various versions of Android have different missing APIs, so, on
arm, we need a series of workarounds. Previously, we used a SIGILL fallback
based on OpenSSL's logic, but this is inherently not thread-safe. (SIGILL also
does not tell us if the OS knows how to save and restore NEON state.) Instead,
base the behavior on Android NDK's cpu-features library, what Chromium
currently uses with CRYPTO_set_NEON_capable:
- Android before API level 20 does not provide getauxval. Where missing,
we can read from /proc/self/auxv.
- On some versions of Android, /proc/self/auxv is also not readable, so
use /proc/cpuinfo's Features line.
- Linux only advertises optional features in /proc/cpuinfo. ARMv8 makes NEON
mandatory, so /proc/cpuinfo can't be used without additional effort.
Finally, we must blacklist a particular chip because the NEON unit is broken
(https://crbug.com/341598).
Unfortunately, this means CRYPTO_library_init now depends on /proc being
available, which will require some care with Chromium's sandbox. The
simplest solution is to just call CRYPTO_library_init before entering
the sandbox.
It's worth noting that Chromium's current EnsureOpenSSLInit function already
depends on /proc/cpuinfo to detect the broken CPU, by way of base::CPU.
android_getCpuFeatures also interally depends on it. We were already relying on
both of those being stateful and primed prior to entering the sandbox.
BUG=chromium:589200
Change-Id: Ic5d1c341aab5a614eb129d8aa5ada2809edd6af8
Reviewed-on: https://boringssl-review.googlesource.com/7506
Reviewed-by: David Benjamin <davidben@google.com>
2016-03-01 22:35:47 +00:00
|
|
|
cpu-aarch64-linux.c
|
|
|
|
cpu-arm.c
|
|
|
|
cpu-arm-linux.c
|
|
|
|
cpu-intel.c
|
2016-09-23 20:47:24 +01:00
|
|
|
cpu-ppc64le.c
|
2015-01-29 00:37:10 +00:00
|
|
|
crypto.c
|
2015-05-15 20:01:29 +01:00
|
|
|
ex_data.c
|
2015-01-29 00:37:10 +00:00
|
|
|
mem.c
|
2015-05-15 20:01:29 +01:00
|
|
|
refcount_c11.c
|
|
|
|
refcount_lock.c
|
2015-01-29 00:37:10 +00:00
|
|
|
thread.c
|
2015-05-08 02:28:27 +01:00
|
|
|
thread_none.c
|
2015-03-16 19:48:56 +00:00
|
|
|
thread_pthread.c
|
|
|
|
thread_win.c
|
2017-04-04 22:21:43 +01:00
|
|
|
)
|
|
|
|
|
2017-05-17 21:05:50 +01:00
|
|
|
if(FIPS_DELOCATE)
|
2017-04-04 22:21:43 +01:00
|
|
|
SET_SOURCE_FILES_PROPERTIES(fipsmodule/bcm.o PROPERTIES EXTERNAL_OBJECT true)
|
|
|
|
SET_SOURCE_FILES_PROPERTIES(fipsmodule/bcm.o PROPERTIES GENERATED true)
|
|
|
|
|
|
|
|
set(
|
|
|
|
CRYPTO_FIPS_OBJECTS
|
|
|
|
|
|
|
|
fipsmodule/bcm.o
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
add_library(
|
|
|
|
crypto
|
2015-01-29 00:37:10 +00:00
|
|
|
|
2017-04-04 22:21:43 +01:00
|
|
|
$<TARGET_OBJECTS:crypto_base>
|
2015-01-29 00:37:10 +00:00
|
|
|
$<TARGET_OBJECTS:stack>
|
|
|
|
$<TARGET_OBJECTS:lhash>
|
|
|
|
$<TARGET_OBJECTS:err>
|
|
|
|
$<TARGET_OBJECTS:base64>
|
|
|
|
$<TARGET_OBJECTS:bytestring>
|
2016-10-26 01:33:49 +01:00
|
|
|
$<TARGET_OBJECTS:pool>
|
2017-04-04 22:21:43 +01:00
|
|
|
$<TARGET_OBJECTS:fipsmodule>
|
|
|
|
$<TARGET_OBJECTS:digest_extra>
|
2017-05-03 21:23:37 +01:00
|
|
|
$<TARGET_OBJECTS:cipher_extra>
|
2015-01-29 00:37:10 +00:00
|
|
|
$<TARGET_OBJECTS:rc4>
|
|
|
|
$<TARGET_OBJECTS:conf>
|
|
|
|
$<TARGET_OBJECTS:chacha>
|
|
|
|
$<TARGET_OBJECTS:poly1305>
|
2015-11-13 21:09:47 +00:00
|
|
|
$<TARGET_OBJECTS:curve25519>
|
2017-10-30 15:58:33 +00:00
|
|
|
$<TARGET_OBJECTS:fiat>
|
2015-01-29 00:37:10 +00:00
|
|
|
$<TARGET_OBJECTS:buf>
|
2017-04-28 22:47:06 +01:00
|
|
|
$<TARGET_OBJECTS:bn_extra>
|
2015-01-29 00:37:10 +00:00
|
|
|
$<TARGET_OBJECTS:bio>
|
2017-04-14 19:16:20 +01:00
|
|
|
$<TARGET_OBJECTS:rand_extra>
|
2015-01-29 00:37:10 +00:00
|
|
|
$<TARGET_OBJECTS:obj>
|
|
|
|
$<TARGET_OBJECTS:asn1>
|
|
|
|
$<TARGET_OBJECTS:engine>
|
|
|
|
$<TARGET_OBJECTS:dh>
|
|
|
|
$<TARGET_OBJECTS:dsa>
|
2017-05-03 19:50:51 +01:00
|
|
|
$<TARGET_OBJECTS:rsa_extra>
|
2017-05-02 22:25:39 +01:00
|
|
|
$<TARGET_OBJECTS:ec_extra>
|
2015-01-29 00:37:10 +00:00
|
|
|
$<TARGET_OBJECTS:ecdh>
|
2017-05-02 22:25:39 +01:00
|
|
|
$<TARGET_OBJECTS:ecdsa_extra>
|
2015-05-06 00:36:32 +01:00
|
|
|
$<TARGET_OBJECTS:cmac>
|
2015-01-29 00:37:10 +00:00
|
|
|
$<TARGET_OBJECTS:evp>
|
|
|
|
$<TARGET_OBJECTS:hkdf>
|
|
|
|
$<TARGET_OBJECTS:pem>
|
|
|
|
$<TARGET_OBJECTS:x509>
|
|
|
|
$<TARGET_OBJECTS:x509v3>
|
2017-04-15 23:40:41 +01:00
|
|
|
$<TARGET_OBJECTS:pkcs7>
|
2016-04-22 05:43:20 +01:00
|
|
|
$<TARGET_OBJECTS:pkcs8_lib>
|
2017-04-04 22:21:43 +01:00
|
|
|
|
|
|
|
${CRYPTO_FIPS_OBJECTS}
|
2014-06-20 20:00:00 +01:00
|
|
|
)
|
|
|
|
|
2017-05-17 21:05:50 +01:00
|
|
|
if(FIPS_DELOCATE)
|
2017-04-04 22:21:43 +01:00
|
|
|
add_dependencies(crypto bcm_o_target)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
SET_TARGET_PROPERTIES(crypto PROPERTIES LINKER_LANGUAGE C)
|
|
|
|
|
2015-04-29 01:46:58 +01:00
|
|
|
if(NOT MSVC AND NOT ANDROID)
|
2015-04-02 21:47:15 +01:00
|
|
|
target_link_libraries(crypto pthread)
|
|
|
|
endif()
|
|
|
|
|
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
|
|
|
# TODO(davidben): Convert the remaining tests to GTest.
|
|
|
|
add_executable(
|
|
|
|
crypto_test
|
|
|
|
|
2017-03-05 19:47:16 +00:00
|
|
|
asn1/asn1_test.cc
|
2017-04-17 15:04:39 +01:00
|
|
|
base64/base64_test.cc
|
2017-10-06 23:26:36 +01:00
|
|
|
buf/buf_test.cc
|
2017-03-09 06:13:07 +00:00
|
|
|
bio/bio_test.cc
|
2017-04-12 04:07:13 +01:00
|
|
|
bytestring/bytestring_test.cc
|
2017-02-15 15:33:19 +00:00
|
|
|
chacha/chacha_test.cc
|
2017-05-24 05:50:35 +01:00
|
|
|
cipher_extra/aead_test.cc
|
|
|
|
cipher_extra/cipher_test.cc
|
2017-04-23 16:55:32 +01:00
|
|
|
cmac/cmac_test.cc
|
2017-04-20 18:54:28 +01:00
|
|
|
compiler_test.cc
|
2017-03-16 15:25:20 +00:00
|
|
|
constant_time_test.cc
|
2017-05-22 21:33:29 +01:00
|
|
|
curve25519/ed25519_test.cc
|
2017-04-23 17:00:39 +01:00
|
|
|
curve25519/spake25519_test.cc
|
2017-03-01 17:37:35 +00:00
|
|
|
curve25519/x25519_test.cc
|
2017-05-24 05:50:35 +01:00
|
|
|
ecdh/ecdh_test.cc
|
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
|
|
|
dh/dh_test.cc
|
2017-05-18 01:30:18 +01:00
|
|
|
digest_extra/digest_test.cc
|
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
|
|
|
dsa/dsa_test.cc
|
2017-02-05 08:01:25 +00:00
|
|
|
err/err_test.cc
|
2017-03-01 16:53:41 +00:00
|
|
|
evp/evp_extra_test.cc
|
2017-06-08 21:00:10 +01:00
|
|
|
evp/evp_test.cc
|
2017-05-20 14:48:45 +01:00
|
|
|
evp/pbkdf_test.cc
|
2017-06-10 00:27:37 +01:00
|
|
|
evp/scrypt_test.cc
|
2017-05-19 20:26:18 +01:00
|
|
|
fipsmodule/aes/aes_test.cc
|
2017-06-04 20:37:23 +01:00
|
|
|
fipsmodule/bn/bn_test.cc
|
2017-05-02 22:25:39 +01:00
|
|
|
fipsmodule/ec/ec_test.cc
|
2017-06-09 01:04:08 +01:00
|
|
|
fipsmodule/ec/p256-x86_64_test.cc
|
2017-06-06 15:22:22 +01:00
|
|
|
fipsmodule/ecdsa/ecdsa_test.cc
|
2017-05-24 05:50:35 +01:00
|
|
|
fipsmodule/modes/gcm_test.cc
|
2017-04-14 19:16:20 +01:00
|
|
|
fipsmodule/rand/ctrdrbg_test.cc
|
2017-05-20 14:48:45 +01:00
|
|
|
hkdf/hkdf_test.cc
|
2017-05-24 05:50:35 +01:00
|
|
|
hmac_extra/hmac_test.cc
|
2017-05-20 14:48:45 +01:00
|
|
|
lhash/lhash_test.cc
|
2017-06-02 13:55:16 +01:00
|
|
|
obj/obj_test.cc
|
2017-06-02 12:24:46 +01:00
|
|
|
pkcs7/pkcs7_test.cc
|
|
|
|
pkcs8/pkcs8_test.cc
|
2017-06-02 13:21:49 +01:00
|
|
|
pkcs8/pkcs12_test.cc
|
2017-05-24 05:50:35 +01:00
|
|
|
poly1305/poly1305_test.cc
|
2017-05-20 14:48:45 +01:00
|
|
|
pool/pool_test.cc
|
|
|
|
refcount_test.cc
|
2017-05-03 19:50:51 +01:00
|
|
|
rsa_extra/rsa_test.cc
|
2017-05-20 14:48:45 +01:00
|
|
|
test/file_test_gtest.cc
|
2017-06-04 20:57:20 +01:00
|
|
|
thread_test.cc
|
2017-06-07 11:28:27 +01:00
|
|
|
x509/x509_test.cc
|
2017-07-10 04:26:26 +01:00
|
|
|
x509v3/tab_test.cc
|
|
|
|
x509v3/v3name_test.cc
|
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
|
|
|
|
2017-05-19 20:26:18 +01:00
|
|
|
$<TARGET_OBJECTS:crypto_test_data>
|
2018-01-04 07:07:58 +00:00
|
|
|
$<TARGET_OBJECTS:boringssl_gtest_main>
|
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:test_support>
|
|
|
|
)
|
|
|
|
|
2018-01-04 07:07:58 +00:00
|
|
|
target_link_libraries(crypto_test crypto boringssl_gtest)
|
2017-03-09 06:13:07 +00:00
|
|
|
if (WIN32)
|
|
|
|
target_link_libraries(crypto_test ws2_32)
|
|
|
|
endif()
|
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
|
|
|
add_dependencies(all_tests crypto_test)
|