make the unit tests work properly

pull/10/head
Raphaël Vinot 2014-03-26 16:36:03 +01:00
parent bf17516386
commit 736387b2d9
3 changed files with 23 additions and 10 deletions

0
tests/mkrawfs.sh Normal file → Executable file
View File

20
tests/run.exp Executable file
View File

@ -0,0 +1,20 @@
#!/usr/bin/expect -f
set timeout -1
spawn qemu-system-arm -kernel kernel-qemu -cpu arm1176 -m 256 -M versatilepb \
-watchdog i6300esb -watchdog-action poweroff \
-serial stdio -append "root=/dev/sdc2 panic=1 rootfstype=ext4 ro console=ttyAMA0 console=ttyS0" \
-drive file=[lindex $argv 1],index=0,media=disk \
-drive file=[lindex $argv 2],index=1,media=disk \
-drive file=[lindex $argv 0],index=2,media=disk \
-vnc 0.0.0.0:1 \
-serial stdio \
-soundhw all \
-chardev stdio,id=mon0 -mon chardev=mon0,mode=readline \
-chardev socket,id=mon1,host=localhost,port=4444,server,nowait \
-mon chardev=mon1,mode=control,pretty=on
expect "System halted."
send "quit\n"

13
tests/run.sh Normal file → Executable file
View File

@ -2,7 +2,7 @@
# http://xecdesign.com/qemu-emulating-raspberry-pi-the-easy-way/ # http://xecdesign.com/qemu-emulating-raspberry-pi-the-easy-way/
IMAGE='../old/2013-12-09_CIRCLean.img' IMAGE='../2014-01-07-wheezy-raspbian.img'
OFFSET_ROOTFS=$((122880 * 512)) OFFSET_ROOTFS=$((122880 * 512))
IMAGE_VFAT_NORM="testcase.vfat" IMAGE_VFAT_NORM="testcase.vfat"
@ -52,13 +52,6 @@ mount -o loop,offset=${OFFSET_VFAT_PART2} ${IMAGE_VFAT_PART} ${SETUP_DIR}
cp content_img_vfat_part2/* ${SETUP_DIR} cp content_img_vfat_part2/* ${SETUP_DIR}
umount ${SETUP_DIR} umount ${SETUP_DIR}
./run.exp ${IMAGE} ${IMAGE_VFAT_NORM} ${IMAGE_DEST}
qemu-system-arm -kernel kernel-qemu -cpu arm1176 -m 256 -M versatilepb \ #./run.exp ${IMAGE} ${IMAGE_VFAT_PART} ${IMAGE_DEST}
-watchdog i6300esb -watchdog-action poweroff \
-serial stdio -append "root=/dev/sdc2 panic=1 rootfstype=ext4 rw" \
-drive file=${IMAGE_VFAT_NORM},index=0,media=disk \
-drive file=${IMAGE_DEST},index=1,media=disk \
-vnc 0.0.0.0:1 -drive file=${IMAGE},index=2,media=disk