aboutsummaryrefslogtreecommitdiff
path: root/pw_presubmit
diff options
context:
space:
mode:
authorAli Zhang <alizhang@google.com>2021-07-01 11:33:26 -0700
committerCQ Bot Account <pigweed-scoped@luci-project-accounts.iam.gserviceaccount.com>2021-07-16 18:42:20 +0000
commit036a299407e65b08c88329ea9d5371f1df451e8e (patch)
tree0a61f31dc405742a357dbf313407739082e56dfd /pw_presubmit
parentcc6101efb0ed2fdfb5f8889dfebb94a70806b6a2 (diff)
downloadpigweed-036a299407e65b08c88329ea9d5371f1df451e8e.tar.gz
pw_presubmit: Add gn_crypto_mbedtls_build
Adds a presubmit step in the "Full" program to make sure `pw_crypto:tests` passes against Mbed TLS. No-Docs-Update-Reason: N/A Change-Id: I0f71bd972b0b3aa7b19022bb8354b00723f85aa3 Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/51942 Commit-Queue: Ali Zhang <alizhang@google.com> Reviewed-by: Keir Mierle <keir@google.com> Reviewed-by: Rob Mohr <mohrr@google.com>
Diffstat (limited to 'pw_presubmit')
-rwxr-xr-xpw_presubmit/py/pw_presubmit/pigweed_presubmit.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/pw_presubmit/py/pw_presubmit/pigweed_presubmit.py b/pw_presubmit/py/pw_presubmit/pigweed_presubmit.py
index 1ee8f610c..65d3faad9 100755
--- a/pw_presubmit/py/pw_presubmit/pigweed_presubmit.py
+++ b/pw_presubmit/py/pw_presubmit/pigweed_presubmit.py
@@ -152,6 +152,20 @@ def gn_nanopb_build(ctx: PresubmitContext):
@filter_paths(endswith=_BUILD_EXTENSIONS)
+def gn_crypto_mbedtls_build(ctx: PresubmitContext):
+ build.install_package(ctx.package_root, 'mbedtls')
+ build.gn_gen(
+ ctx.root,
+ ctx.output_dir,
+ dir_pw_third_party_mbedtls='"{}"'.format(ctx.package_root / 'mbedtls'),
+ pw_crypto_SHA256_BACKEND='"{}"'.format(ctx.root /
+ 'pw_crypto:sha256_mbedtls'),
+ pw_crypto_ECDSA_BACKEND='"{}"'.format(ctx.root /
+ 'pw_crypto:ecdsa_mbedtls'))
+ build.ninja(ctx.output_dir)
+
+
+@filter_paths(endswith=_BUILD_EXTENSIONS)
def gn_teensy_build(ctx: PresubmitContext):
build.install_package(ctx.package_root, 'teensy')
build.gn_gen(ctx.root,
@@ -667,6 +681,7 @@ OTHER_CHECKS = (
cmake_tests,
gn_boringssl_build,
gn_nanopb_build,
+ gn_crypto_mbedtls_build,
gn_full_build_check,
gn_full_qemu_check,
gn_clang_build,