diff options
Diffstat (limited to 'scripts/qemuimage-tests/sanity')
| -rwxr-xr-x | scripts/qemuimage-tests/sanity/compiler | 52 | ||||
| -rwxr-xr-x | scripts/qemuimage-tests/sanity/connman | 52 | ||||
| -rwxr-xr-x | scripts/qemuimage-tests/sanity/dmesg | 2 | ||||
| -rwxr-xr-x | scripts/qemuimage-tests/sanity/rpm_query | 52 | ||||
| -rwxr-xr-x | scripts/qemuimage-tests/sanity/scp | 2 | ||||
| -rwxr-xr-x | scripts/qemuimage-tests/sanity/shutdown | 8 | ||||
| -rwxr-xr-x | scripts/qemuimage-tests/sanity/ssh | 2 | ||||
| -rwxr-xr-x | scripts/qemuimage-tests/sanity/zypper_help | 52 | ||||
| -rwxr-xr-x | scripts/qemuimage-tests/sanity/zypper_search | 52 |
9 files changed, 270 insertions, 4 deletions
diff --git a/scripts/qemuimage-tests/sanity/compiler b/scripts/qemuimage-tests/sanity/compiler new file mode 100755 index 0000000000..29dbfd9bb9 --- /dev/null +++ b/scripts/qemuimage-tests/sanity/compiler | |||
| @@ -0,0 +1,52 @@ | |||
| 1 | #!/bin/bash | ||
| 2 | # Compiler Test Case for Sanity Test | ||
| 3 | # The case boot up the Qemu target with `poky-qemu qemuxxx`. | ||
| 4 | # Then check if gcc/g++/make command can work in target. | ||
| 5 | # | ||
| 6 | # Author: Jiajun Xu <jiajun.xu@intel.com> | ||
| 7 | # | ||
| 8 | # This file is licensed under the GNU General Public License, | ||
| 9 | # Version 2. | ||
| 10 | # | ||
| 11 | |||
| 12 | . $POKYBASE/scripts/qemuimage-testlib | ||
| 13 | |||
| 14 | TIMEOUT=400 | ||
| 15 | RET=1 | ||
| 16 | |||
| 17 | # Start qemu and check its network | ||
| 18 | Test_Create_Qemu ${TIMEOUT} | ||
| 19 | |||
| 20 | # If qemu network is up, check ssh service in qemu | ||
| 21 | if [ $? -eq 0 ]; then | ||
| 22 | Test_Info "Begin to Test SSH Service in Qemu" | ||
| 23 | Test_SSH_UP ${TARGET_IPADDR} ${TIMEOUT} | ||
| 24 | RET=$? | ||
| 25 | else | ||
| 26 | RET=1 | ||
| 27 | fi | ||
| 28 | |||
| 29 | # Check if gcc/g++/make can work in target | ||
| 30 | if [ $RET -eq 0 -a -f $TOOLS/compiler_test.sh ]; then | ||
| 31 | # Copy compiler_test.sh into target | ||
| 32 | Test_Target_Pre ${TARGET_IPADDR} $TOOLS/compiler_test.sh | ||
| 33 | if [ $? -eq 0 ]; then | ||
| 34 | # Run compiler_test.sh to check if gcc/g++/make can work in target | ||
| 35 | Test_SSH ${TARGET_IPADDR} "sh $TARGET_TEST_DIR/compiler_test.sh" | ||
| 36 | RET=$? | ||
| 37 | else | ||
| 38 | RET=1 | ||
| 39 | fi | ||
| 40 | fi | ||
| 41 | |||
| 42 | if [ ${RET} -eq 0 ]; then | ||
| 43 | Test_Info "Compiler Test PASS" | ||
| 44 | Test_Kill_Qemu | ||
| 45 | Test_Print_Result "compiler" 0 | ||
| 46 | exit 0 | ||
| 47 | else | ||
| 48 | Test_Info "Compiler FAIL, Pls. check above error log" | ||
| 49 | Test_Kill_Qemu | ||
| 50 | Test_Print_Result "compiler" 1 | ||
| 51 | exit 1 | ||
| 52 | fi | ||
diff --git a/scripts/qemuimage-tests/sanity/connman b/scripts/qemuimage-tests/sanity/connman new file mode 100755 index 0000000000..fca6a27845 --- /dev/null +++ b/scripts/qemuimage-tests/sanity/connman | |||
| @@ -0,0 +1,52 @@ | |||
| 1 | #!/bin/bash | ||
| 2 | # Conmman Check Test Case for Sanity Test | ||
| 3 | # The case boot up the Qemu target with `poky-qemu qemuxxx`. | ||
| 4 | # Then check if connman can work in target. | ||
| 5 | # | ||
| 6 | # Author: Jiajun Xu <jiajun.xu@intel.com> | ||
| 7 | # | ||
| 8 | # This file is licensed under the GNU General Public License, | ||
| 9 | # Version 2. | ||
| 10 | # | ||
| 11 | |||
| 12 | . $POKYBASE/scripts/qemuimage-testlib | ||
| 13 | |||
| 14 | TIMEOUT=400 | ||
| 15 | RET=1 | ||
| 16 | |||
| 17 | # Start qemu and check its network | ||
| 18 | Test_Create_Qemu ${TIMEOUT} | ||
| 19 | |||
| 20 | # If qemu network is up, check ssh service in qemu | ||
| 21 | if [ $? -eq 0 ]; then | ||
| 22 | Test_Info "Begin to Test SSH Service in Qemu" | ||
| 23 | Test_SSH_UP ${TARGET_IPADDR} ${TIMEOUT} | ||
| 24 | RET=$? | ||
| 25 | else | ||
| 26 | RET=1 | ||
| 27 | fi | ||
| 28 | |||
| 29 | # Check if connman can work in target | ||
| 30 | if [ $RET -eq 0 -a -f $TOOLS/connman_test.sh ]; then | ||
| 31 | # Copy connman_test.sh into target | ||
| 32 | Test_Target_Pre ${TARGET_IPADDR} $TOOLS/connman_test.sh | ||
| 33 | if [ $? -eq 0 ]; then | ||
| 34 | # Run connman_test.sh to check if connman can work in target | ||
| 35 | Test_SSH ${TARGET_IPADDR} "sh $TARGET_TEST_DIR/connman_test.sh" | ||
| 36 | RET=$? | ||
| 37 | else | ||
| 38 | RET=1 | ||
| 39 | fi | ||
| 40 | fi | ||
| 41 | |||
| 42 | if [ ${RET} -eq 0 ]; then | ||
| 43 | Test_Info "Connman Test PASS" | ||
| 44 | Test_Kill_Qemu | ||
| 45 | Test_Print_Result "connman" 0 | ||
| 46 | exit 0 | ||
| 47 | else | ||
| 48 | Test_Info "Connman Test FAIL, Pls. check above error log" | ||
| 49 | Test_Kill_Qemu | ||
| 50 | Test_Print_Result "connman" 1 | ||
| 51 | exit 1 | ||
| 52 | fi | ||
diff --git a/scripts/qemuimage-tests/sanity/dmesg b/scripts/qemuimage-tests/sanity/dmesg index 36813dcd43..5ed31b735f 100755 --- a/scripts/qemuimage-tests/sanity/dmesg +++ b/scripts/qemuimage-tests/sanity/dmesg | |||
| @@ -11,7 +11,7 @@ | |||
| 11 | 11 | ||
| 12 | . $POKYBASE/scripts/qemuimage-testlib | 12 | . $POKYBASE/scripts/qemuimage-testlib |
| 13 | 13 | ||
| 14 | TIMEOUT=360 | 14 | TIMEOUT=400 |
| 15 | RET=1 | 15 | RET=1 |
| 16 | 16 | ||
| 17 | # Start qemu and check its network | 17 | # Start qemu and check its network |
diff --git a/scripts/qemuimage-tests/sanity/rpm_query b/scripts/qemuimage-tests/sanity/rpm_query new file mode 100755 index 0000000000..08017ffbe6 --- /dev/null +++ b/scripts/qemuimage-tests/sanity/rpm_query | |||
| @@ -0,0 +1,52 @@ | |||
| 1 | #!/bin/bash | ||
| 2 | # RPM Check Test Case for Sanity Test | ||
| 3 | # The case boot up the Qemu target with `poky-qemu qemuxxx`. | ||
| 4 | # Then check if rpm command can work in target. | ||
| 5 | # | ||
| 6 | # Author: Jiajun Xu <jiajun.xu@intel.com> | ||
| 7 | # | ||
| 8 | # This file is licensed under the GNU General Public License, | ||
| 9 | # Version 2. | ||
| 10 | # | ||
| 11 | |||
| 12 | . $POKYBASE/scripts/qemuimage-testlib | ||
| 13 | |||
| 14 | TIMEOUT=400 | ||
| 15 | RET=1 | ||
| 16 | |||
| 17 | # Start qemu and check its network | ||
| 18 | Test_Create_Qemu ${TIMEOUT} | ||
| 19 | |||
| 20 | # If qemu network is up, check ssh service in qemu | ||
| 21 | if [ $? -eq 0 ]; then | ||
| 22 | Test_Info "Begin to Test SSH Service in Qemu" | ||
| 23 | Test_SSH_UP ${TARGET_IPADDR} ${TIMEOUT} | ||
| 24 | RET=$? | ||
| 25 | else | ||
| 26 | RET=1 | ||
| 27 | fi | ||
| 28 | |||
| 29 | # Check if rpm query can work in target | ||
| 30 | if [ $RET -eq 0 -a -f $TOOLS/rpm_test.sh ]; then | ||
| 31 | # Copy rpm_test.sh into target | ||
| 32 | Test_Target_Pre ${TARGET_IPADDR} $TOOLS/rpm_test.sh | ||
| 33 | if [ $? -eq 0 ]; then | ||
| 34 | # Run rpm_test.sh to check if rpm query can work in target | ||
| 35 | Test_SSH ${TARGET_IPADDR} "sh $TARGET_TEST_DIR/rpm_test.sh -qa" | ||
| 36 | RET=$? | ||
| 37 | else | ||
| 38 | RET=1 | ||
| 39 | fi | ||
| 40 | fi | ||
| 41 | |||
| 42 | if [ ${RET} -eq 0 ]; then | ||
| 43 | Test_Info "rpm query Test PASS" | ||
| 44 | Test_Kill_Qemu | ||
| 45 | Test_Print_Result "rpm_query" 0 | ||
| 46 | exit 0 | ||
| 47 | else | ||
| 48 | Test_Info "rpm query FAIL, Pls. check above error log" | ||
| 49 | Test_Kill_Qemu | ||
| 50 | Test_Print_Result "rpm_query" 1 | ||
| 51 | exit 1 | ||
| 52 | fi | ||
diff --git a/scripts/qemuimage-tests/sanity/scp b/scripts/qemuimage-tests/sanity/scp index ce3489d664..c72cdc9d65 100755 --- a/scripts/qemuimage-tests/sanity/scp +++ b/scripts/qemuimage-tests/sanity/scp | |||
| @@ -11,7 +11,7 @@ | |||
| 11 | 11 | ||
| 12 | . $POKYBASE/scripts/qemuimage-testlib | 12 | . $POKYBASE/scripts/qemuimage-testlib |
| 13 | 13 | ||
| 14 | TIMEOUT=360 | 14 | TIMEOUT=400 |
| 15 | RET=1 | 15 | RET=1 |
| 16 | SPID=0 | 16 | SPID=0 |
| 17 | i=0 | 17 | i=0 |
diff --git a/scripts/qemuimage-tests/sanity/shutdown b/scripts/qemuimage-tests/sanity/shutdown index e36b4a983d..bc08cf0fdc 100755 --- a/scripts/qemuimage-tests/sanity/shutdown +++ b/scripts/qemuimage-tests/sanity/shutdown | |||
| @@ -13,7 +13,8 @@ | |||
| 13 | 13 | ||
| 14 | . $POKYBASE/scripts/qemuimage-testlib | 14 | . $POKYBASE/scripts/qemuimage-testlib |
| 15 | 15 | ||
| 16 | TIMEOUT=360 | 16 | TIMEOUT=400 |
| 17 | |||
| 17 | RET=1 | 18 | RET=1 |
| 18 | i=0 | 19 | i=0 |
| 19 | 20 | ||
| @@ -61,6 +62,11 @@ fi | |||
| 61 | if [ ${RET} -eq 0 ]; then | 62 | if [ ${RET} -eq 0 ]; then |
| 62 | Test_Info "Shutdown Test PASS" | 63 | Test_Info "Shutdown Test PASS" |
| 63 | Test_Print_Result "shutdown" 0 | 64 | Test_Print_Result "shutdown" 0 |
| 65 | |||
| 66 | # Remove TARGET_IPSAVE since no existing qemu running now | ||
| 67 | if [ -e ${TARGET_IPSAVE} ]; then | ||
| 68 | rm -rf ${TARGET_IPSAVE} | ||
| 69 | fi | ||
| 64 | exit 0 | 70 | exit 0 |
| 65 | else | 71 | else |
| 66 | Test_Info "Shutdown Test FAIL" | 72 | Test_Info "Shutdown Test FAIL" |
diff --git a/scripts/qemuimage-tests/sanity/ssh b/scripts/qemuimage-tests/sanity/ssh index 084530adfb..2a0e934392 100755 --- a/scripts/qemuimage-tests/sanity/ssh +++ b/scripts/qemuimage-tests/sanity/ssh | |||
| @@ -11,7 +11,7 @@ | |||
| 11 | 11 | ||
| 12 | . $POKYBASE/scripts/qemuimage-testlib | 12 | . $POKYBASE/scripts/qemuimage-testlib |
| 13 | 13 | ||
| 14 | TIMEOUT=360 | 14 | TIMEOUT=400 |
| 15 | RET=1 | 15 | RET=1 |
| 16 | 16 | ||
| 17 | # Start qemu and check its network | 17 | # Start qemu and check its network |
diff --git a/scripts/qemuimage-tests/sanity/zypper_help b/scripts/qemuimage-tests/sanity/zypper_help new file mode 100755 index 0000000000..1ab6d2407f --- /dev/null +++ b/scripts/qemuimage-tests/sanity/zypper_help | |||
| @@ -0,0 +1,52 @@ | |||
| 1 | #!/bin/bash | ||
| 2 | # Zypper Check Test Case for Sanity Test | ||
| 3 | # The case boot up the Qemu target with `poky-qemu qemuxxx`. | ||
| 4 | # Then check if zypper command can work in target. | ||
| 5 | # | ||
| 6 | # Author: Jiajun Xu <jiajun.xu@intel.com> | ||
| 7 | # | ||
| 8 | # This file is licensed under the GNU General Public License, | ||
| 9 | # Version 2. | ||
| 10 | # | ||
| 11 | |||
| 12 | . $POKYBASE/scripts/qemuimage-testlib | ||
| 13 | |||
| 14 | TIMEOUT=400 | ||
| 15 | RET=1 | ||
| 16 | |||
| 17 | # Start qemu and check its network | ||
| 18 | Test_Create_Qemu ${TIMEOUT} | ||
| 19 | |||
| 20 | # If qemu network is up, check ssh service in qemu | ||
| 21 | if [ $? -eq 0 ]; then | ||
| 22 | Test_Info "Begin to Test SSH Service in Qemu" | ||
| 23 | Test_SSH_UP ${TARGET_IPADDR} ${TIMEOUT} | ||
| 24 | RET=$? | ||
| 25 | else | ||
| 26 | RET=1 | ||
| 27 | fi | ||
| 28 | |||
| 29 | # Check if zypper help can work in target | ||
| 30 | if [ $RET -eq 0 -a -f $TOOLS/zypper_test.sh ]; then | ||
| 31 | # Copy zypper_test.sh into target | ||
| 32 | Test_Target_Pre ${TARGET_IPADDR} $TOOLS/zypper_test.sh | ||
| 33 | if [ $? -eq 0 ]; then | ||
| 34 | # Run zypper_test.sh to check if zypper help can work in target | ||
| 35 | Test_SSH ${TARGET_IPADDR} "sh $TARGET_TEST_DIR/zypper_test.sh help" | ||
| 36 | RET=$? | ||
| 37 | else | ||
| 38 | RET=1 | ||
| 39 | fi | ||
| 40 | fi | ||
| 41 | |||
| 42 | if [ ${RET} -eq 0 ]; then | ||
| 43 | Test_Info "zypper help Test PASS" | ||
| 44 | Test_Kill_Qemu | ||
| 45 | Test_Print_Result "zypper_help" 0 | ||
| 46 | exit 0 | ||
| 47 | else | ||
| 48 | Test_Info "zypper help FAIL, Pls. check above error log" | ||
| 49 | Test_Kill_Qemu | ||
| 50 | Test_Print_Result "zypper_help" 1 | ||
| 51 | exit 1 | ||
| 52 | fi | ||
diff --git a/scripts/qemuimage-tests/sanity/zypper_search b/scripts/qemuimage-tests/sanity/zypper_search new file mode 100755 index 0000000000..d6bcd27a34 --- /dev/null +++ b/scripts/qemuimage-tests/sanity/zypper_search | |||
| @@ -0,0 +1,52 @@ | |||
| 1 | #!/bin/bash | ||
| 2 | # Zypper Check Test Case for Sanity Test | ||
| 3 | # The case boot up the Qemu target with `poky-qemu qemuxxx`. | ||
| 4 | # Then check if zypper command can work in target. | ||
| 5 | # | ||
| 6 | # Author: Jiajun Xu <jiajun.xu@intel.com> | ||
| 7 | # | ||
| 8 | # This file is licensed under the GNU General Public License, | ||
| 9 | # Version 2. | ||
| 10 | # | ||
| 11 | |||
| 12 | . $POKYBASE/scripts/qemuimage-testlib | ||
| 13 | |||
| 14 | TIMEOUT=400 | ||
| 15 | RET=1 | ||
| 16 | |||
| 17 | # Start qemu and check its network | ||
| 18 | Test_Create_Qemu ${TIMEOUT} | ||
| 19 | |||
| 20 | # If qemu network is up, check ssh service in qemu | ||
| 21 | if [ $? -eq 0 ]; then | ||
| 22 | Test_Info "Begin to Test SSH Service in Qemu" | ||
| 23 | Test_SSH_UP ${TARGET_IPADDR} ${TIMEOUT} | ||
| 24 | RET=$? | ||
| 25 | else | ||
| 26 | RET=1 | ||
| 27 | fi | ||
| 28 | |||
| 29 | # Check if zypper search can work in target | ||
| 30 | if [ $RET -eq 0 -a -f $TOOLS/zypper_test.sh ]; then | ||
| 31 | # Copy zypper_test.sh into target | ||
| 32 | Test_Target_Pre ${TARGET_IPADDR} $TOOLS/zypper_test.sh | ||
| 33 | if [ $? -eq 0 ]; then | ||
| 34 | # Run zypper_test.sh to check if zypper search can work in target | ||
| 35 | Test_SSH ${TARGET_IPADDR} "sh $TARGET_TEST_DIR/zypper_test.sh search avahi" | ||
| 36 | RET=$? | ||
| 37 | else | ||
| 38 | RET=1 | ||
| 39 | fi | ||
| 40 | fi | ||
| 41 | |||
| 42 | if [ ${RET} -eq 0 ]; then | ||
| 43 | Test_Info "zypper search package avahi Test PASS" | ||
| 44 | Test_Kill_Qemu | ||
| 45 | Test_Print_Result "zypper_search" 0 | ||
| 46 | exit 0 | ||
| 47 | else | ||
| 48 | Test_Info "zypper search package avahi FAIL, Pls. check above error log" | ||
| 49 | Test_Kill_Qemu | ||
| 50 | Test_Print_Result "zypper_search" 1 | ||
| 51 | exit 1 | ||
| 52 | fi | ||
