summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2006-02-14 03:49:49 +0000
committerMike Frysinger <vapier@gentoo.org>2006-02-14 03:49:49 +0000
commitccb3a37f9323bfc0b90c18d717eb4838350d9696 (patch)
tree6d21898a258c00ce425731805b746bda686b2c53 /test
parent3ed790f7d6d8d14020e5015249d728031467ecf3 (diff)
convert to new test framework
Diffstat (limited to 'test')
-rw-r--r--test/pwd_grp/Makefile195
-rw-r--r--test/rpc/Makefile40
-rw-r--r--test/stat/Makefile102
-rw-r--r--test/stdlib/Makefile183
4 files changed, 31 insertions, 489 deletions
diff --git a/test/pwd_grp/Makefile b/test/pwd_grp/Makefile
index 8dce73b71..0e4516c32 100644
--- a/test/pwd_grp/Makefile
+++ b/test/pwd_grp/Makefile
@@ -1,189 +1,12 @@
-# Makefile for uClibc
-#
-# Copyright (C) 2000,2001 Erik Andersen <andersen@uclibc.org>
-#
-# This program is free software; you can redistribute it and/or modify it under
-# the terms of the GNU Library General Public License as published by the Free
-# Software Foundation; either version 2 of the License, or (at your option) any
-# later version.
-#
-# This program is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-# FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more
-# details.
-#
-# You should have received a copy of the GNU Library General Public License
-# along with this program; if not, write to the Free Software Foundation, Inc.,
-# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# uClibc pwd_grp tests
+# Licensed under the GNU Library General Public License, see COPYING.LIB
-include ../Rules.mak
+TESTS := test_pwd test_grp pwcat grcat getgroups
-U_TARGETS := test_pwd test_grp pwcat grcat getgroups
-G_TARGETS := $(patsubst %,%_glibc,$(U_TARGETS))
+include ../Test.mak
-TARGETS :=
-ifeq ($(GLIBC_ONLY),)
-TARGETS += $(U_TARGETS)
-endif
-ifeq ($(UCLIBC_ONLY),)
-TARGETS += $(G_TARGETS)
-endif
-
-ifeq ($(GLIBC_ONLY),$(UCLIBC_ONLY))
-TARGETS+=test_pwd_diff test_grp_diff pwcat_diff grcat_diff getgroups_diff
-endif
-
-all: $(TARGETS)
-
-test_pwd: test_pwd.c Makefile $(TESTDIR)/Rules.mak
- -@ echo "-------"
- -@ echo " "
- -@ echo "Compiling $@ vs uClibc: "
- -@ echo " "
- $(CC) $(CFLAGS) -c $< -o $@.o
- $(CC) $(LDFLAGS) $@.o -o $@ $(EXTRA_LIBS)
- $(STRIPTOOL) -x -R .note -R .comment $@
- ./$@ 2>&1 >test_pwd.out
- -@ echo " "
-
-test_pwd_glibc: test_pwd.c Makefile
- -@ echo "-------"
- -@ echo " "
- -@ echo "Compiling $@ vs glibc: "
- -@ echo " "
- $(HOSTCC) $(GLIBC_CFLAGS) -c $< -o $@.o
- $(HOSTCC) $(GLIBC_LDFLAGS) $@.o -o $@
- $(STRIPTOOL) -x -R .note -R .comment $@
- ./$@ 2>&1 >test_pwd_glibc.out
- -@ echo " "
-
-test_grp: test_grp.c Makefile $(TESTDIR)/Rules.mak
- -@ echo "-------"
- -@ echo " "
- -@ echo "Compiling $@ vs uClibc: "
- -@ echo " "
- $(CC) $(CFLAGS) -c $< -o $@.o
- $(CC) $(LDFLAGS) $@.o -o $@ $(EXTRA_LIBS)
- $(STRIPTOOL) -x -R .note -R .comment $@
- ./$@ 2>&1 >test_grp.out
- -@ echo " "
-
-test_grp_glibc: test_grp.c Makefile
- -@ echo "-------"
- -@ echo " "
- -@ echo "Compiling $@ vs glibc: "
- -@ echo " "
- $(HOSTCC) $(GLIBC_CFLAGS) -c $< -o $@.o
- $(HOSTCC) $(GLIBC_LDFLAGS) $@.o -o $@
- $(STRIPTOOL) -x -R .note -R .comment $@
- ./$@ 2>&1 >test_grp_glibc.out
- -@ echo " "
-
-pwcat: pwcat.c Makefile $(TESTDIR)/Rules.mak
- -@ echo "-------"
- -@ echo " "
- -@ echo "Compiling $@ vs uClibc: "
- -@ echo " "
- $(CC) $(CFLAGS) -c $< -o $@.o
- $(CC) $(LDFLAGS) $@.o -o $@ $(EXTRA_LIBS)
- $(STRIPTOOL) -x -R .note -R .comment $@
- ./$@ 2>&1 >pwcat.out
- -@ echo " "
-
-pwcat_glibc: pwcat.c Makefile
- -@ echo "-------"
- -@ echo " "
- -@ echo "Compiling $@ vs glibc: "
- -@ echo " "
- $(HOSTCC) $(GLIBC_CFLAGS) -c $< -o $@.o
- $(HOSTCC) $(GLIBC_LDFLAGS) $@.o -o $@
- $(STRIPTOOL) -x -R .note -R .comment $@
- ./$@ 2>&1 >pwcat_glibc.out
- -@ echo " "
-
-grcat: grcat.c Makefile $(TESTDIR)/Rules.mak
- -@ echo "-------"
- -@ echo " "
- -@ echo "Compiling $@ vs uClibc: "
- -@ echo " "
- $(CC) $(CFLAGS) -c $< -o $@.o
- $(CC) $(LDFLAGS) $@.o -o $@ $(EXTRA_LIBS)
- $(STRIPTOOL) -x -R .note -R .comment $@
- ./$@ 2>&1 >grcat.out
- -@ echo " "
-
-grcat_glibc: grcat.c Makefile
- -@ echo "-------"
- -@ echo " "
- -@ echo "Compiling $@ vs glibc: "
- -@ echo " "
- $(HOSTCC) $(GLIBC_CFLAGS) -c $< -o $@.o
- $(HOSTCC) $(GLIBC_LDFLAGS) $@.o -o $@
- $(STRIPTOOL) -x -R .note -R .comment $@
- ./$@ 2>&1 >grcat_glibc.out
- -@ echo " "
-
-getgroups: getgroups.c Makefile $(TESTDIR)/Rules.mak
- -@ echo "-------"
- -@ echo " "
- -@ echo "Compiling $@ vs uClibc: "
- -@ echo " "
- $(CC) $(CFLAGS) -c $< -o $@.o
- $(CC) $(LDFLAGS) $@.o -o $@ $(EXTRA_LIBS)
- $(STRIPTOOL) -x -R .note -R .comment $@
- ./$@ 2>&1 >getgroups.out
- -@ echo " "
-
-getgroups_glibc: getgroups.c Makefile
- -@ echo "-------"
- -@ echo " "
- -@ echo "Compiling $@ vs glibc: "
- -@ echo " "
- $(HOSTCC) $(GLIBC_CFLAGS) -c $< -o $@.o
- $(HOSTCC) $(GLIBC_LDFLAGS) $@.o -o $@
- $(STRIPTOOL) -x -R .note -R .comment $@
- ./$@ 2>&1 >getgroups_glibc.out
- -@ echo " "
-
-test_pwd_diff: test_pwd_glibc test_pwd
- -@ echo "-------"
- -@ echo " "
- -@ echo "Diffing output: "
- -@ echo " "
- -diff -u test_pwd_glibc.out test_pwd.out
- -@ echo " "
-
-test_grp_diff: test_grp_glibc test_grp
- -@ echo "-------"
- -@ echo " "
- -@ echo "Diffing output: "
- -@ echo " "
- -diff -u test_grp_glibc.out test_grp.out
- -@ echo " "
-
-pwcat_diff: pwcat_glibc pwcat
- -@ echo "-------"
- -@ echo " "
- -@ echo "Diffing output: "
- -@ echo " "
- -diff -u pwcat_glibc.out pwcat.out
- -@ echo " "
-
-grcat_diff: grcat_glibc grcat
- -@ echo "-------"
- -@ echo " "
- -@ echo "Diffing output: "
- -@ echo " "
- -diff -u grcat_glibc.out grcat.out
- -@ echo " "
-
-getgroups_diff: getgroups_glibc getgroups
- -@ echo "-------"
- -@ echo " "
- -@ echo "Diffing output: "
- -@ echo " "
- -diff -u getgroups_glibc.out getgroups.out
- -@ echo " "
-
-clean:
- $(RM) *.[oa] *~ core $(TARGETS) *.out
+DODIFF_test_pwd := 1
+DODIFF_test_grp := 1
+DODIFF_pwcat := 1
+DODIFF_grcat := 1
+DODIFF_getgroups := 1
diff --git a/test/rpc/Makefile b/test/rpc/Makefile
index 58f04f634..779300199 100644
--- a/test/rpc/Makefile
+++ b/test/rpc/Makefile
@@ -1,38 +1,8 @@
-# Makefile for uClibc
-#
-# Copyright (C) 2005 Erik Andersen <andersen@uclibc.org>
+# uClibc rpc tests
+# Licensed under the GNU Library General Public License, see COPYING.LIB
-include ../Rules.mak
+TESTS := getrpcent
-# getrpcent_r_diff
-TARGETS = getrpcent getrpcent_glibc getrpcent_diff
+include ../Test.mak
-all: $(TARGETS)
-
-getrpcent: getrpcent.c Makefile $(TESTDIR)/Rules.mak
- -@ echo "-------"
- -@ echo " "
- -@ echo "Compiling $@ vs uClibc: "
- -@ echo " "
- $(CC) $(CFLAGS) -c $< -o $@.o
- $(CC) $(LDFLAGS) $@.o -o $@ $(EXTRA_LIBS)
- $(STRIPTOOL) -x -R .note -R .comment $@
- ./$@ > getrpcent.out
- -@ echo " "
-
-getrpcent_glibc: getrpcent.c Makefile $(TESTDIR)/Rules.mak
- -@ echo "-------"
- -@ echo " "
- -@ echo "Compiling $@ vs glibc: "
- -@ echo " "
- $(HOSTCC) $(GLIBC_CFLAGS) -c $< -o $@.o
- $(HOSTCC) $(GLIBC_LDFLAGS) $@.o -o $@
- $(STRIPTOOL) -x -R .note -R .comment $@
- ./$@ > getrpcent_glibc.out
- -@ echo " "
-
-getrpcent_diff: getrpcent getrpcent_glibc
- diff -u getrpcent_glibc.out getrpcent.out
-
-clean:
- $(RM) *.[oa] *~ core $(TARGETS) *.out
+DODIFF_getrpcent := 1
diff --git a/test/stat/Makefile b/test/stat/Makefile
index 558b67510..cf21ef76d 100644
--- a/test/stat/Makefile
+++ b/test/stat/Makefile
@@ -1,98 +1,14 @@
-# Makefile for uClibc
-#
-# Copyright (C) 2000,2001 Erik Andersen <andersen@uclibc.org>
-#
-# This program is free software; you can redistribute it and/or modify it under
-# the terms of the GNU Library General Public License as published by the Free
-# Software Foundation; either version 2 of the License, or (at your option) any
-# later version.
-#
-# This program is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-# FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more
-# details.
-#
-# You should have received a copy of the GNU Library General Public License
-# along with this program; if not, write to the Free Software Foundation, Inc.,
-# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# uClibc stat tests
+# Licensed under the GNU Library General Public License, see COPYING.LIB
-include ../Rules.mak
+TESTS := stat stat64
-CFLAGS64=-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
+include ../Test.mak
+CFLAGS_stat64 := -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
-TARGETS=stat_diff stat64_diff
+DODIFF_stat := 1
+DODIFF_stat64 := 1
-all: $(TARGETS)
-
-stat_source:
- -@ $(RM) $(TARGETS)
- -@ echo "-------"
- -@ echo "stat.c source: "
- -@ echo " "
- -@ cat stat.c
- -@ echo " "
-
-stat: stat.c Makefile $(TESTDIR)/Rules.mak
- -@ echo "-------"
- -@ echo " "
- -@ echo "Compiling $@ vs uClibc: "
- -@ echo " "
- $(CC) $(CFLAGS) -c $< -o $@.o
- $(CC) $(LDFLAGS) $@.o -o $@ $(EXTRA_LIBS)
- $(STRIPTOOL) -x -R .note -R .comment $@
- ./$@ stat.c > $@.out
- -@ echo " "
-
-stat_glibc: stat.c Makefile
- -@ echo "-------"
- -@ echo " "
- -@ echo "Compiling $@ vs glibc: "
- -@ echo " "
- $(HOSTCC) $(GLIBC_CFLAGS) -c $< -o $@.o
- $(HOSTCC) $(GLIBC_LDFLAGS) $@.o -o $@
- $(STRIPTOOL) -x -R .note -R .comment $@
- ./$@ stat.c > $@.out
- -@ echo " "
-
-stat_diff: stat stat_glibc
- -@ echo "-------"
- -@ echo " "
- -@ echo "Diffing stat output: "
- -@ echo " "
- -diff -u stat_glibc.out stat.out
- -@ echo " "
-
-stat64: stat.c Makefile $(TESTDIR)/Rules.mak
- -@ echo "-------"
- -@ echo " "
- -@ echo "Compiling $@ vs uClibc: "
- -@ echo " "
- $(CC) $(CFLAGS) $(CFLAGS64) -c $< -o $@.o
- $(CC) $(LDFLAGS) $@.o -o $@ $(EXTRA_LIBS)
- $(STRIPTOOL) -x -R .note -R .comment $@
- ./$@ stat.c > $@.out
- -@ echo " "
-
-stat64_glibc: stat.c Makefile
- -@ echo "-------"
- -@ echo " "
- -@ echo "Compiling $@ vs glibc: "
- -@ echo " "
- $(HOSTCC) $(GLIBC_CFLAGS) $(CFLAGS64) -c $< -o $@.o
- $(HOSTCC) $(GLIBC_LDFLAGS) $@.o -o $@
- $(STRIPTOOL) -x -R .note -R .comment $@
- ./$@ stat.c > $@.out
- -@ echo " "
-
-stat64_diff: stat64 stat64_glibc
- -@ echo "-------"
- -@ echo " "
- -@ echo "Diffing stat64 output: "
- -@ echo " "
- -diff -u stat64_glibc.out stat64.out
- -@ echo " "
-
-clean:
- $(RM) *.[oa] *~ core stat stat_glibc stat_glibc.out stat.out \
- stat64 stat64_glibc stat64_glibc.out stat64.out
+OPTS_stat := stat.c
+OPTS_stat64 := stat64.c
diff --git a/test/stdlib/Makefile b/test/stdlib/Makefile
index f7b03be1a..e18185bb5 100644
--- a/test/stdlib/Makefile
+++ b/test/stdlib/Makefile
@@ -1,178 +1,11 @@
-# Makefile for uClibc
-#
-# Copyright (C) 2000,2001 Erik Andersen <andersen@uclibc.org>
-#
-# This program is free software; you can redistribute it and/or modify it under
-# the terms of the GNU Library General Public License as published by the Free
-# Software Foundation; either version 2 of the License, or (at your option) any
-# later version.
-#
-# This program is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
-# FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more
-# details.
-#
-# You should have received a copy of the GNU Library General Public License
-# along with this program; if not, write to the Free Software Foundation, Inc.,
-# 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+# uClibc stdlib tests
+# Licensed under the GNU Library General Public License, see COPYING.LIB
-include ../Rules.mak
+TESTS := ptytest qsort testatexit teston_exit teststrtol
-TARGETS+=teststrtol teststrtol_glibc teststrtol_diff
-TARGETS+=qsort qsort_glibc qsort_diff
-TARGETS+=teston_exit teston_exit_glibc teston_exit_diff
-TARGETS+=testatexit testatexit_glibc testatexit_diff
-TARGETS+=ptytest
+include ../Test.mak
-all: $(TARGETS)
-
-teststrtol_source:
- -@ echo "-------"
- -@ echo "teststrtol.c source: "
- -@ echo " "
- -@ cat teststrtol.c
- -@ echo " "
-
-teststrtol: teststrtol.c Makefile $(TESTDIR)/Rules.mak
- -@ echo "-------"
- -@ echo " "
- -@ echo "Compiling $@ vs uClibc: "
- -@ echo " "
- $(CC) $(CFLAGS) -c $< -o $@.o
- $(CC) $(LDFLAGS) $@.o -o $@ $(EXTRA_LIBS)
- $(STRIPTOOL) -x -R .note -R .comment $@
- -$(LDD) $@
- ./$@ > $@.out
- -@ echo " "
-
-teststrtol_glibc: teststrtol.c Makefile
- -@ echo "-------"
- -@ echo " "
- -@ echo "Compiling $@ vs glibc: "
- -@ echo " "
- $(HOSTCC) $(GLIBC_CFLAGS) -c $< -o $@.o
- $(HOSTCC) $(GLIBC_LDFLAGS) $@.o -o $@
- $(STRIPTOOL) -x -R .note -R .comment $@
- -$(LDD) $@
- ./$@ > $@.out
- -@ echo " "
-
-teststrtol_diff: teststrtol_glibc teststrtol
- -@ echo "-------"
- -@ echo " "
- -@ echo "Diffing output: "
- -@ echo " "
- diff -u teststrtol_glibc.out teststrtol.out
- -@ echo " "
-
-qsort: qsort.c Makefile $(TESTDIR)/Rules.mak
- -@ echo "-------"
- -@ echo " "
- -@ echo "Compiling $@ vs uClibc: "
- -@ echo " "
- $(CC) $(CFLAGS) -c $< -o $@.o
- $(CC) $(LDFLAGS) $@.o -o $@ $(EXTRA_LIBS)
- $(STRIPTOOL) -x -R .note -R .comment $@
- -$(LDD) $@
- ./$@ > $@.out
- -@ echo " "
-
-qsort_glibc: qsort.c Makefile
- -@ echo "-------"
- -@ echo " "
- -@ echo "Compiling $@ vs glibc: "
- -@ echo " "
- $(HOSTCC) $(GLIBC_CFLAGS) -c $< -o $@.o
- $(HOSTCC) $(GLIBC_LDFLAGS) $@.o -o $@
- $(STRIPTOOL) -x -R .note -R .comment $@
- -$(LDD) $@
- ./$@ > $@.out
- -@ echo " "
-
-qsort_diff: qsort_glibc qsort
- -@ echo "-------"
- -@ echo " "
- -@ echo "Diffing output: "
- -@ echo " "
- diff -u qsort_glibc.out qsort.out
- -@ echo " "
-
-teston_exit: teston_exit.c Makefile $(TESTDIR)/Rules.mak
- -@ echo "-------"
- -@ echo " "
- -@ echo "Compiling $@ vs uClibc: "
- -@ echo " "
- $(CC) $(CFLAGS) -c $< -o $@.o
- $(CC) $(LDFLAGS) $@.o -o $@ $(EXTRA_LIBS)
- $(STRIPTOOL) -x -R .note -R .comment $@
- -$(LDD) $@
- ./$@ > $@.out
- -@ echo " "
-
-teston_exit_glibc: teston_exit.c Makefile
- -@ echo "-------"
- -@ echo " "
- -@ echo "Compiling $@ vs glibc: "
- -@ echo " "
- $(HOSTCC) $(GLIBC_CFLAGS) -c $< -o $@.o
- $(HOSTCC) $(GLIBC_LDFLAGS) $@.o -o $@
- $(STRIPTOOL) -x -R .note -R .comment $@
- -$(LDD) $@
- ./$@ > $@.out
- -@ echo " "
-
-teston_exit_diff: teston_exit_glibc teston_exit
- -@ echo "-------"
- -@ echo " "
- -@ echo "Diffing output: "
- -@ echo " "
- diff -u teston_exit_glibc.out teston_exit.out
- -@ echo " "
-
-testatexit: testatexit.c Makefile $(TESTDIR)/Rules.mak
- -@ echo "-------"
- -@ echo " "
- -@ echo "Compiling $@ vs uClibc: "
- -@ echo " "
- $(CC) $(CFLAGS) -c $< -o $@.o
- $(CC) $(LDFLAGS) $@.o -o $@ $(EXTRA_LIBS)
- $(STRIPTOOL) -x -R .note -R .comment $@
- -$(LDD) $@
- ./$@ > $@.out
- -@ echo " "
-
-testatexit_glibc: testatexit.c Makefile
- -@ echo "-------"
- -@ echo " "
- -@ echo "Compiling $@ vs glibc: "
- -@ echo " "
- $(HOSTCC) $(GLIBC_CFLAGS) -c $< -o $@.o
- $(HOSTCC) $(GLIBC_LDFLAGS) $@.o -o $@
- $(STRIPTOOL) -x -R .note -R .comment $@
- -$(LDD) $@
- ./$@ > $@.out
- -@ echo " "
-
-testatexit_diff: testatexit_glibc testatexit
- -@ echo "-------"
- -@ echo " "
- -@ echo "Diffing output: "
- -@ echo " "
- diff -u testatexit_glibc.out testatexit.out
- -@ echo " "
-
-ptytest: ptytest.c Makefile $(TESTDIR)/Rules.mak
- -@ echo "-------"
- -@ echo " "
- -@ echo "Compiling $@ vs uClibc: "
- -@ echo " "
- $(CC) $(CFLAGS) -c $< -o $@.o
- $(CC) $(LDFLAGS) $@.o -o $@ $(EXTRA_LIBS)
- $(STRIPTOOL) -x -R .note -R .comment $@
- -$(LDD) $@
- ./$@
- -@ echo " "
-
-
-clean:
- $(RM) *.[oa] *~ core $(TARGETS) *.out
+DODIFF_qsort := 1
+DODIFF_testatexit := 1
+DODIFF_teston_exit := 1
+DODIFF_teststrtol := 1