summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2018-08-23 16:32:17 (GMT)
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-08-24 06:53:14 (GMT)
commit317bf10d4d9d71042e0f9e778753f8287e3fb787 (patch)
tree2b16eafd35a06f702d40c9378e93759570dcf535 /scripts
parentbd374216048581bcb3ea54d69998342525cf2da5 (diff)
downloadpoky-317bf10d4d9d71042e0f9e778753f8287e3fb787.tar.gz
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. (From OE-Core rev: c9dd81fe9c88d8d9881686e60c17e6fab4b230f1) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts')
-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 0000000..b5742d5
--- /dev/null
+++ b/scripts/autobuilder-worker-prereq-tests
@@ -0,0 +1,59 @@
1#!/bin/bash
2#
3# Script which can be run on new autobuilder workers to check all needed configuration is present.
4# Designed to be run in a repo where bitbake/oe-core are already present.
5#
6
7#
8# Todo
9# Add testtools/subunit import test
10# Add python3-git test
11#
12
13. ./oe-init-build-env > /dev/null
14if [ "$?" != "0" ]; then
15 exit 1
16fi
17git config --global user.name > /dev/null
18if [ "$?" != "0" ]; then
19 echo "Please set git config --global user.name"
20 exit 1
21fi
22git config --global user.email > /dev/null
23if [ "$?" != "0" ]; then
24 echo "Please set git config --global user.email"
25 exit 1
26fi
27bitbake -p
28if [ "$?" != "0" ]; then
29 echo "Bitbake parsing failed"
30 exit 1
31fi
32WATCHES=`sysctl fs.inotify.max_user_watches -n`
33if (( $WATCHES < 100000 )); then
34 echo 'Need to increase watches (echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf'
35 #exit 1
36fi
37mkdir -p tmp/deploy/images/qemux86-64
38pushd tmp/deploy/images/qemux86-64
39if [ ! -e core-image-minimal-qemux86-64.ext4 ]; then
40 wget http://downloads.yoctoproject.org/releases/yocto/yocto-2.5.1/machines/qemu/qemux86-64/core-image-minimal-qemux86-64.ext4
41fi
42if [ ! -e core-image-minimal-qemux86-64.qemuboot.conf ]; then
43 wget http://downloads.yoctoproject.org/releases/yocto/yocto-2.5.1/machines/qemu/qemux86-64/core-image-minimal-qemux86-64.qemuboot.conf
44fi
45if [ ! -e bzImage-qemux86-64.bin ]; then
46 wget http://downloads.yoctoproject.org/releases/yocto/yocto-2.5.1/machines/qemu/qemux86-64/bzImage-qemux86-64.bin
47fi
48popd
49bitbake qemu-helper-native
50runqemu qemux86-64
51if [ "$?" != "0" ]; then
52 echo "Unable to use runqemu"
53 exit 1
54fi
55runqemu qemux86-64 kvm
56if [ "$?" != "0" ]; then
57 echo "Unable to use runqemu with kvm"
58 exit 1
59fi