From d03824b0fdf67dffb17c54e45892a1265c37305e Mon Sep 17 00:00:00 2001 From: Stewart Smith Date: Wed, 27 May 2015 17:01:37 +1000 Subject: Support doing physical machine boot tests with gcov We can boot FSP machines and extract GCOV coverage report from them combining with Mambo reports Signed-off-by: Stewart Smith --- external/boot-tests/extract_gcov.sh | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100755 external/boot-tests/extract_gcov.sh (limited to 'external/boot-tests') diff --git a/external/boot-tests/extract_gcov.sh b/external/boot-tests/extract_gcov.sh new file mode 100755 index 00000000..76fde839 --- /dev/null +++ b/external/boot-tests/extract_gcov.sh @@ -0,0 +1,28 @@ +#!/bin/bash + +if [ "$SKIBOOT_GCOV" != 1 ]; then + echo "Skipping GCOV test on physical hardware. Enable with SKIBOOT_GCOV=1" + exit 0; +fi + +if [ ! -f ~/.skiboot_boot_tests ]; then + echo "Skipping extract gcov due to missing ~/.skiboot_boot_tests" + echo "Set FSPSSHUSER and FSPSSHPASS in ~/.skiboot_boot_tests" + exit 0; +fi + +source ~/.skiboot_boot_tests + +target=$1 +SSHUSER=$FSPSSHUSER +SSHPASS=$FSPSSHPASS + +export SSHUSER SSHPASS + +SSHCMD="sshpass -e ssh -l $SSHUSER -o LogLevel=quiet -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no $target"; +REMOTECPCMD="sshpass -e scp -o User=$SSHUSER -o LogLevel=quiet -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no "; + +$SSHCMD rm -f skiboot-$target.dump +echo "Dumping skiboot memory from host: $target... (takes time)" +$SSHCMD sh --login -c \"getmemproc 30000000 3145728 -fb skiboot-$target.dump\" +$REMOTECPCMD $target:skiboot-$target.dump skiboot-$target.dump -- cgit v1.2.1