mirror of
https://git.yoctoproject.org/poky
synced 2026-05-31 12:49:46 +00:00
LSB_Setup.sh: Add function to install all test packages
Add function to install all of lsb test suite packages instead of installing parts of test packages (From OE-Core rev: 7bcfbdda6f70bb7dad585091469f54cea89f07b4) Signed-off-by: Xiaofeng Yan <xiaofeng.yan@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
5983fe176d
commit
20c9be46e7
@@ -17,11 +17,38 @@
|
|||||||
|
|
||||||
##Prepare Steps
|
##Prepare Steps
|
||||||
#Steps 0; Confirm the installed LSB Packages
|
#Steps 0; Confirm the installed LSB Packages
|
||||||
|
ARCH=`uname -m`
|
||||||
|
APP_FILE=`ls /lsb-Application/*.rpm`
|
||||||
if [ ! -f /opt/lsb/test/manager/bin/dist-checker-start.pl ]
|
if [ ! -f /opt/lsb/test/manager/bin/dist-checker-start.pl ]
|
||||||
then
|
then
|
||||||
if [ -d /lsb-dist-testkit ];then
|
if [ -d /lsb-dist-testkit ];then
|
||||||
cd /lsb-dist-testkit && sh install.sh && cd ../lsb-Application && rpm -ivh *.rpm --nodeps --force
|
if [ ${ARCH} == i686 ];then
|
||||||
|
echo "i486-suse" >> /etc/rpm/platform
|
||||||
|
echo "i486-noarch" >> /etc/rpm/platform
|
||||||
|
echo "i486-pc" >> /etc/rpm/platform
|
||||||
|
echo "noarch-suse" >> /etc/rpm/platform
|
||||||
|
else
|
||||||
|
echo "${ARCH}-suse" >> /etc/rpm/platform
|
||||||
|
echo "${ARCH}-noarch" >> /etc/rpm/platform
|
||||||
|
echo "${ARCH}-pc" >> /etc/rpm/platform
|
||||||
|
echo "noarch-suse" >> /etc/rpm/platform
|
||||||
|
fi
|
||||||
|
cd /lsb-dist-testkit && sh install.sh && cd ../lsb-Application
|
||||||
|
for i in ${APP_FILE}
|
||||||
|
do
|
||||||
|
echo "$i" |grep -q "apache"
|
||||||
|
if [ $? -eq 0 ]
|
||||||
|
then
|
||||||
|
rpm -ivh $i --noscripts --nodeps --force
|
||||||
|
else
|
||||||
|
rpm -ivh $i --nodeps --force
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
mkdir -p /var/opt/lsb/test/manager/packages/ftp.linuxfoundation.org/pub/lsb/snapshots/appbat/tests/
|
||||||
|
mkdir -p /var/opt/lsb/test/manager/packages/ftp.linuxfoundation.org/pub/lsb/app-battery/tests/
|
||||||
|
cp expect-tests.tar test1.pdf test2.pdf /var/opt/lsb/test/manager/packages/ftp.linuxfoundation.org/pub/lsb/app-battery/tests/
|
||||||
|
cp raptor-tests.tar tcl-tests.tar /var/opt/lsb//test/manager/packages/ftp.linuxfoundation.org/pub/lsb/snapshots/appbat/tests/
|
||||||
|
cd ..
|
||||||
else
|
else
|
||||||
echo "Please install the realted LSB Packages"
|
echo "Please install the realted LSB Packages"
|
||||||
exit 1
|
exit 1
|
||||||
@@ -33,10 +60,6 @@ id tester
|
|||||||
if [ $? -eq 0 ]
|
if [ $? -eq 0 ]
|
||||||
then
|
then
|
||||||
echo "User tester was existed"
|
echo "User tester was existed"
|
||||||
echo -n "Deleted tester(yes/no):"
|
|
||||||
read INPUT
|
|
||||||
case $INPUT in
|
|
||||||
yes|y)
|
|
||||||
sleep 1
|
sleep 1
|
||||||
userdel -rf tester
|
userdel -rf tester
|
||||||
if [ $? -eq 0 ] || [ $? -eq 6 ]
|
if [ $? -eq 0 ] || [ $? -eq 6 ]
|
||||||
@@ -45,19 +68,6 @@ yes|y)
|
|||||||
else
|
else
|
||||||
echo "Fail to delete user tester"
|
echo "Fail to delete user tester"
|
||||||
fi
|
fi
|
||||||
;;
|
|
||||||
no|n)
|
|
||||||
sleep 1
|
|
||||||
echo "There must be deleted User test before ran LSB4 on Target"
|
|
||||||
echo ""
|
|
||||||
exit 1
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
sleep 1
|
|
||||||
echo "Input ERROR, pls reinput that your expected"
|
|
||||||
echo ""
|
|
||||||
exit 1
|
|
||||||
esac
|
|
||||||
else
|
else
|
||||||
echo "There was not User tester"
|
echo "There was not User tester"
|
||||||
fi
|
fi
|
||||||
@@ -177,7 +187,7 @@ ping -c 5 ftp.linux-foundation.org
|
|||||||
check
|
check
|
||||||
|
|
||||||
#Step 7
|
#Step 7
|
||||||
insmod /lib/modules/2.6.37.2-yocto-standard\+/kernel/drivers/block/loop.ko
|
insmod /lib/modules/2.6.*/kernel/drivers/block/loop.ko
|
||||||
if [ $? != 0 ];then
|
if [ $? != 0 ];then
|
||||||
echo "Please insmod loop.ko manully"
|
echo "Please insmod loop.ko manully"
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user