aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--opal-ci/Makefile86
-rw-r--r--opal-ci/README29
-rw-r--r--test/Makefile.check14
-rwxr-xr-xtest/make-boot-coverage-report.sh31
-rwxr-xr-xtest/run_boot_test.sh11
-rw-r--r--test/run_boot_test.tcl2
6 files changed, 160 insertions, 13 deletions
diff --git a/opal-ci/Makefile b/opal-ci/Makefile
new file mode 100644
index 0000000..2f3b6f3
--- /dev/null
+++ b/opal-ci/Makefile
@@ -0,0 +1,86 @@
+
+OP_BUILD_GIT?=git@github.com:open-power/op-build.git
+BUILDROOT_GIT?=https://github.com/open-power/buildroot
+DL_CACHE?=~/op-build/dl
+SCRATCH?=/scratch/stewart/op-build/
+
+all: op-build-images
+
+op-build-images: build-op-build-v1.0 build-op-build-v1.1 build-op-build-v1.2 build-op-build-v1.2.1
+
+op-build:
+ git clone ${OP_BUILD_GIT} op-build
+ (cd op-build && git submodule init)
+ (cd op-build && git config submodule.buildroot.url ${BUILDROOT_GIT})
+ (cd op-build && git submodule update --reference ${OP_BUILD_GIT})
+
+op-build-v1.0: op-build
+ git clone -s op-build op-build-v1.0
+ (cd op-build && git submodule init)
+ (cd op-build-v1.0 && git config submodule.buildroot.url ${BUILDROOT_GIT})
+ (cd op-build-v1.0 && git checkout v1.0)
+ (cd op-build-v1.0 && git submodule update --recursive)
+ (cd op-build-v1.0 && cp -rl ${DL_CACHE}/* dl/)
+ rm -rf ${SCRATCH}/op-build-v1.0 && mkdir ${SCRATCH}/op-build-v1.0
+ (rm -rf op-build-v1.0/output && ln -s ${SCRATCH}/op-build-v1.0 op-build-v1.0/output)
+
+op-build-v1.1: op-build
+ git clone -s op-build op-build-v1.1
+ (cd op-build && git submodule init)
+ (cd op-build-v1.1 && git config submodule.buildroot.url ${BUILDROOT_GIT})
+ (cd op-build-v1.1 && git checkout v1.1)
+ (cd op-build-v1.1 && git submodule update --recursive)
+ (cd op-build-v1.1 && cp -rl ${DL_CACHE}/* dl/)
+ rm -rf ${SCRATCH}/op-build-v1.1 && mkdir ${SCRATCH}/op-build-v1.1
+ (rm -rf op-build-v1.1/output && ln -s ${SCRATCH}/op-build-v1.1 op-build-v1.1/output)
+
+op-build-v1.2: op-build
+ git clone -s op-build op-build-v1.2
+ (cd op-build && git submodule init)
+ (cd op-build-v1.2 && git config submodule.buildroot.url ${BUILDROOT_GIT})
+ (cd op-build-v1.2 && git checkout v1.2)
+ (cd op-build-v1.2 && git submodule update --recursive)
+ (cd op-build-v1.2 && cp -rl ${DL_CACHE}/* dl/)
+ rm -rf ${SCRATCH}/op-build-v1.2 && mkdir ${SCRATCH}/op-build-v1.2
+ (rm -rf op-build-v1.2/output && ln -s ${SCRATCH}/op-build-v1.2 op-build-v1.2/output)
+
+op-build-v1.2.1: op-build
+ git clone -s op-build op-build-v1.2.1
+ (cd op-build && git submodule init)
+ (cd op-build-v1.2.1 && git config submodule.buildroot.url ${BUILDROOT_GIT})
+ (cd op-build-v1.2.1 && git checkout v1.2.1)
+ (cd op-build-v1.2.1 && git submodule update --recursive)
+ (cd op-build-v1.2.1 && cp -rl ${DL_CACHE}/* dl/)
+ rm -rf ${SCRATCH}/op-build-v1.2.1 && mkdir ${SCRATCH}/op-build-v1.2.1
+ (rm -rf op-build-v1.2.1/output && ln -s ${SCRATCH}/op-build-v1.2.1 op-build-v1.2.1/output)
+
+build-op-build-v1.0: op-build-v1.0
+ cd op-build-v1.0 && ../run-op-build-mambo.sh
+
+build-op-build-v1.1: op-build-v1.1
+ cd op-build-v1.1 && ../run-op-build-mambo.sh
+
+build-op-build-v1.2: op-build-v1.2
+ cd op-build-v1.2 && ../run-op-build-mambo.sh
+
+build-op-build-v1.2.1: op-build-v1.2.1
+ cd op-build-v1.2.1 && ../run-op-build-mambo.sh
+
+images/op-build-v1.0: images-dir
+ cp -r op-build-v1.0/output/images images/op-build-v1.0
+
+images/op-build-v1.1: images-dir
+ cp -r op-build-v1.1/output/images images/op-build-v1.1
+
+images/op-build-v1.2: images-dir
+ cp -r op-build-v1.2/output/images images/op-build-v1.2
+
+images/op-build-v1.2.1: images-dir
+ cp -r op-build-v1.2.1/output/images images/op-build-v1.2.1
+
+images-dir:
+ mkdir images;
+
+.PHONY: images
+
+images: images/op-build-v1.0 images/op-build-v1.1 images/op-build-v1.2 images/op-build-v1.2.1
diff --git a/opal-ci/README b/opal-ci/README
new file mode 100644
index 0000000..5e53686
--- /dev/null
+++ b/opal-ci/README
@@ -0,0 +1,29 @@
+OPAL-CI
+-------
+
+Magic scripts for doing CI regression testing.
+
+Currently the makefile targets building op-build firmware (targeted at Mambo
+simulator) for all current op-build releases.
+
+Since skiboot maintains compatibility, these binaries should *ALWAYS* boot
+and work.
+
+The provided makefile to recreate the various zImage.epapr images should be
+a good starting point.
+
+I run it like this:
+cd opal-ci
+export BUILDROOT_GIT=~/op-build/.git/modules/buildroot/
+export OP_BUILD_GIT=~/op-build/
+export DL_CACHE=~/op-build/dl
+export SCRATCH=/scratch/stewart/op-build/
+make -j2 images
+
+DL_CACHE points to an existing op-build tree, so we don't have to download
+all the source tarballs again
+
+SCRATCH is where all compilation will happen, must have >20GB free space
+
+BUILDROOT_GIT and OP_BUILD_GIT exist to prevent you having to clone from
+github. \ No newline at end of file
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