Module Name: src
Committed By: pgoyette
Date: Sat Jan 1 23:45:01 UTC 2011
Modified Files:
src/tests/lib/libc/gen: Makefile t_ldexp.c
Log Message:
Build t_ldexp test always. The test itself determines if it is running
on an unsupported platform (vax) and exits.
To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/tests/lib/libc/gen/Makefile
cvs rdiff -u -r1.1 -r1.2 src/tests/lib/libc/gen/t_ldexp.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/tests/lib/libc/gen/Makefile
diff -u src/tests/lib/libc/gen/Makefile:1.10 src/tests/lib/libc/gen/Makefile:1.11
--- src/tests/lib/libc/gen/Makefile:1.10 Tue Dec 28 20:25:31 2010
+++ src/tests/lib/libc/gen/Makefile Sat Jan 1 23:45:01 2011
@@ -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>
Index: src/tests/lib/libc/gen/t_ldexp.c
diff -u src/tests/lib/libc/gen/t_ldexp.c:1.1 src/tests/lib/libc/gen/t_ldexp.c:1.2
--- src/tests/lib/libc/gen/t_ldexp.c:1.1 Tue Dec 28 16:57:00 2010
+++ src/tests/lib/libc/gen/t_ldexp.c Sat Jan 1 23:45:01 2011
@@ -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();
}