Added some debugging messages to make it obvious when test scripts are actually running.

pull/37/head
Eleanor Saitta 2015-10-09 12:22:55 -04:00
parent 742071493c
commit f191621abc
5 changed files with 43 additions and 19 deletions

View File

@ -1,5 +1,9 @@
#!/bin/bash
# To make debugging easier
echo "KittenGroomer: in copy_to_final.sh" 1>&2
set -e
set -x
@ -42,3 +46,7 @@ cp -rf midi ${CHROOT_PATH}/opt/
# It is also a good idea to run raspi-config once and enable the console login (allow debugging)
# To make debugging easier
echo "KittenGroomer: done with copy_to_final.sh" 1>&2

View File

@ -1,5 +1,8 @@
#!/bin/bash
# To make debugging easier
echo "KittenGroomer: in mount_image.sh" 1>&2
# Notes:
# - To chroot in an existing SD card, unset IMAGE. Change the paths to the partitions if needed.
# - The offsets are thoses of 2013-02-09-wheezy-raspbian.img. It will change on an other image.
@ -93,4 +96,8 @@ cp -pf /etc/resolv.conf ${CHROOT_PATH}/etc
mv ${CHROOT_PATH}/etc/ld.so.preload ${CHROOT_PATH}/etc/ld.so.preload_bkp
# To make debugging easier
echo "KittenGroomer: Image mounted, executing command from mount_image.sh" 1>&2
${COMMAND} ${CHROOT_PATH}

View File

View File

@ -13,6 +13,6 @@ spawn qemu-system-arm -kernel kernel-qemu -cpu arm1176 -m 256 -M versatilepb \
-mon chardev=mon1,mode=control,pretty=on \
-vnc 0.0.0.0:1
expect "reboot: System halted"
expect "System halted."
send "quit\n"

View File

@ -2,6 +2,10 @@
# http://pub.phyks.me/respawn/mypersonaldata/public/2014-05-20-11-08-01/
# To make debugging easier
echo "KittenGroomer: in tests/run.sh" 1>&2
IMAGE='../raspbian-wheezy.img'
OFFSET_ROOTFS=$((122880 * 512))
@ -49,28 +53,31 @@ mount -o loop,offset=${OFFSET_VFAT_NORM} ${IMAGE_VFAT_NORM} ${SETUP_DIR}
cp -rf content_img_vfat_norm/* ${SETUP_DIR}
umount ${SETUP_DIR}
# Prepare the test source key (with partitions)
mount -o loop,offset=${OFFSET_VFAT_PART1} ${IMAGE_VFAT_PART} ${SETUP_DIR}
cp -rf content_img_vfat_part1/* ${SETUP_DIR}
umount ${SETUP_DIR}
mount -o loop,offset=${OFFSET_VFAT_PART2} ${IMAGE_VFAT_PART} ${SETUP_DIR}
cp -rf content_img_vfat_part2/* ${SETUP_DIR}
umount ${SETUP_DIR}
#mount -o loop,offset=${OFFSET_VFAT_PART1} ${IMAGE_VFAT_PART} ${SETUP_DIR}
#cp -rf content_img_vfat_part1/* ${SETUP_DIR}
#umount ${SETUP_DIR}
#mount -o loop,offset=${OFFSET_VFAT_PART2} ${IMAGE_VFAT_PART} ${SETUP_DIR}
#cp -rf content_img_vfat_part2/* ${SETUP_DIR}
#umount ${SETUP_DIR}
# Prepare the test source key (NTFS)
mount -o loop,offset=${OFFSET_VFAT_NORM} ${IMAGE_NTFS_NORM} ${SETUP_DIR}
cp -rf content_img_vfat_norm/* ${SETUP_DIR}
umount ${SETUP_DIR}
#mount -o loop,offset=${OFFSET_VFAT_NORM} ${IMAGE_NTFS_NORM} ${SETUP_DIR}
#cp -rf content_img_vfat_norm/* ${SETUP_DIR}
#umount ${SETUP_DIR}
# Prepare the test source key (EXT2)
mount -o loop,offset=${OFFSET_VFAT_NORM} ${IMAGE_EXT2} ${SETUP_DIR}
cp -rf content_img_vfat_norm/* ${SETUP_DIR}
umount ${SETUP_DIR}
#mount -o loop,offset=${OFFSET_VFAT_NORM} ${IMAGE_EXT2} ${SETUP_DIR}
#cp -rf content_img_vfat_norm/* ${SETUP_DIR}
#umount ${SETUP_DIR}
# Prepare the test source key (EXT3)
mount -o loop,offset=${OFFSET_VFAT_NORM} ${IMAGE_EXT3} ${SETUP_DIR}
cp -rf content_img_vfat_norm/* ${SETUP_DIR}
umount ${SETUP_DIR}
#mount -o loop,offset=${OFFSET_VFAT_NORM} ${IMAGE_EXT3} ${SETUP_DIR}
#cp -rf content_img_vfat_norm/* ${SETUP_DIR}
#umount ${SETUP_DIR}
# Prepare the test source key (EXT4)
mount -o loop,offset=${OFFSET_VFAT_NORM} ${IMAGE_EXT4} ${SETUP_DIR}
cp -rf content_img_vfat_norm/* ${SETUP_DIR}
umount ${SETUP_DIR}
#mount -o loop,offset=${OFFSET_VFAT_NORM} ${IMAGE_EXT4} ${SETUP_DIR}
#cp -rf content_img_vfat_norm/* ${SETUP_DIR}
#umount ${SETUP_DIR}
# To make debugging easier
echo "KittenGroomer: about to enter tests/run.exp" 1>&2
chmod a-w ${IMAGE}
./run.exp ${IMAGE} ${IMAGE_VFAT_NORM} ${IMAGE_DEST}
@ -91,3 +98,5 @@ chmod a-w ${IMAGE}
#./run.exp ${IMAGE} ${IMAGE_VFAT_PART} ${IMAGE_DEST}
chmod +w ${IMAGE}
# To make debugging easier
echo "KittenGroomer: done with tests/run.sh" 1>&2