diff options
author | Jiajun Xu <jiajun.xu@intel.com> | 2010-10-30 01:03:22 +0800 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2010-11-10 21:09:22 +0800 |
commit | 12a861359a3413ded52174c814e8653c56caee17 (patch) | |
tree | 305a53f25d58def6e2793e7f6fcdd1a7387f0287 /scripts/qemuimage-tests/tools | |
parent | 53b775b49645ce6bcac48def8671bf5f751c730b (diff) | |
download | poky-12a861359a3413ded52174c814e8653c56caee17.tar.gz |
imagetest-qemu: Add test case for dmesg check in target
Add a test case for error log check with command dmesg in target. The
case introduces a new folder in target, "/opt/test", which holds test
scripts running in target.
Signed-off-by Jiajun Xu <jiajun.xu@intel.com>
Diffstat (limited to 'scripts/qemuimage-tests/tools')
-rw-r--r-- | scripts/qemuimage-tests/tools/dmesg.sh | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/scripts/qemuimage-tests/tools/dmesg.sh b/scripts/qemuimage-tests/tools/dmesg.sh new file mode 100644 index 0000000000..66c022343b --- /dev/null +++ b/scripts/qemuimage-tests/tools/dmesg.sh | |||
@@ -0,0 +1,26 @@ | |||
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 | |||
10 | which dmesg | ||
11 | if [ $? -ne 0 ]; then | ||
12 | echo "QEMU: No dmesg command found" | ||
13 | exit 1 | ||
14 | fi | ||
15 | |||
16 | dmesg | grep -iq "error" | ||
17 | if [ $? -eq 0 ]; then | ||
18 | echo "QEMU: There is some error log in dmesg:" | ||
19 | echo "QEMU: ##### Error Log ######" | ||
20 | dmesg | grep -i "error" | ||
21 | echo "QEMU: ##### End ######" | ||
22 | exit 1 | ||
23 | else | ||
24 | echo "QEMU: No error log in dmesg" | ||
25 | exit 0 | ||
26 | fi | ||