diff options
author | Bill Richardson <wfrichar@chromium.org> | 2015-03-24 13:04:24 -0700 |
---|---|---|
committer | ChromeOS Commit Bot <chromeos-commit-bot@chromium.org> | 2015-03-27 01:34:21 +0000 |
commit | d2e7493e3632952241077008e8b4e001a6faaeea (patch) | |
tree | 40c1b9de18be24ff849dd6fe0b2bebcedaa82b80 | |
parent | 52ec0758968d779e3bbacfa0ac988af0624fb274 (diff) | |
download | vboot-d2e7493e3632952241077008e8b4e001a6faaeea.tar.gz |
futility: Fix test_create.sh to use ID field for vb21
This test was passing, but wasn't checking all the output files.
Now it should.
BUG=none
BRANCH=none
TEST=make runtests
Change-Id: Ida747e47635026a487f001ea196c23b298730a42
Signed-off-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/262716
Reviewed-by: Randall Spangler <rspangler@chromium.org>
-rwxr-xr-x | tests/futility/test_create.sh | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/tests/futility/test_create.sh b/tests/futility/test_create.sh index 78b9e04a..662b2ddb 100755 --- a/tests/futility/test_create.sh +++ b/tests/futility/test_create.sh @@ -39,10 +39,17 @@ done for sig in rsa1024 rsa2048 rsa4096 rsa8192; do pem_sum=$(${FUTILITY} show "${TESTKEYS}/key_${sig}.pem" | awk '/sha1sum/ {print $3}') + # expect only one + [ $(echo "$pem_sum" | wc -w) = 1 ] + num_keys=$(echo ${TMP}_key_${sig}.* | wc -w) key_sums=$(${FUTILITY} show ${TMP}_key_${sig}.* | - awk '/sha1sum/ {print $3}' | uniq) + awk '/sha1sum:|ID:/ {print $NF}') + num_sums=$(echo "$key_sums" | wc -w) + # expect one sha1sum (or ID) line per file + [ "$num_keys" = "$num_sums" ] + uniq_sums=$(echo "$key_sums" | uniq) # note that this also tests that all the key_sums are the same - [ "$pem_sum" = "$key_sums" ] + [ "$pem_sum" = "$uniq_sums" ] done # cleanup |