diff options
author | Paul Eggleton <paul.eggleton@linux.intel.com> | 2013-09-19 13:18:06 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-09-20 12:14:32 +0100 |
commit | d469c92394a1a95ae7a45b8b80dc4c2918e0e9a6 (patch) | |
tree | bf46541bf207a6e4f5470b59feac7de9fcb67a1a /scripts/qemuimage-tests/sanity | |
parent | a68b4c6ee780c0efe6c877595d0c10b3192ad80b (diff) | |
download | openembedded-core-d469c92394a1a95ae7a45b8b80dc4c2918e0e9a6.tar.gz openembedded-core-d469c92394a1a95ae7a45b8b80dc4c2918e0e9a6.tar.bz2 openembedded-core-d469c92394a1a95ae7a45b8b80dc4c2918e0e9a6.zip |
classes/imagetest-qemu: remove old image testing class
This has now been superseded by testimage.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Diffstat (limited to 'scripts/qemuimage-tests/sanity')
-rwxr-xr-x | scripts/qemuimage-tests/sanity/boot | 29 | ||||
-rwxr-xr-x | scripts/qemuimage-tests/sanity/compiler | 52 | ||||
-rwxr-xr-x | scripts/qemuimage-tests/sanity/connman | 53 | ||||
-rwxr-xr-x | scripts/qemuimage-tests/sanity/dmesg | 52 | ||||
-rwxr-xr-x | scripts/qemuimage-tests/sanity/rpm_query | 52 | ||||
-rwxr-xr-x | scripts/qemuimage-tests/sanity/scp | 71 | ||||
-rwxr-xr-x | scripts/qemuimage-tests/sanity/shutdown | 76 | ||||
-rwxr-xr-x | scripts/qemuimage-tests/sanity/smart_help | 52 | ||||
-rwxr-xr-x | scripts/qemuimage-tests/sanity/smart_query | 52 | ||||
-rwxr-xr-x | scripts/qemuimage-tests/sanity/ssh | 39 |
10 files changed, 0 insertions, 528 deletions
diff --git a/scripts/qemuimage-tests/sanity/boot b/scripts/qemuimage-tests/sanity/boot deleted file mode 100755 index 5a8c01c9ac..0000000000 --- a/scripts/qemuimage-tests/sanity/boot +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/bash -# -# Boot Test Case for Sanity Test -# The case boot up the Qemu target with `runqemu qemuxxx`. -# Then check if qemu and qemu network is up. -# -# Author: Jiajun Xu <jiajun.xu@intel.com> -# -# This file is licensed under the GNU General Public License, -# Version 2. -# -. $COREBASE/scripts/qemuimage-testlib - -TIMEOUT=400 - -# Start qemu and check its network -Test_Create_Qemu ${TIMEOUT} - -if [ $? -eq 0 ]; then - Test_Info "Boot Test PASS" - Test_Kill_Qemu - Test_Print_Result "Boot" 0 - exit 0 -else - Test_Info "Boot Test FAIL" - Test_Kill_Qemu - Test_Print_Result "Boot" 1 - exit 1 -fi diff --git a/scripts/qemuimage-tests/sanity/compiler b/scripts/qemuimage-tests/sanity/compiler deleted file mode 100755 index ef0700732d..0000000000 --- a/scripts/qemuimage-tests/sanity/compiler +++ /dev/null @@ -1,52 +0,0 @@ -#!/bin/bash -# Compiler Test Case for Sanity Test -# The case boot up the Qemu target with `runqemu qemuxxx`. -# Then check if gcc/g++/make command can work in target. -# -# Author: Jiajun Xu <jiajun.xu@intel.com> -# -# This file is licensed under the GNU General Public License, -# Version 2. -# - -. $COREBASE/scripts/qemuimage-testlib - -TIMEOUT=400 -RET=1 - -# Start qemu and check its network -Test_Create_Qemu ${TIMEOUT} - -# If qemu network is up, check ssh service in qemu -if [ $? -eq 0 ]; then - Test_Info "Begin to Test SSH Service in Qemu" - Test_SSH_UP ${TARGET_IPADDR} ${TIMEOUT} - RET=$? -else - RET=1 -fi - -# Check if gcc/g++/make can work in target -if [ $RET -eq 0 -a -f $TOOLS/compiler_test.sh ]; then - # Copy compiler_test.sh into target - Test_Target_Pre ${TARGET_IPADDR} $TOOLS/compiler_test.sh - if [ $? -eq 0 ]; then - # Run compiler_test.sh to check if gcc/g++/make can work in target - Test_SSH ${TARGET_IPADDR} "sh $TARGET_TEST_DIR/compiler_test.sh" - RET=$? - else - RET=1 - fi -fi - -if [ ${RET} -eq 0 ]; then - Test_Info "Compiler Test PASS" - Test_Kill_Qemu - Test_Print_Result "compiler" 0 - exit 0 -else - Test_Info "Compiler FAIL, Pls. check above error log" - Test_Kill_Qemu - Test_Print_Result "compiler" 1 - exit 1 -fi diff --git a/scripts/qemuimage-tests/sanity/connman b/scripts/qemuimage-tests/sanity/connman deleted file mode 100755 index b3332012fa..0000000000 --- a/scripts/qemuimage-tests/sanity/connman +++ /dev/null @@ -1,53 +0,0 @@ -#!/bin/bash -# Conmman Check Test Case for Sanity Test -# The case boot up the Qemu target with `runqemu qemuxxx`. -# Then check if connman can work in target. -# -# Author: Jiajun Xu <jiajun.xu@intel.com> -# -# This file is licensed under the GNU General Public License, -# Version 2. -# - -. $COREBASE/scripts/qemuimage-testlib - -TIMEOUT=400 -RET=1 - -# Start qemu and check its network -Test_Create_Qemu ${TIMEOUT} - -# If qemu network is up, check ssh service in qemu -if [ $? -eq 0 ]; then - Test_Info "Begin to Test SSH Service in Qemu" - Test_SSH_UP ${TARGET_IPADDR} ${TIMEOUT} - RET=$? -else - RET=1 -fi - -# Check if connman can work in target -if [ $RET -eq 0 -a -f $TOOLS/connman_test.sh ]; then - # Copy connman_test.sh into target - Test_Target_Pre ${TARGET_IPADDR} $TOOLS/connman_test.sh - if [ $? -eq 0 ]; then - # Run connman_test.sh to check if connman can work in target - Test_SSH ${TARGET_IPADDR} "sh $TARGET_TEST_DIR/connman_test.sh" - RET=$? - else - RET=1 - fi -fi - -if [ ${RET} -eq 0 ]; then - Test_Info "Connman Test PASS" - Test_Kill_Qemu - Test_Print_Result "connman" 0 - exit 0 -else - Test_Info "Connman Test FAIL, Pls. check above error log" - Test_Display_Syslog - Test_Kill_Qemu - Test_Print_Result "connman" 1 - exit 1 -fi diff --git a/scripts/qemuimage-tests/sanity/dmesg b/scripts/qemuimage-tests/sanity/dmesg deleted file mode 100755 index aed29e05eb..0000000000 --- a/scripts/qemuimage-tests/sanity/dmesg +++ /dev/null @@ -1,52 +0,0 @@ -#!/bin/bash -# Dmesg Check Test Case for Sanity Test -# The case boot up the Qemu target with `runqemu qemuxxx`. -# Then check if there is any error log in dmesg. -# -# Author: Jiajun Xu <jiajun.xu@intel.com> -# -# This file is licensed under the GNU General Public License, -# Version 2. -# - -. $COREBASE/scripts/qemuimage-testlib - -TIMEOUT=400 -RET=1 - -# Start qemu and check its network -Test_Create_Qemu ${TIMEOUT} - -# If qemu network is up, check ssh service in qemu -if [ $? -eq 0 ]; then - Test_Info "Begin to Test SSH Service in Qemu" - Test_SSH_UP ${TARGET_IPADDR} ${TIMEOUT} - RET=$? -else - RET=1 -fi - -# Check if there is any error log in dmesg -if [ $RET -eq 0 -a -f $TOOLS/dmesg.sh ]; then - # Copy dmesg.sh into target - Test_Target_Pre ${TARGET_IPADDR} $TOOLS/dmesg.sh - if [ $? -eq 0 ]; then - # Run dmesg.sh to check if there is any error message with command dmesg - Test_SSH ${TARGET_IPADDR} "sh $TARGET_TEST_DIR/dmesg.sh" - RET=$? - else - RET=1 - fi -fi - -if [ ${RET} -eq 0 ]; then - Test_Info "Dmesg Test PASS" - Test_Kill_Qemu - Test_Print_Result "dmesg" 0 - exit 0 -else - Test_Info "Dmesg Test FAIL, Pls. check above error log" - Test_Kill_Qemu - Test_Print_Result "dmesg" 1 - exit 1 -fi diff --git a/scripts/qemuimage-tests/sanity/rpm_query b/scripts/qemuimage-tests/sanity/rpm_query deleted file mode 100755 index dd652bd998..0000000000 --- a/scripts/qemuimage-tests/sanity/rpm_query +++ /dev/null @@ -1,52 +0,0 @@ -#!/bin/bash -# RPM Check Test Case for Sanity Test -# The case boot up the Qemu target with `runqemu qemuxxx`. -# Then check if rpm command can work in target. -# -# Author: Jiajun Xu <jiajun.xu@intel.com> -# -# This file is licensed under the GNU General Public License, -# Version 2. -# - -. $COREBASE/scripts/qemuimage-testlib - -TIMEOUT=400 -RET=1 - -# Start qemu and check its network -Test_Create_Qemu ${TIMEOUT} - -# If qemu network is up, check ssh service in qemu -if [ $? -eq 0 ]; then - Test_Info "Begin to Test SSH Service in Qemu" - Test_SSH_UP ${TARGET_IPADDR} ${TIMEOUT} - RET=$? -else - RET=1 -fi - -# Check if rpm query can work in target -if [ $RET -eq 0 -a -f $TOOLS/rpm_test.sh ]; then - # Copy rpm_test.sh into target - Test_Target_Pre ${TARGET_IPADDR} $TOOLS/rpm_test.sh - if [ $? -eq 0 ]; then - # Run rpm_test.sh to check if rpm query can work in target - Test_SSH ${TARGET_IPADDR} "sh $TARGET_TEST_DIR/rpm_test.sh -qa" - RET=$? - else - RET=1 - fi -fi - -if [ ${RET} -eq 0 ]; then - Test_Info "rpm query Test PASS" - Test_Kill_Qemu - Test_Print_Result "rpm_query" 0 - exit 0 -else - Test_Info "rpm query FAIL, Pls. check above error log" - Test_Kill_Qemu - Test_Print_Result "rpm_query" 1 - exit 1 -fi diff --git a/scripts/qemuimage-tests/sanity/scp b/scripts/qemuimage-tests/sanity/scp deleted file mode 100755 index b0b693d0c8..0000000000 --- a/scripts/qemuimage-tests/sanity/scp +++ /dev/null @@ -1,71 +0,0 @@ -#!/bin/bash -# SCP Test Case for Sanity Test -# The case boot up the Qemu target with `runqemu qemuxxx`. -# Then check if file can be copied into target with scp command. -# -# Author: Jiajun Xu <jiajun.xu@intel.com> -# -# This file is licensed under the GNU General Public License, -# Version 2. -# - -. $COREBASE/scripts/qemuimage-testlib - -TIMEOUT=400 -RET=1 -SPID=0 -i=0 - -# Start qemu and check its network -Test_Create_Qemu ${TIMEOUT} - -# If qemu network is up, check ssh service in qemu -if [ $? -eq 0 ]; then - Test_Info "Begin to Test SSH Service in Qemu" - Test_SSH_UP ${TARGET_IPADDR} ${TIMEOUT} - RET=$? -else - RET=1 -fi - -# Check if file can be copied from host into target -# For qemu target, the file is 5M -if [ $RET -eq 0 ]; then - echo $QEMUARCH | grep -q "qemu" - - if [ $? -eq 0 ]; then - dd if=/dev/zero of=${TEST_TMP}/scp_test_file bs=512k count=10 - Test_SCP ${TARGET_IPADDR} ${TEST_TMP}/scp_test_file /home/root & - SPID=$! - fi - - # Check if scp finished or not - while [ $i -lt $TIMEOUT ] - do - ps -fp $SPID > /dev/null - if [ $? -ne 0 ]; then - RET=0 - break - fi - i=$((i+5)) - sleep 5 - done - - # Kill scp process if scp is not finished in time - if [ $i -ge $TIMEOUT ]; then - RET=1 - kill $SPID - fi -fi - -if [ ${RET} -eq 0 ]; then - Test_Info "SCP Test PASS" - Test_Kill_Qemu - Test_Print_Result "SCP" 0 - exit 0 -else - Test_Info "SCP Test FAIL" - Test_Kill_Qemu - Test_Print_Result "SCP" 1 - exit 1 -fi diff --git a/scripts/qemuimage-tests/sanity/shutdown b/scripts/qemuimage-tests/sanity/shutdown deleted file mode 100755 index c9e931c4c2..0000000000 --- a/scripts/qemuimage-tests/sanity/shutdown +++ /dev/null @@ -1,76 +0,0 @@ -#!/bin/bash -# Shutdown Test Case for Sanity Test -# The case boot up the Qemu target with `runqemu qemuxxx`. -# Then check if target can shutdown -# For qemux86/x86-64, we use command "poweroff" for target shutdown -# For non-x86 targets, we use command "reboot" for target shutdown -# -# Author: Jiajun Xu <jiajun.xu@intel.com> -# -# This file is licensed under the GNU General Public License, -# Version 2. -# - -. $COREBASE/scripts/qemuimage-testlib - -TIMEOUT=400 - -RET=1 -i=0 - -# Start qemu and check its network -Test_Create_Qemu ${TIMEOUT} - -# If qemu network is up, check ssh service in qemu -if [ $? -eq 0 ]; then - Test_Info "Begin to Test SSH Service in Qemu" - Test_SSH_UP ${TARGET_IPADDR} ${TIMEOUT} - RET=$? -else - RET=1 -fi - -# Check if target can shutdown -if [ $RET -eq 0 ]; then - echo $QEMUARCH | grep -q "qemux86" - - # For qemux86/x86-64, command "poweroff" is used - # For non x86 qemu targets, command "reboot" is used because of BUG #100 - if [ $? -eq 0 ]; then - Test_SSH ${TARGET_IPADDR} "/sbin/poweroff" - else - Test_SSH ${TARGET_IPADDR} "/sbin/reboot" - fi - - # If qemu start up process ends up, it means shutdown completes - while [ $i -lt $TIMEOUT ] - do - ps -fp $QEMUPID > /dev/null 2> /dev/null - if [ $? -ne 0 ]; then - RET=0 - break - fi - i=$((i+5)) - sleep 5 - done - - if [ $i -ge $TIMEOUT ]; then - RET=1 - fi -fi - -if [ ${RET} -eq 0 ]; then - Test_Info "Shutdown Test PASS" - Test_Print_Result "shutdown" 0 - - # Remove TARGET_IPSAVE since no existing qemu running now - if [ -e ${TARGET_IPSAVE} ]; then - rm -rf ${TARGET_IPSAVE} - fi - exit 0 -else - Test_Info "Shutdown Test FAIL" - Test_Kill_Qemu - Test_Print_Result "shutdown" 1 - exit 1 -fi diff --git a/scripts/qemuimage-tests/sanity/smart_help b/scripts/qemuimage-tests/sanity/smart_help deleted file mode 100755 index 0eeac26493..0000000000 --- a/scripts/qemuimage-tests/sanity/smart_help +++ /dev/null @@ -1,52 +0,0 @@ -#!/bin/bash -# Smart Check Test Case for Sanity Test -# The case boot up the Qemu target with `runqemu qemuxxx`. -# Then check if smart command can work in target. -# -# Author: Jiajun Xu <jiajun.xu@intel.com> -# -# This file is licensed under the GNU General Public License, -# Version 2. -# - -. $COREBASE/scripts/qemuimage-testlib - -TIMEOUT=400 -RET=1 - -# Start qemu and check its network -Test_Create_Qemu ${TIMEOUT} - -# If qemu network is up, check ssh service in qemu -if [ $? -eq 0 ]; then - Test_Info "Begin to Test SSH Service in Qemu" - Test_SSH_UP ${TARGET_IPADDR} ${TIMEOUT} - RET=$? -else - RET=1 -fi - -# Check if smart --help can work in target -if [ $RET -eq 0 -a -f $TOOLS/smart_test.sh ]; then - # Copy smart_test.sh into target - Test_Target_Pre ${TARGET_IPADDR} $TOOLS/smart_test.sh - if [ $? -eq 0 ]; then - # Run smart_test.sh to check if smart --help can work in target - Test_SSH ${TARGET_IPADDR} "sh $TARGET_TEST_DIR/smart_test.sh --help" - RET=$? - else - RET=1 - fi -fi - -if [ ${RET} -eq 0 ]; then - Test_Info "smart --help Test PASS" - Test_Kill_Qemu - Test_Print_Result "smart_help" 0 - exit 0 -else - Test_Info "smart --help FAIL, Pls. check above error log" - Test_Kill_Qemu - Test_Print_Result "smart_help" 1 - exit 1 -fi diff --git a/scripts/qemuimage-tests/sanity/smart_query b/scripts/qemuimage-tests/sanity/smart_query deleted file mode 100755 index 779ee630b3..0000000000 --- a/scripts/qemuimage-tests/sanity/smart_query +++ /dev/null @@ -1,52 +0,0 @@ -#!/bin/bash -# Smart Check Test Case for Sanity Test -# The case boot up the Qemu target with `runqemu qemuxxx`. -# Then check if smart command can work in target. -# -# Author: Jiajun Xu <jiajun.xu@intel.com> -# -# This file is licensed under the GNU General Public License, -# Version 2. -# - -. $COREBASE/scripts/qemuimage-testlib - -TIMEOUT=400 -RET=1 - -# Start qemu and check its network -Test_Create_Qemu ${TIMEOUT} - -# If qemu network is up, check ssh service in qemu -if [ $? -eq 0 ]; then - Test_Info "Begin to Test SSH Service in Qemu" - Test_SSH_UP ${TARGET_IPADDR} ${TIMEOUT} - RET=$? -else - RET=1 -fi - -# Check if smart query can work in target -if [ $RET -eq 0 -a -f $TOOLS/smart_test.sh ]; then - # Copy smart_test.sh into target - Test_Target_Pre ${TARGET_IPADDR} $TOOLS/smart_test.sh - if [ $? -eq 0 ]; then - # Run smart_test.sh to check if smart query can work in target - Test_SSH ${TARGET_IPADDR} "sh $TARGET_TEST_DIR/smart_test.sh query avahi*" - RET=$? - else - RET=1 - fi -fi - -if [ ${RET} -eq 0 ]; then - Test_Info "smart query package avahi Test PASS" - Test_Kill_Qemu - Test_Print_Result "smart_query" 0 - exit 0 -else - Test_Info "smart query package avahi FAIL, Pls. check above error log" - Test_Kill_Qemu - Test_Print_Result "smart_query" 1 - exit 1 -fi diff --git a/scripts/qemuimage-tests/sanity/ssh b/scripts/qemuimage-tests/sanity/ssh deleted file mode 100755 index 181296b0b5..0000000000 --- a/scripts/qemuimage-tests/sanity/ssh +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/bash -# SSH Test Case for Sanity Test -# The case boot up the Qemu target with `runqemu qemuxxx`. -# Then check if ssh service in qemu is up. -# -# Author: Jiajun Xu <jiajun.xu@intel.com> -# -# This file is licensed under the GNU General Public License, -# Version 2. -# - -. $COREBASE/scripts/qemuimage-testlib - -TIMEOUT=400 -RET=1 - -# Start qemu and check its network -Test_Create_Qemu ${TIMEOUT} - -# If qemu network is up, check ssh service in qemu -if [ $? -eq 0 ]; then - Test_Info "Begin to Test SSH Service in Qemu" - Test_SSH_UP ${TARGET_IPADDR} ${TIMEOUT} - RET=$? -else - RET=1 -fi - -if [ ${RET} -eq 0 ]; then - Test_Info "SSH Test PASS" - Test_Kill_Qemu - Test_Print_Result "SSH" 0 - exit 0 -else - Test_Info "SSH Test FAIL" - Test_Kill_Qemu - Test_Print_Result "SSH" 1 - exit 1 -fi |