aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2018-08-23 17:32:17 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-08-24 07:53:09 +0100
commitc9dd81fe9c88d8d9881686e60c17e6fab4b230f1 (patch)
tree0c7ed07babcecf51d09b454d9ec69980848a2857
parent711f867b1d036aba04e839e955e0fa9d81d3c794 (diff)
downloadopenembedded-core-contrib-c9dd81fe9c88d8d9881686e60c17e6fab4b230f1.tar.gz
openembedded-core-contrib-c9dd81fe9c88d8d9881686e60c17e6fab4b230f1.tar.bz2
openembedded-core-contrib-c9dd81fe9c88d8d9881686e60c17e6fab4b230f1.zip
scripts: Add autobuilder worker test script
Add a script which can be run on new autobuilder workers to check all needed configuration is present. Designed to be run in a repo where bitbake/oe-core are already present. This means when we add new autobuilder workers, we can quickly test whether all the needed funcationality to support the standard yocto project autobuilder (ie. the standard OE-Core tests) are present. It uses images prebuilt in a previous release to cut build/testing time. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rwxr-xr-xscripts/autobuilder-worker-prereq-tests59
1 files changed, 59 insertions, 0 deletions
diff --git a/scripts/autobuilder-worker-prereq-tests b/scripts/autobuilder-worker-prereq-tests
new file mode 100755
index 0000000000..b5742d5b28
--- /dev/null
+++ b/scripts/autobuilder-worker-prereq-tests
@@ -0,0 +1,59 @@
+#!/bin/bash
+#
+# Script which can be run on new autobuilder workers to check all needed configuration is present.
+# Designed to be run in a repo where bitbake/oe-core are already present.
+#
+
+#
+# Todo
+# Add testtools/subunit import test
+# Add python3-git test
+#
+
+. ./oe-init-build-env > /dev/null
+if [ "$?" != "0" ]; then
+ exit 1
+fi
+git config --global user.name > /dev/null
+if [ "$?" != "0" ]; then
+ echo "Please set git config --global user.name"
+ exit 1
+fi
+git config --global user.email > /dev/null
+if [ "$?" != "0" ]; then
+ echo "Please set git config --global user.email"
+ exit 1
+fi
+bitbake -p
+if [ "$?" != "0" ]; then
+ echo "Bitbake parsing failed"
+ exit 1
+fi
+WATCHES=`sysctl fs.inotify.max_user_watches -n`
+if (( $WATCHES < 100000 )); then
+ echo 'Need to increase watches (echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf'
+ #exit 1
+fi
+mkdir -p tmp/deploy/images/qemux86-64
+pushd tmp/deploy/images/qemux86-64
+if [ ! -e core-image-minimal-qemux86-64.ext4 ]; then
+ wget http://downloads.yoctoproject.org/releases/yocto/yocto-2.5.1/machines/qemu/qemux86-64/core-image-minimal-qemux86-64.ext4
+fi
+if [ ! -e core-image-minimal-qemux86-64.qemuboot.conf ]; then
+ wget http://downloads.yoctoproject.org/releases/yocto/yocto-2.5.1/machines/qemu/qemux86-64/core-image-minimal-qemux86-64.qemuboot.conf
+fi
+if [ ! -e bzImage-qemux86-64.bin ]; then
+ wget http://downloads.yoctoproject.org/releases/yocto/yocto-2.5.1/machines/qemu/qemux86-64/bzImage-qemux86-64.bin
+fi
+popd
+bitbake qemu-helper-native
+runqemu qemux86-64
+if [ "$?" != "0" ]; then
+ echo "Unable to use runqemu"
+ exit 1
+fi
+runqemu qemux86-64 kvm
+if [ "$?" != "0" ]; then
+ echo "Unable to use runqemu with kvm"
+ exit 1
+fi