From 5951e0397fd81f6eded335726f257b4d6e379c94 Mon Sep 17 00:00:00 2001 From: Guillaume Endignoux <guillaumee@google.com> Date: Thu, 6 Feb 2020 14:15:34 +0100 Subject: [PATCH] Pass features to crypto bench example. --- deploy.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/deploy.sh b/deploy.sh index 974888d..e02fb38 100755 --- a/deploy.sh +++ b/deploy.sh @@ -176,9 +176,18 @@ build_app () { } build_crypto_bench () { + # Flatten the array + # This is equivalent to the following python snippet: ' '.join(arr).replace(' ', ',') + local feature_list=$(IFS=$'\n'; echo "$@") + if [ "X${feature_list}" != "X" ] + then + feature_list="${feature_list// /,}" + fi + cargo build \ --release \ --target=thumbv7em-none-eabi \ + --features="${feature_list}" \ --example crypto_bench mkdir -p "target/tab" @@ -310,7 +319,7 @@ fi if [ "$install_app" = "crypto_bench" ] then - build_crypto_bench + build_crypto_bench "${!enabled_features[@]}" fi if [ "$install_app" != "none" ] -- GitLab