mirror of
https://git.yoctoproject.org/poky
synced 2026-05-30 00:20:08 +00:00
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>
This commit is contained in:
committed by
Richard Purdie
parent
53b775b496
commit
12a861359a
@@ -0,0 +1,26 @@
|
||||
#!/bin/bash
|
||||
# Dmesg test script running in QEMU
|
||||
#
|
||||
# Author: Jiajun Xu <jiajun.xu@intel.com>
|
||||
#
|
||||
# This file is licensed under the GNU General Public License,
|
||||
# Version 2.
|
||||
#
|
||||
|
||||
which dmesg
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "QEMU: No dmesg command found"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
dmesg | grep -iq "error"
|
||||
if [ $? -eq 0 ]; then
|
||||
echo "QEMU: There is some error log in dmesg:"
|
||||
echo "QEMU: ##### Error Log ######"
|
||||
dmesg | grep -i "error"
|
||||
echo "QEMU: ##### End ######"
|
||||
exit 1
|
||||
else
|
||||
echo "QEMU: No error log in dmesg"
|
||||
exit 0
|
||||
fi
|
||||
Reference in New Issue
Block a user