]>
Commit | Line | Data |
---|---|---|
c9dd81fe RP |
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 | # | |
f8c9c511 | 6 | # SPDX-License-Identifier: GPL-2.0-only |
c9dd81fe RP |
7 | # |
8 | # Todo | |
9 | # Add testtools/subunit import test | |
10 | # Add python3-git test | |
c6bc6d87 RP |
11 | # Add pigz test |
12 | # vnc tests/checkvnc? | |
ab7b7e22 RP |
13 | # test sendmail works (for QA email notification) |
14 | # test error report submission works | |
15 | # test buildistory git repo works? | |
c9dd81fe RP |
16 | # |
17 | ||
5fb26ff0 MH |
18 | if [ ! -x $HOME/yocto-autobuilder-helper/scripts/checkvnc ]; then |
19 | echo "$HOME/yocto-autobuilder-helper should be created." | |
20 | exit 1 | |
21 | fi | |
22 | $HOME/yocto-autobuilder-helper/scripts/checkvnc | |
23 | ||
c9dd81fe RP |
24 | . ./oe-init-build-env > /dev/null |
25 | if [ "$?" != "0" ]; then | |
26 | exit 1 | |
27 | fi | |
28 | git config --global user.name > /dev/null | |
29 | if [ "$?" != "0" ]; then | |
30 | echo "Please set git config --global user.name" | |
31 | exit 1 | |
32 | fi | |
33 | git config --global user.email > /dev/null | |
34 | if [ "$?" != "0" ]; then | |
35 | echo "Please set git config --global user.email" | |
36 | exit 1 | |
37 | fi | |
38 | bitbake -p | |
39 | if [ "$?" != "0" ]; then | |
40 | echo "Bitbake parsing failed" | |
41 | exit 1 | |
42 | fi | |
2f86c3f1 MH |
43 | |
44 | WATCHES=$(PATH="/sbin:/usr/sbin:$PATH" sysctl fs.inotify.max_user_watches -n) | |
45 | if (( $WATCHES < 65000 )); then | |
46 | echo 'Need to increase watches (echo fs.inotify.max_user_watches=65536 | sudo tee -a /etc/sysctl.conf' | |
47 | exit 1 | |
c9dd81fe RP |
48 | fi |
49 | mkdir -p tmp/deploy/images/qemux86-64 | |
50 | pushd tmp/deploy/images/qemux86-64 | |
51 | if [ ! -e core-image-minimal-qemux86-64.ext4 ]; then | |
52 | wget http://downloads.yoctoproject.org/releases/yocto/yocto-2.5.1/machines/qemu/qemux86-64/core-image-minimal-qemux86-64.ext4 | |
53 | fi | |
54 | if [ ! -e core-image-minimal-qemux86-64.qemuboot.conf ]; then | |
55 | wget http://downloads.yoctoproject.org/releases/yocto/yocto-2.5.1/machines/qemu/qemux86-64/core-image-minimal-qemux86-64.qemuboot.conf | |
56 | fi | |
57 | if [ ! -e bzImage-qemux86-64.bin ]; then | |
58 | wget http://downloads.yoctoproject.org/releases/yocto/yocto-2.5.1/machines/qemu/qemux86-64/bzImage-qemux86-64.bin | |
59 | fi | |
60 | popd | |
61 | bitbake qemu-helper-native | |
5fb26ff0 | 62 | DISPLAY=:1 runqemu serialstdio qemux86-64 |
c9dd81fe RP |
63 | if [ "$?" != "0" ]; then |
64 | echo "Unable to use runqemu" | |
65 | exit 1 | |
66 | fi | |
5fb26ff0 | 67 | DISPLAY=:1 runqemu serialstdio qemux86-64 kvm |
c9dd81fe RP |
68 | if [ "$?" != "0" ]; then |
69 | echo "Unable to use runqemu with kvm" | |
70 | exit 1 | |
71 | fi |