summaryrefslogtreecommitdiffstats
path: root/scripts/qemuimage-tests
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2013-09-19 13:18:06 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-09-22 12:19:41 +0100
commitd6529876129a6932b6d2e369b3fd6ca40d342add (patch)
tree82b62115b0f4ba9701c823988472884c735872b7 /scripts/qemuimage-tests
parent595321a62669e90bed5f459a9d926a68988086a9 (diff)
downloadpoky-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')
-rwxr-xr-xscripts/qemuimage-tests/sanity/boot29
-rwxr-xr-xscripts/qemuimage-tests/sanity/compiler52
-rwxr-xr-xscripts/qemuimage-tests/sanity/connman53
-rwxr-xr-xscripts/qemuimage-tests/sanity/dmesg52
-rwxr-xr-xscripts/qemuimage-tests/sanity/rpm_query52
-rwxr-xr-xscripts/qemuimage-tests/sanity/scp71
-rwxr-xr-xscripts/qemuimage-tests/sanity/shutdown76
-rwxr-xr-xscripts/qemuimage-tests/sanity/smart_help52
-rwxr-xr-xscripts/qemuimage-tests/sanity/smart_query52
-rwxr-xr-xscripts/qemuimage-tests/sanity/ssh39
-rw-r--r--scripts/qemuimage-tests/scenario/qemuarm/core-image-lsb7
-rw-r--r--scripts/qemuimage-tests/scenario/qemuarm/core-image-minimal1
-rw-r--r--scripts/qemuimage-tests/scenario/qemuarm/core-image-sato11
-rw-r--r--scripts/qemuimage-tests/scenario/qemuarm/core-image-sato-sdk12
-rw-r--r--scripts/qemuimage-tests/scenario/qemuarm/meta-toolchain-gmae3
-rw-r--r--scripts/qemuimage-tests/scenario/qemumips/core-image-lsb7
-rw-r--r--scripts/qemuimage-tests/scenario/qemumips/core-image-minimal1
-rw-r--r--scripts/qemuimage-tests/scenario/qemumips/core-image-sato11
-rw-r--r--scripts/qemuimage-tests/scenario/qemumips/core-image-sato-sdk12
-rw-r--r--scripts/qemuimage-tests/scenario/qemumips/meta-toolchain-gmae3
-rw-r--r--scripts/qemuimage-tests/scenario/qemuppc/core-image-lsb7
-rw-r--r--scripts/qemuimage-tests/scenario/qemuppc/core-image-minimal1
-rw-r--r--scripts/qemuimage-tests/scenario/qemuppc/core-image-sato11
-rw-r--r--scripts/qemuimage-tests/scenario/qemuppc/core-image-sato-sdk12
-rw-r--r--scripts/qemuimage-tests/scenario/qemuppc/meta-toolchain-gmae3
-rw-r--r--scripts/qemuimage-tests/scenario/qemux86-64/core-image-lsb7
-rw-r--r--scripts/qemuimage-tests/scenario/qemux86-64/core-image-minimal1
-rw-r--r--scripts/qemuimage-tests/scenario/qemux86-64/core-image-sato11
-rw-r--r--scripts/qemuimage-tests/scenario/qemux86-64/core-image-sato-sdk12
-rw-r--r--scripts/qemuimage-tests/scenario/qemux86-64/meta-toolchain-gmae3
-rw-r--r--scripts/qemuimage-tests/scenario/qemux86/core-image-lsb7
-rw-r--r--scripts/qemuimage-tests/scenario/qemux86/core-image-minimal1
-rw-r--r--scripts/qemuimage-tests/scenario/qemux86/core-image-sato11
-rw-r--r--scripts/qemuimage-tests/scenario/qemux86/core-image-sato-sdk12
-rw-r--r--scripts/qemuimage-tests/scenario/qemux86/meta-toolchain-gmae3
-rwxr-xr-xscripts/qemuimage-tests/systemusage/bash53
-rwxr-xr-xscripts/qemuimage-tests/systemusage/df54
-rwxr-xr-xscripts/qemuimage-tests/systemusage/syslog54
-rwxr-xr-xscripts/qemuimage-tests/toolchain/cvs31
-rwxr-xr-xscripts/qemuimage-tests/toolchain/iptables31
-rwxr-xr-xscripts/qemuimage-tests/toolchain/sudoku-savant31
-rw-r--r--scripts/qemuimage-tests/tools/bash.sh17
-rw-r--r--scripts/qemuimage-tests/tools/compiler_test.sh137
-rw-r--r--scripts/qemuimage-tests/tools/connman_test.sh75
-rw-r--r--scripts/qemuimage-tests/tools/df.sh25
-rw-r--r--scripts/qemuimage-tests/tools/dmesg.sh28
-rw-r--r--scripts/qemuimage-tests/tools/rpm_test.sh45
-rw-r--r--scripts/qemuimage-tests/tools/smart_test.sh45
-rw-r--r--scripts/qemuimage-tests/tools/syslog.sh17
49 files changed, 0 insertions, 1341 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
14TIMEOUT=400
15
16# Start qemu and check its network
17Test_Create_Qemu ${TIMEOUT}
18
19if [ $? -eq 0 ]; then
20 Test_Info "Boot Test PASS"
21 Test_Kill_Qemu
22 Test_Print_Result "Boot" 0
23 exit 0
24else
25 Test_Info "Boot Test FAIL"
26 Test_Kill_Qemu
27 Test_Print_Result "Boot" 1
28 exit 1
29fi
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
14TIMEOUT=400
15RET=1
16
17# Start qemu and check its network
18Test_Create_Qemu ${TIMEOUT}
19
20# If qemu network is up, check ssh service in qemu
21if [ $? -eq 0 ]; then
22 Test_Info "Begin to Test SSH Service in Qemu"
23 Test_SSH_UP ${TARGET_IPADDR} ${TIMEOUT}
24 RET=$?
25else
26 RET=1
27fi
28
29# Check if gcc/g++/make can work in target
30if [ $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
40fi
41
42if [ ${RET} -eq 0 ]; then
43 Test_Info "Compiler Test PASS"
44 Test_Kill_Qemu
45 Test_Print_Result "compiler" 0
46 exit 0
47else
48 Test_Info "Compiler FAIL, Pls. check above error log"
49 Test_Kill_Qemu
50 Test_Print_Result "compiler" 1
51 exit 1
52fi
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
14TIMEOUT=400
15RET=1
16
17# Start qemu and check its network
18Test_Create_Qemu ${TIMEOUT}
19
20# If qemu network is up, check ssh service in qemu
21if [ $? -eq 0 ]; then
22 Test_Info "Begin to Test SSH Service in Qemu"
23 Test_SSH_UP ${TARGET_IPADDR} ${TIMEOUT}
24 RET=$?
25else
26 RET=1
27fi
28
29# Check if connman can work in target
30if [ $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
40fi
41
42if [ ${RET} -eq 0 ]; then
43 Test_Info "Connman Test PASS"
44 Test_Kill_Qemu
45 Test_Print_Result "connman" 0
46 exit 0
47else
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
53fi
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
14TIMEOUT=400
15RET=1
16
17# Start qemu and check its network
18Test_Create_Qemu ${TIMEOUT}
19
20# If qemu network is up, check ssh service in qemu
21if [ $? -eq 0 ]; then
22 Test_Info "Begin to Test SSH Service in Qemu"
23 Test_SSH_UP ${TARGET_IPADDR} ${TIMEOUT}
24 RET=$?
25else
26 RET=1
27fi
28
29# Check if there is any error log in dmesg
30if [ $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
40fi
41
42if [ ${RET} -eq 0 ]; then
43 Test_Info "Dmesg Test PASS"
44 Test_Kill_Qemu
45 Test_Print_Result "dmesg" 0
46 exit 0
47else
48 Test_Info "Dmesg Test FAIL, Pls. check above error log"
49 Test_Kill_Qemu
50 Test_Print_Result "dmesg" 1
51 exit 1
52fi
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
14TIMEOUT=400
15RET=1
16
17# Start qemu and check its network
18Test_Create_Qemu ${TIMEOUT}
19
20# If qemu network is up, check ssh service in qemu
21if [ $? -eq 0 ]; then
22 Test_Info "Begin to Test SSH Service in Qemu"
23 Test_SSH_UP ${TARGET_IPADDR} ${TIMEOUT}
24 RET=$?
25else
26 RET=1
27fi
28
29# Check if rpm query can work in target
30if [ $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
40fi
41
42if [ ${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
47else
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
52fi
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
14TIMEOUT=400
15RET=1
16SPID=0
17i=0
18
19# Start qemu and check its network
20Test_Create_Qemu ${TIMEOUT}
21
22# If qemu network is up, check ssh service in qemu
23if [ $? -eq 0 ]; then
24 Test_Info "Begin to Test SSH Service in Qemu"
25 Test_SSH_UP ${TARGET_IPADDR} ${TIMEOUT}
26 RET=$?
27else
28 RET=1
29fi
30
31# Check if file can be copied from host into target
32# For qemu target, the file is 5M
33if [ $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
59fi
60
61if [ ${RET} -eq 0 ]; then
62 Test_Info "SCP Test PASS"
63 Test_Kill_Qemu
64 Test_Print_Result "SCP" 0
65 exit 0
66else
67 Test_Info "SCP Test FAIL"
68 Test_Kill_Qemu
69 Test_Print_Result "SCP" 1
70 exit 1
71fi
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
16TIMEOUT=400
17
18RET=1
19i=0
20
21# Start qemu and check its network
22Test_Create_Qemu ${TIMEOUT}
23
24# If qemu network is up, check ssh service in qemu
25if [ $? -eq 0 ]; then
26 Test_Info "Begin to Test SSH Service in Qemu"
27 Test_SSH_UP ${TARGET_IPADDR} ${TIMEOUT}
28 RET=$?
29else
30 RET=1
31fi
32
33# Check if target can shutdown
34if [ $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
60fi
61
62if [ ${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
71else
72 Test_Info "Shutdown Test FAIL"
73 Test_Kill_Qemu
74 Test_Print_Result "shutdown" 1
75 exit 1
76fi
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
14TIMEOUT=400
15RET=1
16
17# Start qemu and check its network
18Test_Create_Qemu ${TIMEOUT}
19
20# If qemu network is up, check ssh service in qemu
21if [ $? -eq 0 ]; then
22 Test_Info "Begin to Test SSH Service in Qemu"
23 Test_SSH_UP ${TARGET_IPADDR} ${TIMEOUT}
24 RET=$?
25else
26 RET=1
27fi
28
29# Check if smart --help can work in target
30if [ $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
40fi
41
42if [ ${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
47else
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
52fi
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
14TIMEOUT=400
15RET=1
16
17# Start qemu and check its network
18Test_Create_Qemu ${TIMEOUT}
19
20# If qemu network is up, check ssh service in qemu
21if [ $? -eq 0 ]; then
22 Test_Info "Begin to Test SSH Service in Qemu"
23 Test_SSH_UP ${TARGET_IPADDR} ${TIMEOUT}
24 RET=$?
25else
26 RET=1
27fi
28
29# Check if smart query can work in target
30if [ $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
40fi
41
42if [ ${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
47else
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
52fi
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
14TIMEOUT=400
15RET=1
16
17# Start qemu and check its network
18Test_Create_Qemu ${TIMEOUT}
19
20# If qemu network is up, check ssh service in qemu
21if [ $? -eq 0 ]; then
22 Test_Info "Begin to Test SSH Service in Qemu"
23 Test_SSH_UP ${TARGET_IPADDR} ${TIMEOUT}
24 RET=$?
25else
26 RET=1
27fi
28
29if [ ${RET} -eq 0 ]; then
30 Test_Info "SSH Test PASS"
31 Test_Kill_Qemu
32 Test_Print_Result "SSH" 0
33 exit 0
34else
35 Test_Info "SSH Test FAIL"
36 Test_Kill_Qemu
37 Test_Print_Result "SSH" 1
38 exit 1
39fi
diff --git a/scripts/qemuimage-tests/scenario/qemuarm/core-image-lsb b/scripts/qemuimage-tests/scenario/qemuarm/core-image-lsb
deleted file mode 100644
index b2977f1653..0000000000
--- a/scripts/qemuimage-tests/scenario/qemuarm/core-image-lsb
+++ /dev/null
@@ -1,7 +0,0 @@
1sanity ssh
2sanity scp
3sanity smart_help
4sanity smart_query
5sanity rpm_query
6sanity dmesg
7sanity shutdown
diff --git a/scripts/qemuimage-tests/scenario/qemuarm/core-image-minimal b/scripts/qemuimage-tests/scenario/qemuarm/core-image-minimal
deleted file mode 100644
index 0fcc7bba84..0000000000
--- a/scripts/qemuimage-tests/scenario/qemuarm/core-image-minimal
+++ /dev/null
@@ -1 +0,0 @@
1sanity boot
diff --git a/scripts/qemuimage-tests/scenario/qemuarm/core-image-sato b/scripts/qemuimage-tests/scenario/qemuarm/core-image-sato
deleted file mode 100644
index bef33e82d2..0000000000
--- a/scripts/qemuimage-tests/scenario/qemuarm/core-image-sato
+++ /dev/null
@@ -1,11 +0,0 @@
1sanity ssh
2sanity scp
3sanity smart_help
4sanity smart_query
5sanity rpm_query
6sanity connman
7sanity dmesg
8sanity shutdown
9systemusage bash
10systemusage df
11systemusage syslog
diff --git a/scripts/qemuimage-tests/scenario/qemuarm/core-image-sato-sdk b/scripts/qemuimage-tests/scenario/qemuarm/core-image-sato-sdk
deleted file mode 100644
index 505b0a2f97..0000000000
--- a/scripts/qemuimage-tests/scenario/qemuarm/core-image-sato-sdk
+++ /dev/null
@@ -1,12 +0,0 @@
1sanity ssh
2sanity scp
3sanity smart_help
4sanity smart_query
5sanity rpm_query
6sanity compiler
7sanity connman
8sanity dmesg
9sanity shutdown
10systemusage bash
11systemusage df
12systemusage syslog
diff --git a/scripts/qemuimage-tests/scenario/qemuarm/meta-toolchain-gmae b/scripts/qemuimage-tests/scenario/qemuarm/meta-toolchain-gmae
deleted file mode 100644
index 199176efc8..0000000000
--- a/scripts/qemuimage-tests/scenario/qemuarm/meta-toolchain-gmae
+++ /dev/null
@@ -1,3 +0,0 @@
1toolchain cvs
2toolchain iptables
3toolchain sudoku-savant
diff --git a/scripts/qemuimage-tests/scenario/qemumips/core-image-lsb b/scripts/qemuimage-tests/scenario/qemumips/core-image-lsb
deleted file mode 100644
index b2977f1653..0000000000
--- a/scripts/qemuimage-tests/scenario/qemumips/core-image-lsb
+++ /dev/null
@@ -1,7 +0,0 @@
1sanity ssh
2sanity scp
3sanity smart_help
4sanity smart_query
5sanity rpm_query
6sanity dmesg
7sanity shutdown
diff --git a/scripts/qemuimage-tests/scenario/qemumips/core-image-minimal b/scripts/qemuimage-tests/scenario/qemumips/core-image-minimal
deleted file mode 100644
index 0fcc7bba84..0000000000
--- a/scripts/qemuimage-tests/scenario/qemumips/core-image-minimal
+++ /dev/null
@@ -1 +0,0 @@
1sanity boot
diff --git a/scripts/qemuimage-tests/scenario/qemumips/core-image-sato b/scripts/qemuimage-tests/scenario/qemumips/core-image-sato
deleted file mode 100644
index bef33e82d2..0000000000
--- a/scripts/qemuimage-tests/scenario/qemumips/core-image-sato
+++ /dev/null
@@ -1,11 +0,0 @@
1sanity ssh
2sanity scp
3sanity smart_help
4sanity smart_query
5sanity rpm_query
6sanity connman
7sanity dmesg
8sanity shutdown
9systemusage bash
10systemusage df
11systemusage syslog
diff --git a/scripts/qemuimage-tests/scenario/qemumips/core-image-sato-sdk b/scripts/qemuimage-tests/scenario/qemumips/core-image-sato-sdk
deleted file mode 100644
index 505b0a2f97..0000000000
--- a/scripts/qemuimage-tests/scenario/qemumips/core-image-sato-sdk
+++ /dev/null
@@ -1,12 +0,0 @@
1sanity ssh
2sanity scp
3sanity smart_help
4sanity smart_query
5sanity rpm_query
6sanity compiler
7sanity connman
8sanity dmesg
9sanity shutdown
10systemusage bash
11systemusage df
12systemusage syslog
diff --git a/scripts/qemuimage-tests/scenario/qemumips/meta-toolchain-gmae b/scripts/qemuimage-tests/scenario/qemumips/meta-toolchain-gmae
deleted file mode 100644
index 199176efc8..0000000000
--- a/scripts/qemuimage-tests/scenario/qemumips/meta-toolchain-gmae
+++ /dev/null
@@ -1,3 +0,0 @@
1toolchain cvs
2toolchain iptables
3toolchain sudoku-savant
diff --git a/scripts/qemuimage-tests/scenario/qemuppc/core-image-lsb b/scripts/qemuimage-tests/scenario/qemuppc/core-image-lsb
deleted file mode 100644
index b2977f1653..0000000000
--- a/scripts/qemuimage-tests/scenario/qemuppc/core-image-lsb
+++ /dev/null
@@ -1,7 +0,0 @@
1sanity ssh
2sanity scp
3sanity smart_help
4sanity smart_query
5sanity rpm_query
6sanity dmesg
7sanity shutdown
diff --git a/scripts/qemuimage-tests/scenario/qemuppc/core-image-minimal b/scripts/qemuimage-tests/scenario/qemuppc/core-image-minimal
deleted file mode 100644
index 0fcc7bba84..0000000000
--- a/scripts/qemuimage-tests/scenario/qemuppc/core-image-minimal
+++ /dev/null
@@ -1 +0,0 @@
1sanity boot
diff --git a/scripts/qemuimage-tests/scenario/qemuppc/core-image-sato b/scripts/qemuimage-tests/scenario/qemuppc/core-image-sato
deleted file mode 100644
index bef33e82d2..0000000000
--- a/scripts/qemuimage-tests/scenario/qemuppc/core-image-sato
+++ /dev/null
@@ -1,11 +0,0 @@
1sanity ssh
2sanity scp
3sanity smart_help
4sanity smart_query
5sanity rpm_query
6sanity connman
7sanity dmesg
8sanity shutdown
9systemusage bash
10systemusage df
11systemusage syslog
diff --git a/scripts/qemuimage-tests/scenario/qemuppc/core-image-sato-sdk b/scripts/qemuimage-tests/scenario/qemuppc/core-image-sato-sdk
deleted file mode 100644
index 505b0a2f97..0000000000
--- a/scripts/qemuimage-tests/scenario/qemuppc/core-image-sato-sdk
+++ /dev/null
@@ -1,12 +0,0 @@
1sanity ssh
2sanity scp
3sanity smart_help
4sanity smart_query
5sanity rpm_query
6sanity compiler
7sanity connman
8sanity dmesg
9sanity shutdown
10systemusage bash
11systemusage df
12systemusage syslog
diff --git a/scripts/qemuimage-tests/scenario/qemuppc/meta-toolchain-gmae b/scripts/qemuimage-tests/scenario/qemuppc/meta-toolchain-gmae
deleted file mode 100644
index 199176efc8..0000000000
--- a/scripts/qemuimage-tests/scenario/qemuppc/meta-toolchain-gmae
+++ /dev/null
@@ -1,3 +0,0 @@
1toolchain cvs
2toolchain iptables
3toolchain sudoku-savant
diff --git a/scripts/qemuimage-tests/scenario/qemux86-64/core-image-lsb b/scripts/qemuimage-tests/scenario/qemux86-64/core-image-lsb
deleted file mode 100644
index b2977f1653..0000000000
--- a/scripts/qemuimage-tests/scenario/qemux86-64/core-image-lsb
+++ /dev/null
@@ -1,7 +0,0 @@
1sanity ssh
2sanity scp
3sanity smart_help
4sanity smart_query
5sanity rpm_query
6sanity dmesg
7sanity shutdown
diff --git a/scripts/qemuimage-tests/scenario/qemux86-64/core-image-minimal b/scripts/qemuimage-tests/scenario/qemux86-64/core-image-minimal
deleted file mode 100644
index 0fcc7bba84..0000000000
--- a/scripts/qemuimage-tests/scenario/qemux86-64/core-image-minimal
+++ /dev/null
@@ -1 +0,0 @@
1sanity boot
diff --git a/scripts/qemuimage-tests/scenario/qemux86-64/core-image-sato b/scripts/qemuimage-tests/scenario/qemux86-64/core-image-sato
deleted file mode 100644
index bef33e82d2..0000000000
--- a/scripts/qemuimage-tests/scenario/qemux86-64/core-image-sato
+++ /dev/null
@@ -1,11 +0,0 @@
1sanity ssh
2sanity scp
3sanity smart_help
4sanity smart_query
5sanity rpm_query
6sanity connman
7sanity dmesg
8sanity shutdown
9systemusage bash
10systemusage df
11systemusage syslog
diff --git a/scripts/qemuimage-tests/scenario/qemux86-64/core-image-sato-sdk b/scripts/qemuimage-tests/scenario/qemux86-64/core-image-sato-sdk
deleted file mode 100644
index 505b0a2f97..0000000000
--- a/scripts/qemuimage-tests/scenario/qemux86-64/core-image-sato-sdk
+++ /dev/null
@@ -1,12 +0,0 @@
1sanity ssh
2sanity scp
3sanity smart_help
4sanity smart_query
5sanity rpm_query
6sanity compiler
7sanity connman
8sanity dmesg
9sanity shutdown
10systemusage bash
11systemusage df
12systemusage syslog
diff --git a/scripts/qemuimage-tests/scenario/qemux86-64/meta-toolchain-gmae b/scripts/qemuimage-tests/scenario/qemux86-64/meta-toolchain-gmae
deleted file mode 100644
index 199176efc8..0000000000
--- a/scripts/qemuimage-tests/scenario/qemux86-64/meta-toolchain-gmae
+++ /dev/null
@@ -1,3 +0,0 @@
1toolchain cvs
2toolchain iptables
3toolchain sudoku-savant
diff --git a/scripts/qemuimage-tests/scenario/qemux86/core-image-lsb b/scripts/qemuimage-tests/scenario/qemux86/core-image-lsb
deleted file mode 100644
index b2977f1653..0000000000
--- a/scripts/qemuimage-tests/scenario/qemux86/core-image-lsb
+++ /dev/null
@@ -1,7 +0,0 @@
1sanity ssh
2sanity scp
3sanity smart_help
4sanity smart_query
5sanity rpm_query
6sanity dmesg
7sanity shutdown
diff --git a/scripts/qemuimage-tests/scenario/qemux86/core-image-minimal b/scripts/qemuimage-tests/scenario/qemux86/core-image-minimal
deleted file mode 100644
index 0fcc7bba84..0000000000
--- a/scripts/qemuimage-tests/scenario/qemux86/core-image-minimal
+++ /dev/null
@@ -1 +0,0 @@
1sanity boot
diff --git a/scripts/qemuimage-tests/scenario/qemux86/core-image-sato b/scripts/qemuimage-tests/scenario/qemux86/core-image-sato
deleted file mode 100644
index bef33e82d2..0000000000
--- a/scripts/qemuimage-tests/scenario/qemux86/core-image-sato
+++ /dev/null
@@ -1,11 +0,0 @@
1sanity ssh
2sanity scp
3sanity smart_help
4sanity smart_query
5sanity rpm_query
6sanity connman
7sanity dmesg
8sanity shutdown
9systemusage bash
10systemusage df
11systemusage syslog
diff --git a/scripts/qemuimage-tests/scenario/qemux86/core-image-sato-sdk b/scripts/qemuimage-tests/scenario/qemux86/core-image-sato-sdk
deleted file mode 100644
index 505b0a2f97..0000000000
--- a/scripts/qemuimage-tests/scenario/qemux86/core-image-sato-sdk
+++ /dev/null
@@ -1,12 +0,0 @@
1sanity ssh
2sanity scp
3sanity smart_help
4sanity smart_query
5sanity rpm_query
6sanity compiler
7sanity connman
8sanity dmesg
9sanity shutdown
10systemusage bash
11systemusage df
12systemusage syslog
diff --git a/scripts/qemuimage-tests/scenario/qemux86/meta-toolchain-gmae b/scripts/qemuimage-tests/scenario/qemux86/meta-toolchain-gmae
deleted file mode 100644
index 199176efc8..0000000000
--- a/scripts/qemuimage-tests/scenario/qemux86/meta-toolchain-gmae
+++ /dev/null
@@ -1,3 +0,0 @@
1toolchain cvs
2toolchain iptables
3toolchain sudoku-savant
diff --git a/scripts/qemuimage-tests/systemusage/bash b/scripts/qemuimage-tests/systemusage/bash
deleted file mode 100755
index fb9bb5cba2..0000000000
--- a/scripts/qemuimage-tests/systemusage/bash
+++ /dev/null
@@ -1,53 +0,0 @@
1#!/bin/bash
2# on the target, check bash prompt is available or not
3# boot up the qemu target with `runqemu qemuxxx`,
4# then check bash.
5#
6# Author: veera <veerabrahmamvr@huawei.com>
7#
8# This file is licensed under the GNU General Public License,
9# Version 2.
10#
11
12. $COREBASE/scripts/qemuimage-testlib
13
14TIMEOUT=400
15RET=1
16# Start qemu and check its network
17Test_Create_Qemu ${TIMEOUT}
18
19
20
21# If qemu network is up, check ssh service in qemu
22if [ $? -eq 0 ];then
23 Test_Info "Begin to Test SSH Service in Qemu"
24 Test_SSH_UP ${TARGET_IPADDR} ${TIMEOUT}
25 RET=$?
26else
27 RET=1
28fi
29
30# Check bash is working fine or not
31if [ $RET -eq 0 -a -f $TOOLS/bash.sh ]; then
32 # Copy bash.sh into target
33 Test_Target_Pre ${TARGET_IPADDR} $TOOLS/bash.sh
34 if [ $? -eq 0 ]; then
35 # Run bash.sh to check if bash command available or not on the qemuxxx target
36 Test_SSH ${TARGET_IPADDR} "sh $TARGET_TEST_DIR/bash.sh"
37 RET=$?
38 else
39 RET=1
40 fi
41fi
42
43if [ ${RET} -eq 0 ]; then
44 Test_Info "bash Test PASS"
45 Test_Kill_Qemu
46 Test_Print_Result "bash" 0
47 exit 0
48else
49 Test_Info "bash Test FAIL, Pls. check above bash"
50 Test_Kill_Qemu
51 Test_Print_Result "bash" 1
52 exit 1
53fi
diff --git a/scripts/qemuimage-tests/systemusage/df b/scripts/qemuimage-tests/systemusage/df
deleted file mode 100755
index 9657b73b34..0000000000
--- a/scripts/qemuimage-tests/systemusage/df
+++ /dev/null
@@ -1,54 +0,0 @@
1#!/bin/bash
2# df -h check test case for function test
3# boot up the qemu target with `runqemu qemuxxx`,
4# then check if df space is fine or not target.
5#
6# Author: veera <veerabrahmamvr@huawei.com>
7#
8# This file is licensed under the GNU General Public License,
9# Version 2.
10#
11
12. $COREBASE/scripts/qemuimage-testlib
13
14TIMEOUT=400
15RET=1
16
17# Start qemu and check its network
18Test_Create_Qemu ${TIMEOUT}
19
20
21
22#If qemu network is up, check ssh service in qemu
23if [ $? -eq 0 ];then
24 Test_Info "Begin to Test SSH Service in Qemu"
25 Test_SSH_UP ${TARGET_IPADDR} ${TIMEOUT}
26 RET=$?
27else
28 RET=1
29fi
30
31# Check if disk spcae space is enough or not(using df command)
32if [ $RET -eq 0 -a -f $TOOLS/df.sh ]; then
33 # Copy df.sh into target
34 Test_Target_Pre ${TARGET_IPADDR} $TOOLS/df.sh
35 if [ $? -eq 0 ]; then
36 # Run df.sh to check if df space is fine or not on the qemuxxx target
37 Test_SSH ${TARGET_IPADDR} "sh $TARGET_TEST_DIR/df.sh"
38 RET=$?
39 else
40 RET=1
41 fi
42fi
43
44if [ ${RET} -eq 0 ]; then
45 Test_Info "df Test PASS"
46 Test_Kill_Qemu
47 Test_Print_Result "df" 0
48 exit 0
49else
50 Test_Info "df Test FAIL, Pls. check above df"
51 Test_Kill_Qemu
52 Test_Print_Result "df" 1
53 exit 1
54fi
diff --git a/scripts/qemuimage-tests/systemusage/syslog b/scripts/qemuimage-tests/systemusage/syslog
deleted file mode 100755
index 559f7c1573..0000000000
--- a/scripts/qemuimage-tests/systemusage/syslog
+++ /dev/null
@@ -1,54 +0,0 @@
1#!/bin/bash
2# syslog Check test Case for function test
3# boot up the Qemu target with `runqemu qemuxxx`.
4# then check if syslog service is working fine or not target.
5#
6# Author: veera <veerabrahmamvr@huawei.com>
7#
8# This file is licensed under the GNU General Public License,
9# Version 2.
10#
11
12. $COREBASE/scripts/qemuimage-testlib
13
14TIMEOUT=400
15RET=1
16
17# Start qemu and check its network
18Test_Create_Qemu ${TIMEOUT}
19
20
21
22# If qemu network is up, check ssh service in qemu
23if [ $? -eq 0 ];then
24 Test_Info "Begin to Test SSH Service in Qemu"
25 Test_SSH_UP ${TARGET_IPADDR} ${TIMEOUT}
26 RET=$?
27else
28 RET=1
29fi
30
31# Check if syslog is working fine or not
32if [ $RET -eq 0 -a -f $TOOLS/syslog.sh ]; then
33 # Copy syslog.sh into target
34 Test_Target_Pre ${TARGET_IPADDR} $TOOLS/syslog.sh
35 if [ $? -eq 0 ]; then
36 # Run syslog.sh to check if syslog service is working fine or not on the qemuxxx target
37 Test_SSH ${TARGET_IPADDR} "sh $TARGET_TEST_DIR/syslog.sh"
38 RET=$?
39 else
40 RET=1
41 fi
42fi
43
44if [ ${RET} -eq 0 ]; then
45 Test_Info "syslog Test PASS"
46 Test_Kill_Qemu
47 Test_Print_Result "syslog" 0
48 exit 0
49else
50 Test_Info "syslog Test FAIL, Pls. check above syslog"
51 Test_Kill_Qemu
52 Test_Print_Result "syslog" 1
53 exit 1
54fi
diff --git a/scripts/qemuimage-tests/toolchain/cvs b/scripts/qemuimage-tests/toolchain/cvs
deleted file mode 100755
index 871d99110f..0000000000
--- a/scripts/qemuimage-tests/toolchain/cvs
+++ /dev/null
@@ -1,31 +0,0 @@
1#!/bin/bash
2#
3# CVS compile Test for toolchain test
4# The case extract toolchain tarball into temp folder
5# Then compile CVS with the toolchain environment
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
14TIMEOUT=120
15
16# Extract and test toolchain tarball
17Test_Toolchain cvs ${TIMEOUT}
18
19if [ $? -eq 0 ]; then
20 Test_Info "CVS Test PASS"
21 Test_Print_Result "CVS" 0
22 exit 0
23elif [ $? -eq 1 ]; then
24 Test_Info "CVS Test FAIL"
25 Test_Print_Result "CVS" 1
26 exit 1
27else
28 Test_Info "Skip CVS Test due to some configuration problem"
29 Test_Print_Result "CVS" 2
30 exit 2
31fi
diff --git a/scripts/qemuimage-tests/toolchain/iptables b/scripts/qemuimage-tests/toolchain/iptables
deleted file mode 100755
index af89bbe7b3..0000000000
--- a/scripts/qemuimage-tests/toolchain/iptables
+++ /dev/null
@@ -1,31 +0,0 @@
1#!/bin/bash
2#
3# iptables compile Test for toolchain test
4# The case extract toolchain tarball into temp folder
5# Then compile iptables with the toolchain environment
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
14TIMEOUT=120
15
16# Extract and test toolchain tarball
17Test_Toolchain iptables ${TIMEOUT}
18
19if [ $? -eq 0 ]; then
20 Test_Info "iptables Test PASS"
21 Test_Print_Result "iptables" 0
22 exit 0
23elif [ $? -eq 1 ]; then
24 Test_Info "iptables Test FAIL"
25 Test_Print_Result "iptables" 1
26 exit 1
27else
28 Test_Info "Skip iptables Test due to some configuration problem"
29 Test_Print_Result "iptables" 2
30 exit 2
31fi
diff --git a/scripts/qemuimage-tests/toolchain/sudoku-savant b/scripts/qemuimage-tests/toolchain/sudoku-savant
deleted file mode 100755
index 3d149dea27..0000000000
--- a/scripts/qemuimage-tests/toolchain/sudoku-savant
+++ /dev/null
@@ -1,31 +0,0 @@
1#!/bin/bash
2#
3# sudoku-savant compile Test for toolchain test
4# The case extract toolchain tarball into temp folder
5# Then compile sudoku-savant with the toolchain environment
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
14TIMEOUT=240
15
16# Extract and test toolchain tarball
17Test_Toolchain sudoku-savant ${TIMEOUT}
18
19if [ $? -eq 0 ]; then
20 Test_Info "sudoku-savant Test PASS"
21 Test_Print_Result "sudoku-savant" 0
22 exit 0
23elif [ $? -eq 1 ]; then
24 Test_Info "sudoku-savant Test FAIL"
25 Test_Print_Result "sudoku-savant" 1
26 exit 1
27else
28 Test_Info "Skip sudoku-savant Test due to some configuration problem"
29 Test_Print_Result "sudoku-savant" 2
30 exit 2
31fi
diff --git a/scripts/qemuimage-tests/tools/bash.sh b/scripts/qemuimage-tests/tools/bash.sh
deleted file mode 100644
index f6958f0e7e..0000000000
--- a/scripts/qemuimage-tests/tools/bash.sh
+++ /dev/null
@@ -1,17 +0,0 @@
1#!/bin/sh
2# bash test script running in qemu
3#
4# Author: veera <veerabrahmamvr@huawei.com>
5#
6# This file is licensed under the GNU General Public License,
7# Version 2.
8#
9
10which bash
11if [ $? -eq 0 ]; then
12 echo "QEMU: bash is exist in the target by default"
13 exit 0
14else
15 echo "QEMU: No bash command in the qemu target"
16 exit 1
17fi
diff --git a/scripts/qemuimage-tests/tools/compiler_test.sh b/scripts/qemuimage-tests/tools/compiler_test.sh
deleted file mode 100644
index 9c30d6d78b..0000000000
--- a/scripts/qemuimage-tests/tools/compiler_test.sh
+++ /dev/null
@@ -1,137 +0,0 @@
1#!/bin/bash
2# compiler test script running in target
3#
4# Author: Jiajun Xu <jiajun.xu@intel.com>
5#
6# This file is licensed under the GNU General Public License,
7# Version 2.
8#
9
10# Prepare test folder for compiler test
11COMPILE_FOLDER="/opt/test/compile_test"
12TEST_FILE="$COMPILE_FOLDER/compile_test.c"
13EXECUTE_FILE="$COMPILE_FOLDER/compile_test"
14TEST_MAKEFILE="$COMPILE_FOLDER/makefile"
15TEST_LIST="gcc g++ make"
16
17if [ ! -d $COMPILE_FOLDER ]; then
18 mkdir -p $COMPILE_FOLDER
19fi
20
21Target_Info()
22{
23 echo -e "\tTARGET: $*"
24}
25
26Target_Err()
27{
28 echo -e "\tTARGET: ##### Error Log #####"
29 $@
30 echo -e "\tTARGET: ##### End #####"
31}
32
33# Function to generate a c test file for compiler testing
34Gen_File()
35{
36 temp=`mktemp`
37
38 # Generate c/c++ test file for compiler testing
39 echo "#include <stdio.h>" >> $temp
40 echo "#include <math.h>" >> $temp
41 echo "" >> $temp
42 echo "double" >> $temp
43 echo "convert(long long l)" >> $temp
44 echo "{" >> $temp
45 echo " return (double)l; // or double(l)" >> $temp
46 echo "}" >> $temp
47 echo "" >> $temp
48 echo "int" >> $temp
49 echo "main(int argc, char * argv[])" >> $temp
50 echo "{" >> $temp
51 echo " long long l = 10;" >> $temp
52 echo " double f;" >> $temp
53 echo "" >> $temp
54 echo " f = convert(l);" >> $temp
55 echo " printf(\"convert: %lld => %f\n\", l, f);" >> $temp
56 echo "" >> $temp
57 echo " f = 1234.67;" >> $temp
58 echo " printf(\"floorf(%f) = %f\n\", f, floorf(f));" >> $temp
59 echo " return 0;" >> $temp
60 echo "}" >> $temp
61 echo $temp
62}
63
64# Function to generate a makefile for compiler testing
65Gen_Makefile()
66{
67 temp=`mktemp`
68 basename=`basename $EXECUTE_FILE`
69
70 echo -e "$basename: $basename.o" >> $temp
71 echo -e "\tgcc -o $basename $basename.o -lm" >> $temp
72 echo -e "$basename.o: $basename.c" >> $temp
73 echo -e "\tgcc -c $basename.c" >> $temp
74
75 echo $temp
76}
77
78# Generate a c test file for compiler testing
79test_file=`Gen_File`
80
81MOVE=`which mv`
82$MOVE $test_file $TEST_FILE
83
84# Begin compiler test in target
85for cmd in $TEST_LIST
86do
87 which $cmd
88 if [ $? -ne 0 ]; then
89 Target_Info "No $cmd command found"
90 exit 1
91 fi
92
93 if [ "$cmd" == "make" ]; then
94 rm -rf $EXECUTE_FILE
95
96 # For makefile test, we need to generate a makefile and run with a c file
97 makefile=`Gen_Makefile`
98 $MOVE $makefile $TEST_MAKEFILE
99
100 cd `dirname $TEST_MAKEFILE`
101 make
102
103 if [ $? -ne 0 ]; then
104 Target_Info "$cmd running with error, Pls. check error in following"
105 Target_Err make
106 exit 1
107 fi
108 else
109 rm -rf $EXECUTE_FILE
110
111 # For gcc/g++, we compile a c test file and check the output
112 $cmd $TEST_FILE -o $EXECUTE_FILE -lm
113
114 if [ $? -ne 0 ]; then
115 Target_Info "$cmd running with error, Pls. check error in following"
116 Target_Err $cmd $TEST_FILE -o $EXECUTE_FILE -lm
117 exit 1
118 fi
119 fi
120
121 # Check if the binary file generated by $cmd can work without error
122 if [ -f $EXECUTE_FILE ]; then
123 $EXECUTE_FILE
124 if [ $? -ne 0 ]; then
125 Target_Info "$EXECUTE_FILE running with error, Pls. check error in following"
126 Target_Err $EXECUTE_FILE
127 exit 1
128 else
129 Target_Info "$cmd can work without problem in target"
130 fi
131 else
132 Target_Info "No executalbe file $EXECUTE_FILE found, Pls. check the error log"
133 exit 1
134 fi
135done
136
137exit 0
diff --git a/scripts/qemuimage-tests/tools/connman_test.sh b/scripts/qemuimage-tests/tools/connman_test.sh
deleted file mode 100644
index 4c1e2f558e..0000000000
--- a/scripts/qemuimage-tests/tools/connman_test.sh
+++ /dev/null
@@ -1,75 +0,0 @@
1#!/bin/bash
2# connman test script running in target
3#
4# Author: Jiajun Xu <jiajun.xu@intel.com>
5#
6# This file is licensed under the GNU General Public License,
7# Version 2.
8#
9
10Target_Info()
11{
12 echo -e "\tTARGET: $*"
13}
14
15Target_Err()
16{
17 echo -e "\tTARGET: connman has issue when running, Pls. check the error log"
18 echo -e "\tTARGET: ##### Error Log #####"
19 $1
20 echo -e "\tTARGET: ##### End #####"
21}
22
23# Check if ps comes from Procps or busybox first
24ls -l `which ps` | grep -q "busybox"
25RET=$?
26
27if [ $RET -eq 0 ]; then
28 PS="ps"
29else
30 PS="ps -ef"
31fi
32
33# Check if connmand is in target
34if [ ! -f /usr/sbin/connmand ]; then
35 Target_Info "No connmand command found"
36 exit 1
37fi
38
39# Check if connmand is running in background
40if [ $RET -eq 0 ]; then
41 count=`ps | awk '{print $5}' | grep -c connmand`
42else
43 count=`ps -eo comm | cut -d " " -f 1 | grep -c connmand`
44fi
45
46if [ $count -ne 1 ]; then
47 Target_Info "connmand has issue when running in background, Pls, check the output of ps"
48 ${PS}
49 exit 1
50fi
51
52# Check if there is always only one connmand running in background
53if [ connmand > /dev/null 2>&1 ]; then
54 Target_Info "connmand command run without problem"
55
56 if [ $RET -eq 0 ]; then
57 count=`ps | awk '{print $5}' | grep -c connmand`
58 else
59 count=`ps -eo comm | cut -d " " -f 1 | grep -c connmand`
60 fi
61
62 if [ $count -ne 1 ]; then
63 Target_Info "There are more than one connmand running in background, Pls, check the output of ps"
64 ${PS} | grep connmand
65 exit 1
66 else
67 Target_Info "There is always one connmand running in background, test pass"
68 exit 0
69 fi
70else
71 Target_Err connmand
72 exit 1
73fi
74
75exit 0
diff --git a/scripts/qemuimage-tests/tools/df.sh b/scripts/qemuimage-tests/tools/df.sh
deleted file mode 100644
index 280c08e031..0000000000
--- a/scripts/qemuimage-tests/tools/df.sh
+++ /dev/null
@@ -1,25 +0,0 @@
1#!/bin/bash
2# df test script to check enough disk space for qemu target
3#
4# Author: veera <veerabrahmamvr@huawei.com>
5#
6# This file is licensed under the GNU General Public License,
7# Version 2.
8#taking the size of the each partition
9array_list=(`df -P | tr -s " " | cut -d " " -f4`)
10#Total size of the array
11array_size=`echo ${#array_list[@]}`
12loop_val=1
13#while loop to check the size of partitions are less than 5MB
14while [ $loop_val -lt $array_size ]
15do
16 #taking each value from the array to check the size
17 value=`echo ${array_list[$loop_val]}`
18 if [[ $value -gt 5120 ]];then
19 loop_val=`expr $loop_val + 1`
20 else
21 echo "QEMU: df : disk space is not enough"
22 exit 1
23 fi
24done
25exit 0
diff --git a/scripts/qemuimage-tests/tools/dmesg.sh b/scripts/qemuimage-tests/tools/dmesg.sh
deleted file mode 100644
index f0c93181bd..0000000000
--- a/scripts/qemuimage-tests/tools/dmesg.sh
+++ /dev/null
@@ -1,28 +0,0 @@
1#!/bin/bash
2# Dmesg test script running in QEMU
3#
4# Author: Jiajun Xu <jiajun.xu@intel.com>
5#
6# This file is licensed under the GNU General Public License,
7# Version 2.
8#
9
10which dmesg
11if [ $? -ne 0 ]; then
12 echo "QEMU: No dmesg command found"
13 exit 1
14fi
15
16# For now, ignore mmci-pl18x errors on qemuarm which appeared
17# from the 3.8 kernel and are harmless
18dmesg | grep -v mmci-pl18x | grep -iq "error"
19if [ $? -eq 0 ]; then
20 echo "QEMU: There is some error log in dmesg:"
21 echo "QEMU: ##### Error Log ######"
22 dmesg | grep -i "error"
23 echo "QEMU: ##### End ######"
24 exit 1
25else
26 echo "QEMU: No error log in dmesg"
27 exit 0
28fi
diff --git a/scripts/qemuimage-tests/tools/rpm_test.sh b/scripts/qemuimage-tests/tools/rpm_test.sh
deleted file mode 100644
index 6e6f9112ca..0000000000
--- a/scripts/qemuimage-tests/tools/rpm_test.sh
+++ /dev/null
@@ -1,45 +0,0 @@
1#!/bin/bash
2# rpm test script running in target
3#
4# Author: Jiajun Xu <jiajun.xu@intel.com>
5#
6# This file is licensed under the GNU General Public License,
7# Version 2.
8#
9
10Target_Info()
11{
12 echo -e "\tTARGET: $*"
13}
14
15Target_Err()
16{
17 echo -e "\tTARGET: rpm command has issue when running, Pls. check the error log"
18 echo -e "\tTARGET: ##### Error Log #####"
19 $1
20 echo -e "\tTARGET: ##### End #####"
21}
22
23which rpm
24if [ $? -ne 0 ]; then
25 Target_Info "No rpm command found"
26 exit 1
27fi
28
29if [ rpm > /dev/null 2>&1 ]; then
30 Target_Info "rpm command run without problem"
31else
32 Target_Err rpm
33 exit 1
34fi
35
36# run rpm with specific command parsed to rpm_test.sh
37rpm $* > /dev/null 2>&1
38
39if [ $? -eq 0 ]; then
40 Target_Info "rpm $* work without problem"
41 exit 0
42else
43 Target_Err rpm $*
44 exit 1
45fi
diff --git a/scripts/qemuimage-tests/tools/smart_test.sh b/scripts/qemuimage-tests/tools/smart_test.sh
deleted file mode 100644
index f278a25e2b..0000000000
--- a/scripts/qemuimage-tests/tools/smart_test.sh
+++ /dev/null
@@ -1,45 +0,0 @@
1#!/bin/bash
2# smart test script running in target
3#
4# Author: Jiajun Xu <jiajun.xu@intel.com>
5#
6# This file is licensed under the GNU General Public License,
7# Version 2.
8#
9
10Target_Info()
11{
12 echo -e "\tTARGET: $*"
13}
14
15Target_Err()
16{
17 echo -e "\tTARGET: smart command has issue when running, Pls. check the error log"
18 echo -e "\tTARGET: ##### Error Log #####"
19 $1
20 echo -e "\tTARGET: ##### End #####"
21}
22
23which smart
24if [ $? -ne 0 ]; then
25 Target_Info "No smart command found"
26 exit 1
27fi
28
29if [ smart > /dev/null 2>&1 ]; then
30 Target_Info "smart command run without problem"
31else
32 Target_Err smart
33 exit 1
34fi
35
36# run smart with specific command parsed to smart_test.sh
37smart $* > /dev/null 2>&1
38
39if [ $? -eq 0 ]; then
40 Target_Info "smart $* work without problem"
41 exit 0
42else
43 Target_Err "smart $*"
44 exit 1
45fi
diff --git a/scripts/qemuimage-tests/tools/syslog.sh b/scripts/qemuimage-tests/tools/syslog.sh
deleted file mode 100644
index 9154da3b85..0000000000
--- a/scripts/qemuimage-tests/tools/syslog.sh
+++ /dev/null
@@ -1,17 +0,0 @@
1#!/bin/bash
2# syslog test script running in qemu
3#
4# Author: veera <veerabrahmamvr@huawei.com>
5#
6# This file is licensed under the GNU General Public License,
7# Version 2.
8#
9
10ps aux | grep -w syslogd | grep -v grep
11if [ $? -eq 0 ]; then
12 echo "QEMU: syslogd is running by default"
13 exit 0
14else
15 echo "QEMU: syslogd is not running"
16 exit 1
17fi