From 3ae23976862fa9036ab52e47c8a22025f5d76ca0 Mon Sep 17 00:00:00 2001 From: David Benjamin Date: Mon, 18 Mar 2024 22:43:46 +1000 Subject: Rework the test data story We originally embedded test data because of deficiencies in Android's build. Android had no way to specify test data with tests. That has since been resolved, and the embedding mechanism has gotten unwieldy. This unifies pki_test and crypto_test's test data story, and does so in a way that all tests can participate in. (We can now use FileTest in decrepit_test.) Update-Note: This will require some tweaks to downstream builds. We no longer emit an (unwieldy) crypto_test_data.cc file. Instead, tests will expect test data be available at the current working directory. This can be overridden with the BORINGSSL_TEST_DATA_ROOT environment variable. Callers with more complex needs can build with BORINGSSL_CUSTOM_GET_TEST_DATA and then link in an alternate implementation of this function. On the off chance some project needs it, I've kept the embed_test_data.go script around for now, but I expect we can delete it in the future. Fixed: 681 Change-Id: If181ce043e1eea3148838f1bb4db9ee4bfda0d08 Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/67295 Commit-Queue: David Benjamin Reviewed-by: Bob Beck --- build.json | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'build.json') diff --git a/build.json b/build.json index 8c1de1e..0463e88 100644 --- a/build.json +++ b/build.json @@ -202,7 +202,9 @@ "srcs": [ "crypto/test/abi_test.cc", "crypto/test/file_test.cc", + "crypto/test/file_test_gtest.cc", "crypto/test/file_util.cc", + "crypto/test/test_data.cc", "crypto/test/test_util.cc", "crypto/test/wycheproof_util.cc" ], @@ -285,10 +287,6 @@ "crypto/siphash/siphash_test.cc", "crypto/spx/spx_test.cc", "crypto/thread_test.cc", - // TODO(crbug.com/boringssl/542): This should be in test_support, so - // that all tests can use it. But it depends on GetTestData, which - // is not currently usable outside of crypto_test. - "crypto/test/file_test_gtest.cc", "crypto/test/gtest_main.cc", "crypto/trust_token/trust_token_test.cc", "crypto/x509/tab_test.cc", -- cgit v1.1