summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorRobert Schwebel <r.schwebel@pengutronix.de>2006-02-11 11:52:18 +0000
committerRobert Schwebel <r.schwebel@pengutronix.de>2006-02-11 11:52:18 +0000
commitf5560d2769cbf705e447f2b640c96a056eced286 (patch)
tree24eb7909c99edf6ff0b642fb79b075e3e72715db /tests
parent92ae0cbbc5b4f3731c11ef88a9c62f3dd3ce8ac5 (diff)
downloadptxdist-f5560d2769cbf705e447f2b640c96a056eced286.tar.gz
ptxdist-f5560d2769cbf705e447f2b640c96a056eced286.tar.xz
moved to tests
git-svn-id: https://svn.pengutronix.de/svn/ptxdist/trunks/ptxdist-0.10-trunk@4569 33e552b5-05e3-0310-8538-816dae2090ed
Diffstat (limited to 'tests')
-rwxr-xr-xtests/cuckoo-test70
1 files changed, 70 insertions, 0 deletions
diff --git a/tests/cuckoo-test b/tests/cuckoo-test
new file mode 100755
index 000000000..ab60a56cd
--- /dev/null
+++ b/tests/cuckoo-test
@@ -0,0 +1,70 @@
+#! /bin/sh
+
+if [ $# != 3 ]; then
+ echo "usage: $0 <arch> <root-path> <arch-prefix>"
+ exit 1
+fi
+
+case $1 in
+ arm)
+ CPUVENDOR="ARM"
+ ;;
+ i?86)
+ CPUVENDOR="Intel"
+ ;;
+ ppc)
+ CPUVENDOR="PowerPC"
+ ;;
+ sparc)
+ CPUVENDOR="SPARC"
+ ;;
+ mips)
+ CPUVENDOR="MIPS"
+ ;;
+ *)
+ @echo please add CPUVENDOR to Makefile
+ exit 1
+ ;;
+esac
+cd $2
+echo
+echo $CPUVENDOR cuckoo test
+
+echo "1 pass (egg test)"
+find . -type f -a \! -path "*share/terminfo*" -exec file {} \; | sed \
+-e "s/ASCII.*/+++OK+++/" \
+-e "s/Bourne.*executable/+++OK+++/" \
+-e "s/empty/+++OK+++/" \
+-e "s/Bourne.*text/+++OK+++/" \
+-e "s/PPCBoot.*/+++OK+++/" \
+-e "s/ELF.*$CPUVENDOR.*/+++OK+++/" \
+-e "s/FIGlet.*/+++OK+++/" \
+-e "s/python script.*/+++OK+++/" \
+-e "s/Berkeley DB.*/+++OK+++/" \
+-e "s/Compiled terminfo entry.*/+++OK+++/" \
+-e "s/python.*byte-compiled.*/+++OK+++/" \
+-e "s/data/+++OK+++/" \
+-e "s/MPEG.*/+++OK+++/" \
+-e "s/XML.*/+++OK+++/" \
+-e "s/.*\.qpf/+++OK+++/" \
+-e "s/exported SGML document text/+++OK+++/" \
+-e "s/.*\.bin: $/+++OK+++/" \
+ | \
+grep -v "+++OK+++" | \
+awk -F, '{print substr($1, 1, index($1,":"))" wrong architecture! ("$2")"}'
+echo "---"
+
+echo "2 pass (fluff up test)"
+find . -type f -exec file {} \; | grep -v "\.ko" | grep -v ".*\.qpf" | grep "not stripped" |
+awk -F: '{print $1" not stripped"}'
+echo "---"
+
+echo "3 pass (in laws test)"
+
+find . -type f -exec file {} \; | \
+awk -F: -vARCH=$3 '{if (index($2,"ELF")) print ARCH"readelf -d "$1}' | \
+sh | grep "(NEEDED)" | \
+awk '{gsub("\\[","");gsub("\\]","");print "if [ \"x$(find . -name "$5")\" = \"x\" ]; then echo "$5" not found ; fi"}' | \
+sort -u | sh
+
+echo "---"