diff options
author | Mike Frysinger <vapier@gentoo.org> | 2006-04-16 21:14:59 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2006-04-16 21:14:59 +0000 |
commit | d017d73399b079bf4c90b6fdfb647a8c5ad6c52a (patch) | |
tree | 095876179a2966a8ecb28c997c187e50e32ab363 /testsuite/all_sourcecode.tests | |
parent | af07a00082c2e44e6db5a294e13ab028e7f996d7 (diff) | |
download | busybox-w32-d017d73399b079bf4c90b6fdfb647a8c5ad6c52a.tar.gz busybox-w32-d017d73399b079bf4c90b6fdfb647a8c5ad6c52a.tar.bz2 busybox-w32-d017d73399b079bf4c90b6fdfb647a8c5ad6c52a.zip |
add a check for obsolete headers
Diffstat (limited to 'testsuite/all_sourcecode.tests')
-rwxr-xr-x | testsuite/all_sourcecode.tests | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/testsuite/all_sourcecode.tests b/testsuite/all_sourcecode.tests index 23b8aec88..83b4bd507 100755 --- a/testsuite/all_sourcecode.tests +++ b/testsuite/all_sourcecode.tests | |||
@@ -56,9 +56,19 @@ rm -f src.typos | |||
56 | # | 56 | # |
57 | find $srcdir/.. '(' -name '*.c' -o -name '*.h' ')' -print0 | xargs -0 \ | 57 | find $srcdir/.. '(' -name '*.c' -o -name '*.h' ')' -print0 | xargs -0 \ |
58 | grep -E -e '\<(bcmp|bcopy|bzero|getwd|index|mktemp|rindex|utimes)\>[[:space:]]*\(' \ | 58 | grep -E -e '\<(bcmp|bcopy|bzero|getwd|index|mktemp|rindex|utimes)\>[[:space:]]*\(' \ |
59 | | sed -e "s:^$srcdir/\.\./::g" > src.obsolete | 59 | | sed -e "s:^$srcdir/\.\./::g" > src.obsolete.funcs |
60 | testing "Obsolete function usage" "cat src.obsolete" "" "" "" | 60 | testing "Obsolete function usage" "cat src.obsolete.funcs" "" "" "" |
61 | rm -f src.obsolete | 61 | rm -f src.obsolete.funcs |
62 | |||
63 | |||
64 | # | ||
65 | # don't allow obsolete headers | ||
66 | # | ||
67 | find $srcdir/.. '(' -name '*.c' -o -name '*.h' ')' -print0 | xargs -0 \ | ||
68 | grep -E -e '\<(malloc|memory)\.h\>' \ | ||
69 | | sed -e "s:^$srcdir/\.\./::g" > src.obsolete.headers | ||
70 | testing "Obsolete function usage" "cat src.obsolete.headers" "" "" "" | ||
71 | rm -f src.obsolete.headers | ||
62 | 72 | ||
63 | 73 | ||
64 | exit $FAILCOUNT | 74 | exit $FAILCOUNT |