From 75688e2f713956fcd1e78cb95cf78bc624552345 Mon Sep 17 00:00:00 2001 From: Rob Austein Date: Mon, 25 May 2015 15:52:50 -0400 Subject: Doh, skip tests when we know core isn't present. --- tests/test-aes-key-wrap.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'tests') diff --git a/tests/test-aes-key-wrap.c b/tests/test-aes-key-wrap.c index 79bace6..b956ba0 100644 --- a/tests/test-aes-key-wrap.c +++ b/tests/test-aes-key-wrap.c @@ -136,16 +136,17 @@ int main (int argc, char *argv[]) int failures = 0; printf("Testing whether AES core reports present..."); - if (hal_io_expected(AES_ADDR_NAME0, (const uint8_t *) (AES_CORE_NAME0 AES_CORE_NAME1), 8) == HAL_OK) - printf("yes\n"); - else - printf("no\n"); - - if (!run_test(K_128, sizeof(K_128), C_128, sizeof(C_128))) - failures++; + if (hal_io_expected(AES_ADDR_NAME0, (const uint8_t *) (AES_CORE_NAME0 AES_CORE_NAME1), 8) != HAL_OK) { + printf("no, skipping keywrap tests\n"); + } - if (!run_test(K_256, sizeof(K_256), C_256, sizeof(C_256))) - failures++; + else { + printf("yes\n"); + if (!run_test(K_128, sizeof(K_128), C_128, sizeof(C_128))) + failures++; + if (!run_test(K_256, sizeof(K_256), C_256, sizeof(C_256))) + failures++; + } return failures; } -- cgit v1.2.3