summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/lsb
diff options
context:
space:
mode:
authorXiaofeng Yan <xiaofeng.yan@windriver.com>2010-12-10 16:10:23 +0800
committerSaul Wold <Saul.Wold@intel.com>2010-12-10 22:01:39 -0800
commitbc61818ac096fff071540c174b6660ca31b9ba30 (patch)
tree2ccd437b474f6d43e3a177537ebb6e4f7da50588 /meta/recipes-extended/lsb
parentaac5f5c7883595e55e35474ec08033444e13f710 (diff)
downloadpoky-bc61818ac096fff071540c174b6660ca31b9ba30.tar.gz
lsbsetup: Set up lsb test environment on target platform
This is a script which uses for setting up lsb test environment and install packages of lsb test suite [sgw@linux.intel.com: moved the recipe to a more logical location] Signed-off-by: Xiaofeng Yan<xiaofeng.yan@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
Diffstat (limited to 'meta/recipes-extended/lsb')
-rw-r--r--meta/recipes-extended/lsb/lsb/LSB_Setup.sh197
-rw-r--r--meta/recipes-extended/lsb/lsbsetup_0.9.bb32
2 files changed, 229 insertions, 0 deletions
diff --git a/meta/recipes-extended/lsb/lsb/LSB_Setup.sh b/meta/recipes-extended/lsb/lsb/LSB_Setup.sh
new file mode 100644
index 0000000000..4bf7686c2e
--- /dev/null
+++ b/meta/recipes-extended/lsb/lsb/LSB_Setup.sh
@@ -0,0 +1,197 @@
1#!/bin/bash
2
3# Copyright (c) 2005-2010 Wind River Systems, Inc.
4#
5# This program is free software; you can redistribute it and/or modify
6# it under the terms of the GNU General Public License version 2 as
7# published by the Free Software Foundation.
8#
9# This program is distributed in the hope that it will be useful,
10# but WITHOUT ANY WARRANTY; without even the implied warranty of
11# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
12# See the GNU General Public License for more details.
13#
14# You should have received a copy of the GNU General Public License
15# along with this program; if not, write to the Free Software
16# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17
18##Prepare Steps
19#Steps 0; Confirm the installed LSB Packages
20
21if [ ! -f /opt/lsb/test/manager/bin/dist-checker-start.pl ]
22then
23 if [ -d /lsb-dist-testkit ];then
24 cd /lsb-dist-testkit && sh install.sh
25 else
26 echo "Please install the realted LSB Packages"
27 exit 1
28 fi
29fi
30
31#Steps 1; Deleted existed user tester
32id tester
33if [ $? -eq 0 ]
34then
35 echo "User tester was existed"
36 echo -n "Deleted tester(yes/no):"
37 read INPUT
38case $INPUT in
39yes|y)
40 sleep 1
41 userdel -rf tester
42 if [ $? -eq 0 ] || [ $? -eq 6 ]
43 then
44 echo "Success to delete user tester"
45 else
46 echo "Fail to delete user tester"
47 fi
48 ;;
49no|n)
50 sleep 1
51 echo "There must be deleted User test before ran LSB4 on Target"
52 echo ""
53 exit 1
54 ;;
55*)
56 sleep 1
57 echo "Input ERROR, pls reinput that your expected"
58 echo ""
59 exit 1
60esac
61else
62 echo "There was not User tester"
63fi
64
65##Funs
66check ()
67{
68if [ $? -eq 0 ]
69then
70 echo "PASS"
71else
72 echo "FAIL"
73 exit 1
74fi
75}
76
77###Start
78#Step 1:Add tester group
79echo ""
80echo "---------------------------------"
81echo "Step 1:Add Group tester"
82groupadd tester
83check
84
85
86#Step 2:Add User tester
87echo ""
88echo "---------------------------------"
89echo "Step 2:Add User tester"
90useradd -g tester tester
91check
92
93echo "Check the tester user"
94id tester
95check
96
97#Step 3;Stop Boa server
98#echo ""
99#echo "---------------------------------"
100#echo "Step 3:Stop BOA server"
101#/etc/init.d/boa stop
102#check
103
104#Step 4:Create Dirnames file for RPM
105echo ""
106echo "---------------------------------"
107echo "Step 4:Create the Dirnames on target"
108
109mkdir -pv /etc/rpm/sysinfo
110
111cat > /etc/rpm/sysinfo/Dirnames << EOF
112/etc/opt/lsb
113/home/tet/LSB.tools
114/opt/lsb-tet3-lite/lib/ksh
115/opt/lsb-tet3-lite/lib/perl
116/opt/lsb-tet3-lite/lib/posix_sh
117/opt/lsb-tet3-lite/lib/tet3
118/opt/lsb-tet3-lite/lib/xpg3sh
119/opt/lsb/appbat/lib/python2.4/site-packages/qm
120/opt/lsb/appbat/lib/python2.4/site-packages/qm/external
121/opt/lsb/appbat/lib/python2.4/site-packages/qm/external/DocumentTemplate
122/opt/lsb/appbat/lib/python2.4/site-packages/qm/test
123/opt/lsb/appbat/lib/python2.4/site-packages/qm/test/classes
124/opt/lsb/appbat/lib/python2.4/site-packages/qm/test/web
125/opt/lsb/test/doc
126/opt/lsb/test/lib
127/opt/lsb/test/qm/diagnostics
128/opt/lsb/test/qm/doc
129/opt/lsb/test/qm/doc/test/html
130/opt/lsb/test/qm/doc/test/print
131/opt/lsb/test/qm/dtml
132/opt/lsb/test/qm/dtml/test
133/opt/lsb/test/qm/messages/test
134/opt/lsb/test/qm/tutorial/test/tdb
135/opt/lsb/test/qm/tutorial/test/tdb/QMTest
136/opt/lsb/test/qm/web
137/opt/lsb/test/qm/web/images
138/opt/lsb/test/qm/web/stylesheets
139/opt/lsb/test/qm/xml
140/opt/lsb/test/share
141/usr/share/doc/lsb-runtime-test
142/var/opt/lsb
143/opt/lsb/test/desktop
144/opt/lsb/test/desktop/fontconfig
145/opt/lsb/test/desktop/freetype
146/opt/lsb/test/desktop/gtkvts
147/opt/lsb/test/desktop/libpng
148/opt/lsb/test/desktop/qt3
149/opt/lsb/test/desktop/xft
150/opt/lsb/test/desktop/xml
151/opt/lsb/test/desktop/xrender
152
153
154EOF
155
156if [ -f /etc/rpm/sysinfo/Dirnames ]
157then
158 echo "Success to creat Dirnames file"
159else
160 echo "Fail to creat Dirnames file"
161fi
162
163#Step 5;
164echo ""
165echo "---------------------------------"
166echo "Step 5:"
167ldconfig -v
168check;
169
170#Step 6;
171echo ""
172echo "---------------------------------"
173echo "Step 6:Check with link to ftp.linux-foundation.org"
174echo "140.211.169.59 ftp.linux-foundation.org ftp.linuxfoundation.org" >> /etc/hosts
175
176ping -c 5 ftp.linux-foundation.org
177check
178
179#Step 7
180if [ -f /lib/modules/*-wr-standard/kernel/drivers/block/loop.ko ];then
181 inmod /lib/modules/*-wr-standard/kernel/drivers/block/loop.ko
182fi
183
184#Step 8
185echo ""
186if [ -f /opt/lsb/test/manager/bin/dist-checker-start.pl ];then
187 ./opt/lsb/test/manager/bin/dist-checker-start.pl
188fi
189
190
191#Step 9 get ip address for target platform
192addr=`ifconfig eth0 | grep "inet addr" | awk -F: '{print $2}'|sed s/[[:space:]]Bcast//g`
193echo -e "you should input ${addr}:8888 on your browse"
194#Step 8
195echo "Done!!"
196
197###End
diff --git a/meta/recipes-extended/lsb/lsbsetup_0.9.bb b/meta/recipes-extended/lsb/lsbsetup_0.9.bb
new file mode 100644
index 0000000000..f5b40acb8b
--- /dev/null
+++ b/meta/recipes-extended/lsb/lsbsetup_0.9.bb
@@ -0,0 +1,32 @@
1DESCRIPTION = "auto-setup environment for lsb test"
2SECTION = "console/utils"
3PRIORITY = "required"
4LICENSE = "GPLv2"
5PR = "r0"
6
7
8LIC_FILES_CHKSUM = "file://LSB_Setup.sh;md5=c7360d77e08a7f4f2fa66acf28012e7e"
9
10SRC_URI = "file://LSB_Setup.sh"
11
12LSBFILE=${POKYBASE}/meta/recipes-extended/lsbsetup/lsb/LSB_Setup.sh
13
14S=${WORKDIR}
15
16do_unpack(){
17 cp ${LSBFILE} ${WORKDIR}
18}
19
20
21do_patch(){
22 :
23}
24
25do_configure(){
26 :
27}
28
29do_install(){
30 mkdir -p ${D}/usr/bin
31 cp ${LSBFILE} ${D}/usr/bin
32}