From 05df1d32db889cdaea6307a6afb751d9fb7c0ce2 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Fri, 28 Oct 2016 19:17:44 +0200 Subject: allow to skip tests, if uClibc-ng feature is disabled --- test/crypt/sha256c-test.c | 7 +++++-- test/crypt/sha512c-test.c | 7 ++++--- 2 files changed, 9 insertions(+), 5 deletions(-) (limited to 'test/crypt') diff --git a/test/crypt/sha256c-test.c b/test/crypt/sha256c-test.c index 5334cc8..945e294 100644 --- a/test/crypt/sha256c-test.c +++ b/test/crypt/sha256c-test.c @@ -39,9 +39,9 @@ static const struct static int do_test (void) { +#if __UCLIBC_HAS_SHA256_CRYPT_IMPL__ int result = 0; -#if __UCLIBC_HAS_SHA256_CRYPT_IMPL__ int i; for (i = 0; i < ntests; ++i) @@ -55,9 +55,12 @@ do_test (void) result = 1; } } -#endif return result; +#else + return 23; +#endif + } #define TIMEOUT 6 diff --git a/test/crypt/sha512c-test.c b/test/crypt/sha512c-test.c index be55b59..9726e95 100644 --- a/test/crypt/sha512c-test.c +++ b/test/crypt/sha512c-test.c @@ -40,9 +40,9 @@ static const struct static int do_test (void) { +#if __UCLIBC_HAS_SHA512_CRYPT_IMPL__ int result = 0; -#if __UCLIBC_HAS_SHA512_CRYPT_IMPL__ int i; for (i = 0; i < ntests; ++i) @@ -56,9 +56,10 @@ do_test (void) result = 1; } } -#endif - return result; +#else + return 23; +#endif } #define TIMEOUT 6 -- cgit v1.2.3