Gentoo Archives: gentoo-commits

From: "Mike Frysinger (vapier)" <vapier@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in eclass/tests: tests-common.sh toolchain-funcs.sh
Date: Wed, 02 Jan 2008 01:01:24
Message-Id: E1J9ryw-0008O8-My@stork.gentoo.org
1 vapier 08/01/02 01:01:18
2
3 Added: tests-common.sh toolchain-funcs.sh
4 Log:
5 eclass tests
6
7 Revision Changes Path
8 1.1 eclass/tests/tests-common.sh
9
10 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/tests/tests-common.sh?rev=1.1&view=markup
11 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/tests/tests-common.sh?rev=1.1&content-type=text/plain
12
13 Index: tests-common.sh
14 ===================================================================
15 #!/bin/bash
16
17 source /etc/init.d/functions.sh
18
19 inherit() {
20 local e
21 for e in "$@" ; do
22 source ../${e}.eclass
23 done
24 }
25
26
27
28 1.1 eclass/tests/toolchain-funcs.sh
29
30 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/tests/toolchain-funcs.sh?rev=1.1&view=markup
31 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/eclass/tests/toolchain-funcs.sh?rev=1.1&content-type=text/plain
32
33 Index: toolchain-funcs.sh
34 ===================================================================
35 #!/bin/bash
36
37 source tests-common.sh
38
39 inherit toolchain-funcs
40
41 #
42 # TEST: tc-arch-kernel
43 #
44 test-tc-arch-kernel() {
45 local ret=0
46 KV=$1 ; shift
47 for CHOST in "$@" ; do
48 exp=${CHOST##*:}
49 CHOST=${CHOST%%:*}
50 actual=$(tc-arch-kernel)
51
52 if [[ ${actual} != ${exp:-${CHOST}} ]] ; then
53 eerror "Failure for CHOST: ${CHOST} Expected: ${exp} != Actual: ${actual}"
54 ((++ret))
55 fi
56 done
57 return ${ret}
58 }
59 ebegin "Testing tc-arch-kernel() (KV=2.6.0)"
60 test-tc-arch-kernel 2.6.0 \
61 alpha arm{,eb}:arm avr32 bfin:blackfin cris hppa:parisc \
62 i{3..6}86:i386 ia64 m68k mips{,eb}:mips nios2 powerpc:ppc powerpc64:ppc64 \
63 s390{,x}:s390 sh{1..4}{,eb}:sh sparc{,64} vax x86_64
64 eend $?
65 ebegin "Testing tc-arch-kernel() (KV=2.6.30)"
66 test-tc-arch-kernel 2.6.30 \
67 i{3..6}86:x86 x86_64:x86 \
68 powerpc{,64}:powerpc
69 eend $?
70
71 #
72 # TEST: tc-arch
73 #
74 ebegin "Testing tc-arch"
75 ret=0
76 for CHOST in \
77 alpha arm{,eb}:arm avr32:avr bfin cris hppa i{3..6}86:x86 ia64 m68k \
78 mips{,eb}:mips nios2 powerpc:ppc powerpc64:ppc64 s390{,x}:s390 \
79 sh{1..4}{,eb}:sh sparc{,64}:sparc vax x86_64:amd64
80 do
81 exp=${CHOST##*:}
82 CHOST=${CHOST%%:*}
83 actual=$(tc-arch)
84
85 if [[ ${actual} != ${exp:-${CHOST}} ]] ; then
86 eerror "Failure for CHOST: ${CHOST} Expected: ${exp} != Actual: ${actual}"
87 ((++ret))
88 fi
89 done
90 eend ${ret}
91
92
93
94 --
95 gentoo-commits@g.o mailing list