blob: 82e9a77bd5dc72fbcd9a4fa2a3c5cacce2b11ef9 [file] [log] [blame]
Brad Bishop1a4b7ee2018-12-16 17:11:34 -08001#!/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#
Brad Bishopc342db32019-05-15 21:57:59 -04006# SPDX-License-Identifier: GPL-2.0-only
Brad Bishop1a4b7ee2018-12-16 17:11:34 -08007#
8# Todo
9# Add testtools/subunit import test
10# Add python3-git test
11# Add pigz test
12# vnc tests/checkvnc?
13# test sendmail works (for QA email notification)
14# test error report submission works
15# test buildistory git repo works?
16#
17
Brad Bishop19323692019-04-05 15:28:33 -040018if [ ! -x $HOME/yocto-autobuilder-helper/scripts/checkvnc ]; then
19 echo "$HOME/yocto-autobuilder-helper should be created."
20 exit 1
21fi
22$HOME/yocto-autobuilder-helper/scripts/checkvnc
23
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080024. ./oe-init-build-env > /dev/null
25if [ "$?" != "0" ]; then
26 exit 1
27fi
28git config --global user.name > /dev/null
29if [ "$?" != "0" ]; then
30 echo "Please set git config --global user.name"
31 exit 1
32fi
33git config --global user.email > /dev/null
34if [ "$?" != "0" ]; then
35 echo "Please set git config --global user.email"
36 exit 1
37fi
Andrew Geisslereff27472021-10-29 15:35:00 -050038python3 -c "import jinja2"
39if [ "$?" != "0" ]; then
40 echo "Please ensure jinja2 is available"
41 exit 1
42fi
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080043bitbake -p
44if [ "$?" != "0" ]; then
45 echo "Bitbake parsing failed"
46 exit 1
47fi
48
49WATCHES=$(PATH="/sbin:/usr/sbin:$PATH" sysctl fs.inotify.max_user_watches -n)
50if (( $WATCHES < 65000 )); then
51 echo 'Need to increase watches (echo fs.inotify.max_user_watches=65536 | sudo tee -a /etc/sysctl.conf'
52 exit 1
53fi
54mkdir -p tmp/deploy/images/qemux86-64
55pushd tmp/deploy/images/qemux86-64
56if [ ! -e core-image-minimal-qemux86-64.ext4 ]; then
57 wget http://downloads.yoctoproject.org/releases/yocto/yocto-2.5.1/machines/qemu/qemux86-64/core-image-minimal-qemux86-64.ext4
58fi
59if [ ! -e core-image-minimal-qemux86-64.qemuboot.conf ]; then
60 wget http://downloads.yoctoproject.org/releases/yocto/yocto-2.5.1/machines/qemu/qemux86-64/core-image-minimal-qemux86-64.qemuboot.conf
61fi
62if [ ! -e bzImage-qemux86-64.bin ]; then
63 wget http://downloads.yoctoproject.org/releases/yocto/yocto-2.5.1/machines/qemu/qemux86-64/bzImage-qemux86-64.bin
64fi
65popd
66bitbake qemu-helper-native
Brad Bishop19323692019-04-05 15:28:33 -040067DISPLAY=:1 runqemu serialstdio qemux86-64
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080068if [ "$?" != "0" ]; then
69 echo "Unable to use runqemu"
70 exit 1
71fi
Brad Bishop19323692019-04-05 15:28:33 -040072DISPLAY=:1 runqemu serialstdio qemux86-64 kvm
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080073if [ "$?" != "0" ]; then
74 echo "Unable to use runqemu with kvm"
75 exit 1
76fi