Fix include files and add test script. 07/7107/1
authorJan-Simon Möller <jsmoeller@linuxfoundation.org>
Tue, 8 Nov 2016 22:57:58 +0000 (23:57 +0100)
committerJan-Simon Möller <jsmoeller@linuxfoundation.org>
Tue, 8 Nov 2016 22:57:58 +0000 (23:57 +0100)
Change-Id: I8d4c7f1199b19aba883b4d6ff92438a22cb1daa5
Signed-off-by: Jan-Simon Möller <jsmoeller@linuxfoundation.org>
jjb/common/include-agl-auto-conf.sh
jjb/common/include-agl-bitbake-image.sh
jjb/common/include-agl-bitbake-sdk.sh
jjb/common/include-agl-header.sh
jjb/common/include-agl-local-conf-archiver.sh
jjb/common/include-agl-local-conf-isafw.sh
jjb/common/include-agl-local-conf-vmdk.sh
jjb/common/include-agl-repo.sh
jjb/common/include-agl-select.sh
jjb/common/include-agl-source-aglsetup.sh
jjb/common/include-agl-test-nbd-short.sh

index 22fce7d..77e90ed 100644 (file)
@@ -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
index 180cef7..2196d8a 100644 (file)
@@ -2,7 +2,7 @@
 # License GPLv2
 
 ################################################################################
-## Main
+## bitbake the image
 ################################################################################
 
 # finally, build the agl-demo-platform (we retry to catch the tar-native bug)
index 4627932..ee17ef0 100644 (file)
@@ -2,7 +2,7 @@
 # License GPLv2
 
 ################################################################################
-## Main
+## bitbake the sdk
 ################################################################################
 
 # finally, build the agl-demo-platform (we retry to catch the tar-native bug)
index 62dd644..4a27327 100644 (file)
@@ -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"
 
index f9478ee..9a0adba 100644 (file)
@@ -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
index dea4f2f..5da94cd 100644 (file)
@@ -2,7 +2,7 @@
 # License GPLv2
 
 ################################################################################
-## Main
+## Add isafw report and enable
 ################################################################################
 
 # meta-security-isafw
index bd582e9..30378a9 100644 (file)
@@ -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
index f95e320..6b21b80 100644 (file)
@@ -2,7 +2,7 @@
 # License: GPLv2
 
 ################################################################################
-## Main
+## Repo init/sync
 ################################################################################
 
 # create shared downloads and sstate-cache directory
index b46c4ea..23e90de 100644 (file)
@@ -2,7 +2,7 @@
 # License GPLv2
 
 ################################################################################
-## Main
+## Select what to build / inject the rev from the gerrit env variable
 ################################################################################
 
 HANDLED=false
index f66d83f..bb76f10 100644 (file)
@@ -2,7 +2,7 @@
 # License GPLv2
 
 ################################################################################
-## Main
+## Source the aglsetup script
 ################################################################################
 
 # source the env
index dcaa65c..cef334b 100644 (file)
@@ -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 <<EOF > 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