From 63d7dad04cd23c71cc96495cc61adb20475a17c2 Mon Sep 17 00:00:00 2001 From: Martin Kroeker Date: Sun, 11 Oct 2020 14:15:35 +0200 Subject: [PATCH] Adapt utests for builds supportin only some variable types --- utest/test_dsdot.c | 17 ++--------------- utest/test_fork.c | 6 ++++++ 2 files changed, 8 insertions(+), 15 deletions(-) diff --git a/utest/test_dsdot.c b/utest/test_dsdot.c index 57da7101e..adef4e91c 100644 --- a/utest/test_dsdot.c +++ b/utest/test_dsdot.c @@ -32,7 +32,7 @@ USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. **********************************************************************************/ #include "openblas_utest.h" - +#if defined(BUILD_SINGLE) && defined(BUILD_DOUBLE) CTEST(dsdot,dsdot_n_1) { float x= 0.172555164F; @@ -47,17 +47,4 @@ CTEST(dsdot,dsdot_n_1) ASSERT_DBL_NEAR_TOL(res2, res1, DOUBLE_EPS); } - -CTEST(dsdot,dsdot_n_2) -{ - float x[] = {0.1F, 0.2F, 0.3F, 0.4F, 0.5F, 0.6F, 0.7F, 0.8F}; - float y[] = {0.1F, 0.2F, 0.3F, 0.4F, 0.5F, 0.6F, 0.7F, 0.8F}; - blasint incx=1; - blasint incy=1; - blasint n=8; - - double res1=0.0f, res2= 2.0400000444054616; - - res1=BLASFUNC(dsdot)(&n, &x, &incx, &y, &incy); - ASSERT_DBL_NEAR_TOL(res2, res1, DOUBLE_EPS); -} \ No newline at end of file +#endif diff --git a/utest/test_fork.c b/utest/test_fork.c index 0b90407b1..5c976f920 100644 --- a/utest/test_fork.c +++ b/utest/test_fork.c @@ -48,6 +48,7 @@ void* xmalloc(size_t n) } } +#ifdef BUILD_DOUBLE void check_dgemm(double *a, double *b, double *result, double *expected, blasint n) { char trans1 = 'T'; @@ -59,9 +60,13 @@ void check_dgemm(double *a, double *b, double *result, double *expected, blasint ASSERT_DBL_NEAR_TOL(expected[i], result[i], DOUBLE_EPS); } } +#endif CTEST(fork, safety) { +#ifndef BUILD_DOUBLE +exit(0); +#else blasint n = 1000; int i; @@ -124,4 +129,5 @@ CTEST(fork, safety) ASSERT_EQUAL(wait_pid, fork_pid); ASSERT_EQUAL(0, WEXITSTATUS (child_status)); } +#endif }