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-22 12:19:41 +0100 |
commit | d6529876129a6932b6d2e369b3fd6ca40d342add (patch) | |
tree | 82b62115b0f4ba9701c823988472884c735872b7 /scripts/qemuimage-tests/sanity | |
parent | 595321a62669e90bed5f459a9d926a68988086a9 (diff) | |
download | poky-d6529876129a6932b6d2e369b3fd6ca40d342add.tar.gz |
classes/imagetest-qemu: remove old image testing class
This has now been superseded by testimage.
(From OE-Core rev: d469c92394a1a95ae7a45b8b80dc4c2918e0e9a6)
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
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 @@ | |||
1 | #!/bin/bash | ||
2 | # | ||
3 | # Boot Test Case for Sanity Test | ||
4 | # The case boot up the Qemu target with `runqemu qemuxxx`. | ||
5 | # Then check if qemu and qemu network is up. | ||
6 | # | ||
7 | # Author: Jiajun Xu <jiajun.xu@intel.com> | ||
8 | # | ||
9 | # This file is licensed under the GNU General Public License, | ||
10 | # Version 2. | ||
11 | # | ||
12 | . $COREBASE/scripts/qemuimage-testlib | ||
13 | |||
14 | TIMEOUT=400 | ||
15 | |||
16 | # Start qemu and check its network | ||
17 | Test_Create_Qemu ${TIMEOUT} | ||
18 | |||
19 | if [ $? -eq 0 ]; then | ||
20 | Test_Info "Boot Test PASS" | ||
21 | Test_Kill_Qemu | ||
22 | Test_Print_Result "Boot" 0 | ||
23 | exit 0 | ||
24 | else | ||
25 | Test_Info "Boot Test FAIL" | ||
26 | Test_Kill_Qemu | ||
27 | Test_Print_Result "Boot" 1 | ||
28 | exit 1 | ||
29 | 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 @@ | |||
1 | #!/bin/bash | ||
2 | # Compiler Test Case for Sanity Test | ||
3 | # The case boot up the Qemu target with `runqemu 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 | . $COREBASE/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 deleted file mode 100755 index b3332012fa..0000000000 --- a/scripts/qemuimage-tests/sanity/connman +++ /dev/null | |||
@@ -1,53 +0,0 @@ | |||
1 | #!/bin/bash | ||
2 | # Conmman Check Test Case for Sanity Test | ||
3 | # The case boot up the Qemu target with `runqemu 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 | . $COREBASE/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_Display_Syslog | ||
50 | Test_Kill_Qemu | ||
51 | Test_Print_Result "connman" 1 | ||
52 | exit 1 | ||
53 | 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 @@ | |||
1 | #!/bin/bash | ||
2 | # Dmesg Check Test Case for Sanity Test | ||
3 | # The case boot up the Qemu target with `runqemu qemuxxx`. | ||
4 | # Then check if there is any error log in dmesg. | ||
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 | . $COREBASE/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 there is any error log in dmesg | ||
30 | if [ $RET -eq 0 -a -f $TOOLS/dmesg.sh ]; then | ||
31 | # Copy dmesg.sh into target | ||
32 | Test_Target_Pre ${TARGET_IPADDR} $TOOLS/dmesg.sh | ||
33 | if [ $? -eq 0 ]; then | ||
34 | # Run dmesg.sh to check if there is any error message with command dmesg | ||
35 | Test_SSH ${TARGET_IPADDR} "sh $TARGET_TEST_DIR/dmesg.sh" | ||
36 | RET=$? | ||
37 | else | ||
38 | RET=1 | ||
39 | fi | ||
40 | fi | ||
41 | |||
42 | if [ ${RET} -eq 0 ]; then | ||
43 | Test_Info "Dmesg Test PASS" | ||
44 | Test_Kill_Qemu | ||
45 | Test_Print_Result "dmesg" 0 | ||
46 | exit 0 | ||
47 | else | ||
48 | Test_Info "Dmesg Test FAIL, Pls. check above error log" | ||
49 | Test_Kill_Qemu | ||
50 | Test_Print_Result "dmesg" 1 | ||
51 | exit 1 | ||
52 | 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 @@ | |||
1 | #!/bin/bash | ||
2 | # RPM Check Test Case for Sanity Test | ||
3 | # The case boot up the Qemu target with `runqemu 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 | . $COREBASE/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 deleted file mode 100755 index b0b693d0c8..0000000000 --- a/scripts/qemuimage-tests/sanity/scp +++ /dev/null | |||
@@ -1,71 +0,0 @@ | |||
1 | #!/bin/bash | ||
2 | # SCP Test Case for Sanity Test | ||
3 | # The case boot up the Qemu target with `runqemu qemuxxx`. | ||
4 | # Then check if file can be copied into target with scp command. | ||
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 | . $COREBASE/scripts/qemuimage-testlib | ||
13 | |||
14 | TIMEOUT=400 | ||
15 | RET=1 | ||
16 | SPID=0 | ||
17 | i=0 | ||
18 | |||
19 | # Start qemu and check its network | ||
20 | Test_Create_Qemu ${TIMEOUT} | ||
21 | |||
22 | # If qemu network is up, check ssh service in qemu | ||
23 | if [ $? -eq 0 ]; then | ||
24 | Test_Info "Begin to Test SSH Service in Qemu" | ||
25 | Test_SSH_UP ${TARGET_IPADDR} ${TIMEOUT} | ||
26 | RET=$? | ||
27 | else | ||
28 | RET=1 | ||
29 | fi | ||
30 | |||
31 | # Check if file can be copied from host into target | ||
32 | # For qemu target, the file is 5M | ||
33 | if [ $RET -eq 0 ]; then | ||
34 | echo $QEMUARCH | grep -q "qemu" | ||
35 | |||
36 | if [ $? -eq 0 ]; then | ||
37 | dd if=/dev/zero of=${TEST_TMP}/scp_test_file bs=512k count=10 | ||
38 | Test_SCP ${TARGET_IPADDR} ${TEST_TMP}/scp_test_file /home/root & | ||
39 | SPID=$! | ||
40 | fi | ||
41 | |||
42 | # Check if scp finished or not | ||
43 | while [ $i -lt $TIMEOUT ] | ||
44 | do | ||
45 | ps -fp $SPID > /dev/null | ||
46 | if [ $? -ne 0 ]; then | ||
47 | RET=0 | ||
48 | break | ||
49 | fi | ||
50 | i=$((i+5)) | ||
51 | sleep 5 | ||
52 | done | ||
53 | |||
54 | # Kill scp process if scp is not finished in time | ||
55 | if [ $i -ge $TIMEOUT ]; then | ||
56 | RET=1 | ||
57 | kill $SPID | ||
58 | fi | ||
59 | fi | ||
60 | |||
61 | if [ ${RET} -eq 0 ]; then | ||
62 | Test_Info "SCP Test PASS" | ||
63 | Test_Kill_Qemu | ||
64 | Test_Print_Result "SCP" 0 | ||
65 | exit 0 | ||
66 | else | ||
67 | Test_Info "SCP Test FAIL" | ||
68 | Test_Kill_Qemu | ||
69 | Test_Print_Result "SCP" 1 | ||
70 | exit 1 | ||
71 | 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 @@ | |||
1 | #!/bin/bash | ||
2 | # Shutdown Test Case for Sanity Test | ||
3 | # The case boot up the Qemu target with `runqemu qemuxxx`. | ||
4 | # Then check if target can shutdown | ||
5 | # For qemux86/x86-64, we use command "poweroff" for target shutdown | ||
6 | # For non-x86 targets, we use command "reboot" for target shutdown | ||
7 | # | ||
8 | # Author: Jiajun Xu <jiajun.xu@intel.com> | ||
9 | # | ||
10 | # This file is licensed under the GNU General Public License, | ||
11 | # Version 2. | ||
12 | # | ||
13 | |||
14 | . $COREBASE/scripts/qemuimage-testlib | ||
15 | |||
16 | TIMEOUT=400 | ||
17 | |||
18 | RET=1 | ||
19 | i=0 | ||
20 | |||
21 | # Start qemu and check its network | ||
22 | Test_Create_Qemu ${TIMEOUT} | ||
23 | |||
24 | # If qemu network is up, check ssh service in qemu | ||
25 | if [ $? -eq 0 ]; then | ||
26 | Test_Info "Begin to Test SSH Service in Qemu" | ||
27 | Test_SSH_UP ${TARGET_IPADDR} ${TIMEOUT} | ||
28 | RET=$? | ||
29 | else | ||
30 | RET=1 | ||
31 | fi | ||
32 | |||
33 | # Check if target can shutdown | ||
34 | if [ $RET -eq 0 ]; then | ||
35 | echo $QEMUARCH | grep -q "qemux86" | ||
36 | |||
37 | # For qemux86/x86-64, command "poweroff" is used | ||
38 | # For non x86 qemu targets, command "reboot" is used because of BUG #100 | ||
39 | if [ $? -eq 0 ]; then | ||
40 | Test_SSH ${TARGET_IPADDR} "/sbin/poweroff" | ||
41 | else | ||
42 | Test_SSH ${TARGET_IPADDR} "/sbin/reboot" | ||
43 | fi | ||
44 | |||
45 | # If qemu start up process ends up, it means shutdown completes | ||
46 | while [ $i -lt $TIMEOUT ] | ||
47 | do | ||
48 | ps -fp $QEMUPID > /dev/null 2> /dev/null | ||
49 | if [ $? -ne 0 ]; then | ||
50 | RET=0 | ||
51 | break | ||
52 | fi | ||
53 | i=$((i+5)) | ||
54 | sleep 5 | ||
55 | done | ||
56 | |||
57 | if [ $i -ge $TIMEOUT ]; then | ||
58 | RET=1 | ||
59 | fi | ||
60 | fi | ||
61 | |||
62 | if [ ${RET} -eq 0 ]; then | ||
63 | Test_Info "Shutdown Test PASS" | ||
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 | ||
70 | exit 0 | ||
71 | else | ||
72 | Test_Info "Shutdown Test FAIL" | ||
73 | Test_Kill_Qemu | ||
74 | Test_Print_Result "shutdown" 1 | ||
75 | exit 1 | ||
76 | 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 @@ | |||
1 | #!/bin/bash | ||
2 | # Smart Check Test Case for Sanity Test | ||
3 | # The case boot up the Qemu target with `runqemu qemuxxx`. | ||
4 | # Then check if smart 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 | . $COREBASE/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 smart --help can work in target | ||
30 | if [ $RET -eq 0 -a -f $TOOLS/smart_test.sh ]; then | ||
31 | # Copy smart_test.sh into target | ||
32 | Test_Target_Pre ${TARGET_IPADDR} $TOOLS/smart_test.sh | ||
33 | if [ $? -eq 0 ]; then | ||
34 | # Run smart_test.sh to check if smart --help can work in target | ||
35 | Test_SSH ${TARGET_IPADDR} "sh $TARGET_TEST_DIR/smart_test.sh --help" | ||
36 | RET=$? | ||
37 | else | ||
38 | RET=1 | ||
39 | fi | ||
40 | fi | ||
41 | |||
42 | if [ ${RET} -eq 0 ]; then | ||
43 | Test_Info "smart --help Test PASS" | ||
44 | Test_Kill_Qemu | ||
45 | Test_Print_Result "smart_help" 0 | ||
46 | exit 0 | ||
47 | else | ||
48 | Test_Info "smart --help FAIL, Pls. check above error log" | ||
49 | Test_Kill_Qemu | ||
50 | Test_Print_Result "smart_help" 1 | ||
51 | exit 1 | ||
52 | 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 @@ | |||
1 | #!/bin/bash | ||
2 | # Smart Check Test Case for Sanity Test | ||
3 | # The case boot up the Qemu target with `runqemu qemuxxx`. | ||
4 | # Then check if smart 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 | . $COREBASE/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 smart query can work in target | ||
30 | if [ $RET -eq 0 -a -f $TOOLS/smart_test.sh ]; then | ||
31 | # Copy smart_test.sh into target | ||
32 | Test_Target_Pre ${TARGET_IPADDR} $TOOLS/smart_test.sh | ||
33 | if [ $? -eq 0 ]; then | ||
34 | # Run smart_test.sh to check if smart query can work in target | ||
35 | Test_SSH ${TARGET_IPADDR} "sh $TARGET_TEST_DIR/smart_test.sh query avahi*" | ||
36 | RET=$? | ||
37 | else | ||
38 | RET=1 | ||
39 | fi | ||
40 | fi | ||
41 | |||
42 | if [ ${RET} -eq 0 ]; then | ||
43 | Test_Info "smart query package avahi Test PASS" | ||
44 | Test_Kill_Qemu | ||
45 | Test_Print_Result "smart_query" 0 | ||
46 | exit 0 | ||
47 | else | ||
48 | Test_Info "smart query package avahi FAIL, Pls. check above error log" | ||
49 | Test_Kill_Qemu | ||
50 | Test_Print_Result "smart_query" 1 | ||
51 | exit 1 | ||
52 | 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 @@ | |||
1 | #!/bin/bash | ||
2 | # SSH Test Case for Sanity Test | ||
3 | # The case boot up the Qemu target with `runqemu qemuxxx`. | ||
4 | # Then check if ssh service in qemu is up. | ||
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 | . $COREBASE/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 | if [ ${RET} -eq 0 ]; then | ||
30 | Test_Info "SSH Test PASS" | ||
31 | Test_Kill_Qemu | ||
32 | Test_Print_Result "SSH" 0 | ||
33 | exit 0 | ||
34 | else | ||
35 | Test_Info "SSH Test FAIL" | ||
36 | Test_Kill_Qemu | ||
37 | Test_Print_Result "SSH" 1 | ||
38 | exit 1 | ||
39 | fi | ||