diff options
author | Stewart Smith <stewart@linux.vnet.ibm.com> | 2015-05-26 17:34:46 +1000 |
---|---|---|
committer | Stewart Smith <stewart@linux.vnet.ibm.com> | 2015-05-26 17:43:23 +1000 |
commit | b334b39590d2cb47ca7acdfc287e4c55d4ba973c (patch) | |
tree | 7c9a7ab87e4d18df92c654763519b73d02455695 /test | |
parent | 8d18e38a7c61e01b9b6ad5a70bf48697b70aa0ec (diff) | |
download | skiboot-b334b39590d2cb47ca7acdfc287e4c55d4ba973c.zip skiboot-b334b39590d2cb47ca7acdfc287e4c55d4ba973c.tar.gz skiboot-b334b39590d2cb47ca7acdfc287e4c55d4ba973c.tar.bz2 |
Enable multiple boot tests based on op-build verisons
We also add a makefile to help people re-create the images.
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'test')
-rw-r--r-- | test/Makefile.check | 14 | ||||
-rwxr-xr-x | test/make-boot-coverage-report.sh | 31 | ||||
-rwxr-xr-x | test/run_boot_test.sh | 11 | ||||
-rw-r--r-- | test/run_boot_test.tcl | 2 |
4 files changed, 45 insertions, 13 deletions
diff --git a/test/Makefile.check b/test/Makefile.check index ffe4cb7..e2b960d 100644 --- a/test/Makefile.check +++ b/test/Makefile.check @@ -3,7 +3,19 @@ check: boot-check boot-check: skiboot.lid ./test/run_boot_test.sh -boot-tests: boot-check +boot-check-op-build-v1.0: + SKIBOOT_MEM_DUMP=skiboot-op-build-v1.0.dump SKIBOOT_ZIMAGE=`pwd`/opal-ci/images/op-build-v1.0/zImage.epapr ./test/run_boot_test.sh + +boot-check-op-build-v1.1: + SKIBOOT_MEM_DUMP=skiboot-op-build-v1.1.dump SKIBOOT_ZIMAGE=`pwd`/opal-ci/images/op-build-v1.1/zImage.epapr ./test/run_boot_test.sh + +boot-check-op-build-v1.2: + SKIBOOT_MEM_DUMP=skiboot-op-build-v1.2.dump SKIBOOT_ZIMAGE=`pwd`/opal-ci/images/op-build-v1.2/zImage.epapr ./test/run_boot_test.sh + +boot-check-op-build-v1.2.1: + SKIBOOT_MEM_DUMP=skiboot-op-build-v1.2.1.dump SKIBOOT_ZIMAGE=`pwd`/opal-ci/images/op-build-v1.2.1/zImage.epapr ./test/run_boot_test.sh + +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 diff --git a/test/make-boot-coverage-report.sh b/test/make-boot-coverage-report.sh index 5d36345..7e07231 100755 --- a/test/make-boot-coverage-report.sh +++ b/test/make-boot-coverage-report.sh @@ -4,16 +4,31 @@ 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 +LCOV_INFO_FILES="" -./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 +function process_dump { + ./extract-gcov $1 $SKIBOOT_GCOV_ADDR + lcov -q -b . -d . -c -o $2 --gcov-tool ${CROSS}gcov + LCOV_INFO_FILES="$LCOV_INFO_FILES -a $2" + 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 +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 +done + +if [ -z "$LCOV_INFO_FILES" ]; then + echo "ERROR: no lcov files found" + exit 1; +fi + +lcov -q -b . -d . --gcov-tool ${CROSS}gcov -o skiboot-boot.info $LCOV_INFO_FILES -genhtml -o boot-coverage-report skiboot-boot.info
\ No newline at end of file +genhtml -o boot-coverage-report skiboot-boot.info diff --git a/test/run_boot_test.sh b/test/run_boot_test.sh index d1fb6d0..8ae7fda 100755 --- a/test/run_boot_test.sh +++ b/test/run_boot_test.sh @@ -24,14 +24,19 @@ if [ ! `command -v expect` ]; then exit 0; fi - -export SKIBOOT_ZIMAGE=`pwd`/zImage.epapr +if [ -z "$SKIBOOT_ZIMAGE" ]; then + export SKIBOOT_ZIMAGE=`pwd`/zImage.epapr +fi if [ ! -f "$SKIBOOT_ZIMAGE" ]; then - echo 'No zImage.epapr, skipping boot test'; + echo "No $SKIBOOT_ZIMAGE, skipping boot test"; exit 0; fi +if [ -z "$SKIBOOT_MEM_DUMP" ]; then + export SKIBOOT_MEM_DUMP=skiboot-boot_test.dump +fi + # Currently getting some core dumps from mambo, so disable them! OLD_ULIMIT_C=`ulimit -c` ulimit -c 0 diff --git a/test/run_boot_test.tcl b/test/run_boot_test.tcl index 0f7fa84..f8072cc 100644 --- a/test/run_boot_test.tcl +++ b/test/run_boot_test.tcl @@ -12,5 +12,5 @@ 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 -mysim memory fwrite 0x30000000 0x300000 skiboot-boot_test.dump +mysim memory fwrite 0x30000000 0x300000 $env(SKIBOOT_MEM_DUMP) exit |