Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/tests/lib/libc/gen Build t_ldexp test always. The test itse...



details:   https://anonhg.NetBSD.org/src/rev/dbc6c69289c0
branches:  trunk
changeset: 760260:dbc6c69289c0
user:      pgoyette <pgoyette%NetBSD.org@localhost>
date:      Sat Jan 01 23:45:01 2011 +0000

description:
Build t_ldexp test always.  The test itself determines if it is running
on an unsupported platform (vax) and exits.

diffstat:

 tests/lib/libc/gen/Makefile  |   8 +++-----
 tests/lib/libc/gen/t_ldexp.c |  22 ++++++++++++++--------
 2 files changed, 17 insertions(+), 13 deletions(-)

diffs (73 lines):

diff -r 6724692ef34b -r dbc6c69289c0 tests/lib/libc/gen/Makefile
--- a/tests/lib/libc/gen/Makefile       Sat Jan 01 23:00:24 2011 +0000
+++ b/tests/lib/libc/gen/Makefile       Sat Jan 01 23:45:01 2011 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.10 2010/12/28 20:25:31 pgoyette Exp $
+# $NetBSD: Makefile,v 1.11 2011/01/01 23:45:01 pgoyette Exp $
 
 .include <bsd.own.mk>
 
@@ -9,6 +9,7 @@
 TESTS_C+=      t_fmtcheck
 TESTS_C+=      t_glob_star
 TESTS_C+=      t_humanize_number
+TESTS_C+=      t_ldexp
 TESTS_C+=      t_rbstress
 TESTS_C+=      t_syslog_pthread
 TESTS_C+=      t_vis
@@ -21,10 +22,7 @@
 TESTS_C+=      t_siginfo
 .endif
 
-.if (${MACHINE_ARCH} != "vax")
-TESTS_C+=      t_ldexp
-.endif
-
+LDADD.t_ldexp+=                -lm
 LDADD.t_syslog_pthread+=-lpthread
 
 .include <bsd.test.mk>
diff -r 6724692ef34b -r dbc6c69289c0 tests/lib/libc/gen/t_ldexp.c
--- a/tests/lib/libc/gen/t_ldexp.c      Sat Jan 01 23:00:24 2011 +0000
+++ b/tests/lib/libc/gen/t_ldexp.c      Sat Jan 01 23:45:01 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: t_ldexp.c,v 1.1 2010/12/28 16:57:00 pgoyette Exp $ */
+/* $NetBSD: t_ldexp.c,v 1.2 2011/01/01 23:45:01 pgoyette Exp $ */
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -30,6 +30,7 @@
  */
 
 #include <atf-c.h>
+#include <atf-c/config.h>
 
 #include <math.h>
 #include <stdio.h>
@@ -195,14 +196,19 @@
 
 ATF_TP_ADD_TCS(tp)
 {
+       const char *arch;
 
-       ATF_TP_ADD_TC(tp, basics);
-       ATF_TP_ADD_TC(tp, zero);
-       ATF_TP_ADD_TC(tp, infinity);
-       ATF_TP_ADD_TC(tp, overflow);
-       ATF_TP_ADD_TC(tp, denormal);
-       ATF_TP_ADD_TC(tp, underflow);
-       ATF_TP_ADD_TC(tp, denormal_large_exp);
+       arch = atf_config_get("atf_arch");
+       if (strcmp("vax", arch) != 0) {
+               ATF_TP_ADD_TC(tp, basics);
+               ATF_TP_ADD_TC(tp, zero);
+               ATF_TP_ADD_TC(tp, infinity);
+               ATF_TP_ADD_TC(tp, overflow);
+               ATF_TP_ADD_TC(tp, denormal);
+               ATF_TP_ADD_TC(tp, underflow);
+               ATF_TP_ADD_TC(tp, denormal_large_exp);
+       } else
+               printf("Test not valid for %s\n", arch);
 
        return atf_no_error();
 }



Home | Main Index | Thread Index | Old Index