diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/Makefile.check | 5 | ||||
-rw-r--r-- | test/hello_world/Makefile.check | 2 | ||||
-rw-r--r-- | test/hello_world/run_hello_world.tcl | 3 | ||||
-rwxr-xr-x | test/make-boot-coverage-report.sh | 19 | ||||
-rw-r--r-- | test/run_boot_test.tcl | 4 |
5 files changed, 30 insertions, 3 deletions
diff --git a/test/Makefile.check b/test/Makefile.check index 6402f95..ffe4cb7 100644 --- a/test/Makefile.check +++ b/test/Makefile.check @@ -2,3 +2,8 @@ check: boot-check boot-check: skiboot.lid ./test/run_boot_test.sh + +boot-tests: boot-check + +boot-coverage-report: boot-tests extract-gcov skiboot.map + CROSS=$(CROSS) ./test/make-boot-coverage-report.sh diff --git a/test/hello_world/Makefile.check b/test/hello_world/Makefile.check index cfb64d9..638a627 100644 --- a/test/hello_world/Makefile.check +++ b/test/hello_world/Makefile.check @@ -2,6 +2,8 @@ HELLO_WORLD_TEST := test/hello_world/hello_kernel/hello_kernel check: $(HELLO_WORLD_TEST:%=%-check) +boot-tests: $(HELLO_WORLD_TEST:%=%-check) + $(HELLO_WORLD_TEST:%=%-check) : %-check: % skiboot.lid ./test/hello_world/run_hello_world.sh diff --git a/test/hello_world/run_hello_world.tcl b/test/hello_world/run_hello_world.tcl index e44fe16..0e2922d 100644 --- a/test/hello_world/run_hello_world.tcl +++ b/test/hello_world/run_hello_world.tcl @@ -1,4 +1,5 @@ source ../../external/mambo/skiboot.tcl mysim go -exit
\ No newline at end of file +mysim memory fwrite 0x30000000 0x300000 skiboot-hello_world.dump +exit diff --git a/test/make-boot-coverage-report.sh b/test/make-boot-coverage-report.sh new file mode 100755 index 0000000..5d36345 --- /dev/null +++ b/test/make-boot-coverage-report.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +# We cheat and do this in a shell script so I don't go Makefile crazy. + +SKIBOOT_GCOV_ADDR=`perl -e "printf '0x%x', 0x30000000 + 0x\`grep gcov_info_list skiboot.map|cut -f 1 -d ' '\`"` + +find .|grep '\.gcda$'|xargs rm -f + +./extract-gcov ./external/mambo/skiboot-hello_world.dump $SKIBOOT_GCOV_ADDR +lcov -q -b . -d . -c -o skiboot-hello_world.info --gcov-tool ${CROSS}gcov +find .|grep '\.gcda$'|xargs rm -f + +./extract-gcov ./external/mambo/skiboot-boot_test.dump $SKIBOOT_GCOV_ADDR +lcov -q -b . -d . -c -o skiboot-boot_test.info --gcov-tool ${CROSS}gcov +find .|grep '\.gcda$'|xargs rm -f + +lcov -q -b . -d . --gcov-tool ${CROSS}gcov -o skiboot-boot.info -a skiboot-boot_test.info -a skiboot-hello_world.info + +genhtml -o boot-coverage-report skiboot-boot.info
\ No newline at end of file diff --git a/test/run_boot_test.tcl b/test/run_boot_test.tcl index 81f2852..0f7fa84 100644 --- a/test/run_boot_test.tcl +++ b/test/run_boot_test.tcl @@ -11,6 +11,6 @@ proc console_trigger {response args} { mysim trigger set console "Welcome to Petitboot" { console_trigger "x" } mysim trigger set console "# " { console_trigger "halt\n" } - mysim go -exit
\ No newline at end of file +mysim memory fwrite 0x30000000 0x300000 skiboot-boot_test.dump +exit |