aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xexternal/boot-tests/extract_gcov.sh28
-rw-r--r--test/Makefile.check10
-rwxr-xr-xtest/make-boot-coverage-report.sh5
3 files changed, 39 insertions, 4 deletions
diff --git a/external/boot-tests/extract_gcov.sh b/external/boot-tests/extract_gcov.sh
new file mode 100755
index 0000000..76fde83
--- /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
diff --git a/test/Makefile.check b/test/Makefile.check
index e2b960d..5e25afa 100644
--- a/test/Makefile.check
+++ b/test/Makefile.check
@@ -17,5 +17,11 @@ boot-check-op-build-v1.2.1:
boot-tests: boot-check boot-check-op-build-v1.0 boot-check-op-build-v1.1 boot-check-op-build-v1.2 boot-check-op-build-v1.2.1
-boot-coverage-report: boot-tests extract-gcov skiboot.map
- CROSS=$(CROSS) ./test/make-boot-coverage-report.sh
+boot-coverage-report: boot-tests extract-gcov skiboot.map all-boot-hardware
+ CROSS=$(CROSS) BOOT_TESTS="hello_world boot_test op-build-v1.0 op-build-v1.1 op-build-v1.2 op-build-v1.2.1 ${FSP_GCOV_MACHINES}" ./test/make-boot-coverage-report.sh
+
+boot-hardware-%:
+ ./external/boot-tests/boot_test.sh -v -p -t $(@:boot-hardware-%=%) -1 skiboot.lid
+ ./external/boot-tests/extract_gcov.sh $(@:boot-hardware-%=%)
+
+all-boot-hardware: $(FSP_GCOV_MACHINES:%=boot-hardware-%) \ No newline at end of file
diff --git a/test/make-boot-coverage-report.sh b/test/make-boot-coverage-report.sh
index 7e07231..c4d5a0d 100755
--- a/test/make-boot-coverage-report.sh
+++ b/test/make-boot-coverage-report.sh
@@ -16,12 +16,13 @@ function process_dump {
find .|grep '\.gcda$'|xargs rm -f
-BOOT_TESTS="hello_world boot_test op-build-v1.0 op-build-v1.1 op-build-v1.2 op-build-v1.2.1"
-
for i in $BOOT_TESTS; do
if [ -f ./external/mambo/skiboot-$i.dump ]; then
process_dump ./external/mambo/skiboot-$i.dump skiboot-$i.info
fi
+ if [ -f ./skiboot-$i.dump ]; then
+ process_dump ./skiboot-$i.dump skiboot-$i.info
+ fi
done
if [ -z "$LCOV_INFO_FILES" ]; then