From f6e6df9dbf10c6fbaaa1253132b935959f4b673f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20P=C3=A9gouri=C3=A9-Gonnard?= Date: Mon, 17 Oct 2022 12:24:37 +0200 Subject: [PATCH] Add option for before-after or just ref-drivers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Manuel Pégourié-Gonnard --- .../psa-migration/outcome-analysis.sh | 42 +++++++++++-------- 1 file changed, 24 insertions(+), 18 deletions(-) diff --git a/docs/architecture/psa-migration/outcome-analysis.sh b/docs/architecture/psa-migration/outcome-analysis.sh index f3566b20a7..f777b8fb99 100755 --- a/docs/architecture/psa-migration/outcome-analysis.sh +++ b/docs/architecture/psa-migration/outcome-analysis.sh @@ -48,6 +48,8 @@ IGNORE="md mdx shax" # accelerated IGNORE="$IGNORE entropy hmac_drbg random" # disabled (ext. RNG) IGNORE="$IGNORE psa_crypto_init" # needs internal RNG IGNORE="$IGNORE hkdf" # disabled +# Compare only "reference vs driver" or also "before vs after"? +BEFORE_AFTER=1 # 0 or 1 # ----- END edit this ----- set -eu @@ -63,26 +65,28 @@ record() { make check } -# save current HEAD -HEAD=$(git branch --show-current) +if [ "$BEFORE_AFTER" -eq 1 ]; then + # save current HEAD + HEAD=$(git branch --show-current) -# get the numbers before this PR for default and full -cleanup -git checkout $(git merge-base HEAD development) -record "before-default" + # get the numbers before this PR for default and full + cleanup + git checkout $(git merge-base HEAD development) + record "before-default" -cleanup -scripts/config.py full -record "before-full" + cleanup + scripts/config.py full + record "before-full" -# get the numbers now for default and full -cleanup -git checkout $HEAD -record "after-default" + # get the numbers now for default and full + cleanup + git checkout $HEAD + record "after-default" -cleanup -scripts/config.py full -record "after-full" + cleanup + scripts/config.py full + record "after-full" +fi # get the numbers now for driver-only and reference cleanup @@ -147,6 +151,8 @@ compare_builds () { } populate_suites -compare_builds before-default after-default -compare_builds before-full after-full +if [ "$BEFORE_AFTER" -eq 1 ]; then + compare_builds before-default after-default + compare_builds before-full after-full +fi compare_builds reference drivers