blob: bb46c6913539cb8e70427621c4d1bcced1cc6443 [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#
6
7#
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
18. ./oe-init-build-env > /dev/null
19if [ "$?" != "0" ]; then
20 exit 1
21fi
22git config --global user.name > /dev/null
23if [ "$?" != "0" ]; then
24 echo "Please set git config --global user.name"
25 exit 1
26fi
27git config --global user.email > /dev/null
28if [ "$?" != "0" ]; then
29 echo "Please set git config --global user.email"
30 exit 1
31fi
32bitbake -p
33if [ "$?" != "0" ]; then
34 echo "Bitbake parsing failed"
35 exit 1
36fi
37
38WATCHES=$(PATH="/sbin:/usr/sbin:$PATH" sysctl fs.inotify.max_user_watches -n)
39if (( $WATCHES < 65000 )); then
40 echo 'Need to increase watches (echo fs.inotify.max_user_watches=65536 | sudo tee -a /etc/sysctl.conf'
41 exit 1
42fi
43mkdir -p tmp/deploy/images/qemux86-64
44pushd tmp/deploy/images/qemux86-64
45if [ ! -e core-image-minimal-qemux86-64.ext4 ]; then
46 wget http://downloads.yoctoproject.org/releases/yocto/yocto-2.5.1/machines/qemu/qemux86-64/core-image-minimal-qemux86-64.ext4
47fi
48if [ ! -e core-image-minimal-qemux86-64.qemuboot.conf ]; then
49 wget http://downloads.yoctoproject.org/releases/yocto/yocto-2.5.1/machines/qemu/qemux86-64/core-image-minimal-qemux86-64.qemuboot.conf
50fi
51if [ ! -e bzImage-qemux86-64.bin ]; then
52 wget http://downloads.yoctoproject.org/releases/yocto/yocto-2.5.1/machines/qemu/qemux86-64/bzImage-qemux86-64.bin
53fi
54popd
55bitbake qemu-helper-native
56runqemu qemux86-64
57if [ "$?" != "0" ]; then
58 echo "Unable to use runqemu"
59 exit 1
60fi
61runqemu qemux86-64 kvm
62if [ "$?" != "0" ]; then
63 echo "Unable to use runqemu with kvm"
64 exit 1
65fi