From 9f7b30c62dbf600e1b013fc564fe87a8279bd76b Mon Sep 17 00:00:00 2001 From: Jan-Simon Möller Date: Tue, 8 Nov 2016 23:57:58 +0100 Subject: Fix include files and add test script. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I8d4c7f1199b19aba883b4d6ff92438a22cb1daa5 Signed-off-by: Jan-Simon Möller --- jjb/common/include-agl-auto-conf.sh | 6 +- jjb/common/include-agl-bitbake-image.sh | 2 +- jjb/common/include-agl-bitbake-sdk.sh | 2 +- jjb/common/include-agl-header.sh | 4 +- jjb/common/include-agl-local-conf-archiver.sh | 3 +- jjb/common/include-agl-local-conf-isafw.sh | 2 +- jjb/common/include-agl-local-conf-vmdk.sh | 2 +- jjb/common/include-agl-repo.sh | 2 +- jjb/common/include-agl-select.sh | 2 +- jjb/common/include-agl-source-aglsetup.sh | 2 +- jjb/common/include-agl-test-nbd-short.sh | 105 ++++++++++++++++++++++++-- 11 files changed, 114 insertions(+), 18 deletions(-) (limited to 'jjb') diff --git a/jjb/common/include-agl-auto-conf.sh b/jjb/common/include-agl-auto-conf.sh index 22fce7d2..77e90edc 100644 --- a/jjb/common/include-agl-auto-conf.sh +++ b/jjb/common/include-agl-auto-conf.sh @@ -2,11 +2,11 @@ # License GPLv2 ################################################################################ -## Main +## auto.conf inclusion of mirrors ################################################################################ #limit parallel number of bitbake jobs and parallel jobs in make -cat << EOF > conf/auto.conf +cat << EOF >> conf/auto.conf PREMIRRORS = "\ git://.*/.* ${DLHOST}/AGL/mirror/ \n \ ftp://.*/.* ${DLHOST}/AGL/mirror/ \n \ @@ -22,4 +22,4 @@ file://.* ${DLHOST}/sstate-mirror/\${MACHINE}/PATH \n \ SSTATE_DIR = "\${TOPDIR}/sstate-cache/\${MACHINE}/" EOF -cat conf/auto.conf +#cat conf/auto.conf diff --git a/jjb/common/include-agl-bitbake-image.sh b/jjb/common/include-agl-bitbake-image.sh index 180cef78..2196d8a7 100644 --- a/jjb/common/include-agl-bitbake-image.sh +++ b/jjb/common/include-agl-bitbake-image.sh @@ -2,7 +2,7 @@ # License GPLv2 ################################################################################ -## Main +## bitbake the image ################################################################################ # finally, build the agl-demo-platform (we retry to catch the tar-native bug) diff --git a/jjb/common/include-agl-bitbake-sdk.sh b/jjb/common/include-agl-bitbake-sdk.sh index 4627932b..ee17ef08 100644 --- a/jjb/common/include-agl-bitbake-sdk.sh +++ b/jjb/common/include-agl-bitbake-sdk.sh @@ -2,7 +2,7 @@ # License GPLv2 ################################################################################ -## Main +## bitbake the sdk ################################################################################ # finally, build the agl-demo-platform (we retry to catch the tar-native bug) diff --git a/jjb/common/include-agl-header.sh b/jjb/common/include-agl-header.sh index 62dd6445..4a27327c 100644 --- a/jjb/common/include-agl-header.sh +++ b/jjb/common/include-agl-header.sh @@ -6,7 +6,7 @@ set -e ################################################################################ -## HEADER +## Header ################################################################################ @@ -33,7 +33,7 @@ export TARGETFEATURES="agl-demo ${TARGETFEATURESnogfx}" export TARGETQA="" export TARGETIMAGE="agl-demo-platform\${TARGETQA}" -export TARGETIMAGEnogfx="agl-image-ivi\${TARGETQA}" +export TARGETIMAGEnogfx="core-image-minimal" export TARGETSDK="populate_sdk" diff --git a/jjb/common/include-agl-local-conf-archiver.sh b/jjb/common/include-agl-local-conf-archiver.sh index f9478ee0..9a0adba7 100644 --- a/jjb/common/include-agl-local-conf-archiver.sh +++ b/jjb/common/include-agl-local-conf-archiver.sh @@ -2,9 +2,10 @@ # License GPLv2 ################################################################################ -## Main +## Add archiver ################################################################################ # archive sources within tmp/deploy/ +echo '' >> conf/local.conf echo 'INHERIT += "archiver"' >> conf/local.conf echo 'ARCHIVER_MODE[src] = "original"' >> conf/local.conf diff --git a/jjb/common/include-agl-local-conf-isafw.sh b/jjb/common/include-agl-local-conf-isafw.sh index dea4f2fc..5da94cd6 100644 --- a/jjb/common/include-agl-local-conf-isafw.sh +++ b/jjb/common/include-agl-local-conf-isafw.sh @@ -2,7 +2,7 @@ # License GPLv2 ################################################################################ -## Main +## Add isafw report and enable ################################################################################ # meta-security-isafw diff --git a/jjb/common/include-agl-local-conf-vmdk.sh b/jjb/common/include-agl-local-conf-vmdk.sh index bd582e97..30378a93 100644 --- a/jjb/common/include-agl-local-conf-vmdk.sh +++ b/jjb/common/include-agl-local-conf-vmdk.sh @@ -2,7 +2,7 @@ # License GPLv2 ################################################################################ -## Main +## Build vmdk file for qemux86* ################################################################################ if test x"qemux86" == x"$MACHINE" -o x"qemux86-64" == x"$MACHINE" ; then diff --git a/jjb/common/include-agl-repo.sh b/jjb/common/include-agl-repo.sh index f95e3206..6b21b80c 100644 --- a/jjb/common/include-agl-repo.sh +++ b/jjb/common/include-agl-repo.sh @@ -2,7 +2,7 @@ # License: GPLv2 ################################################################################ -## Main +## Repo init/sync ################################################################################ # create shared downloads and sstate-cache directory diff --git a/jjb/common/include-agl-select.sh b/jjb/common/include-agl-select.sh index b46c4ea4..23e90def 100644 --- a/jjb/common/include-agl-select.sh +++ b/jjb/common/include-agl-select.sh @@ -2,7 +2,7 @@ # License GPLv2 ################################################################################ -## Main +## Select what to build / inject the rev from the gerrit env variable ################################################################################ HANDLED=false diff --git a/jjb/common/include-agl-source-aglsetup.sh b/jjb/common/include-agl-source-aglsetup.sh index f66d83fb..bb76f107 100644 --- a/jjb/common/include-agl-source-aglsetup.sh +++ b/jjb/common/include-agl-source-aglsetup.sh @@ -2,7 +2,7 @@ # License GPLv2 ################################################################################ -## Main +## Source the aglsetup script ################################################################################ # source the env diff --git a/jjb/common/include-agl-test-nbd-short.sh b/jjb/common/include-agl-test-nbd-short.sh index dcaa65cb..cef334b6 100644 --- a/jjb/common/include-agl-test-nbd-short.sh +++ b/jjb/common/include-agl-test-nbd-short.sh @@ -2,19 +2,22 @@ # License GPLv2 ################################################################################ -## Main +## Run SHORT CI test ################################################################################ # test currently only for porter, rest WIP TESTRUN=false -echo "## $MACHINE ##" +echo "## ${MACHINE} ##" -case $MACHINE in +case ${MACHINE} in porter-nogfx) + TESTRUN=true + TARGETMACHINE="porter" ;; porter) TESTRUN=true + TARGETMACHINE="porter" ;; *) TESTRUN=false @@ -22,8 +25,100 @@ case $MACHINE in esac -if $TESTRUN; then +if ${TESTRUN}; then + +echo "#################################" +echo "TEST ENABLED for ${TARGETMACHINE}" +echo "#################################" + +pushd tmp/deploy/images/${TARGETMACHINE}/ + +ROOTFSTOBOOT="none" +KERNELIMAGE="none" +NETBOOTIMAGE="none" +ls + +function checkrootfs(){ + if test -f ./"$1" ; then + eval ROOTFSTOBOOT="$1" + fi +} + + +checkrootfs core-image-minimal-${TARGETMACHINE}.ext4 +checkrootfs agl-image-ivi-${TARGETMACHINE}.ext4 +checkrootfs agl-image-ivi-qa-${TARGETMACHINE}.ext4 +checkrootfs agl-demo-platform-qa-${TARGETMACHINE}.ext4 + +if test x"none" = x"${ROOTFSTOBOOT}"; then + echo "No rootfs to boot. Aborting" + exit 1 +fi + + + +if test x"porter" = x"${TARGETMACHINE}"; then +KERNELIMAGE="zImage+dtb" +NETBOOTIMAGE="initramfs-netboot-image-porter.ext4.gz.u-boot" +fi + +if test x"none" = x"${KERNELIMAGE}"; then + echo "No kernelimage to boot. Aborting" + exit 1 +fi +if test x"none" = x"${NETBOOTIMAGE}"; then + echo "No netbootimage to boot. Aborting" + exit 1 +fi + +function maketmpfile() { + DFILE=`mktemp -u -p ./ | sed -e "s#./##g"` + eval cp \$$1 $DFILE + export $1="$DFILE" +} + +maketmpfile ROOTFSTOBOOT +maketmpfile KERNELIMAGE +maketmpfile NETBOOTIMAGE + +set | grep ROOTFSTOBOOT +set | grep KERNELIMAGE +set | grep NETBOOTIMAGE + +bash /opt/AGL/lava-agl/upload4lava.sh ${ROOTFSTOBOOT} +bash /opt/AGL/lava-agl/upload4lava.sh ${KERNELIMAGE} +bash /opt/AGL/lava-agl/upload4lava.sh ${NETBOOTIMAGE} + +cat < porterboot_nbd.yaml +actions: + - command: deploy_linaro_kernel + parameters: + kernel: 'http://localhost/porter/upload/\${KERNELIMAGE}' + nbdroot: 'http://localhost/porter/upload/\${ROOTFSTOBOOT}' + ramdisk: 'http://localhost/porter/upload/\${NETBOOTIMAGE}' + login_prompt: 'porter login:' + username: 'root' + - command: boot_linaro_image + parameters: + test_image_prompt: 'root@porter:~#' + - command: lava_command_run + parameters: + commands: + - "echo '#### START TEST ####'" + - "echo '#### END TEST ####'" + timeout: 3600 +device_type: 'renesas-porter' +logging_level: INFO +job_name: '${JOB_NAME}' +timeout: 1800 + +EOF + +logfile=$(mktemp) +/opt/AGL/lava-boot/lava-boot porter.automotivelinux.org -j ./porterboot_nbd.yaml -v ROOTFSTOBOOT="${ROOTFSTOBOOT}" -v KERNELIMAGE=${KERNELIMAGE} -v NETBOOTIMAGE=${NETBOOTIMAGE} 2>&1 | tee $logfile + + +popd -echo "TBD" fi \ No newline at end of file -- cgit 1.2.3-korg