diff options
Diffstat (limited to 'scripts/autobuilder-worker-prereq-tests')
| -rwxr-xr-x | scripts/autobuilder-worker-prereq-tests | 93 |
1 files changed, 0 insertions, 93 deletions
diff --git a/scripts/autobuilder-worker-prereq-tests b/scripts/autobuilder-worker-prereq-tests deleted file mode 100755 index 54fd3c1004..0000000000 --- a/scripts/autobuilder-worker-prereq-tests +++ /dev/null | |||
| @@ -1,93 +0,0 @@ | |||
| 1 | #!/bin/bash | ||
| 2 | # | ||
| 3 | # Copyright OpenEmbedded Contributors | ||
| 4 | # | ||
| 5 | # Script which can be run on new autobuilder workers to check all needed configuration is present. | ||
| 6 | # Designed to be run in a repo where bitbake/oe-core are already present. | ||
| 7 | # | ||
| 8 | # SPDX-License-Identifier: GPL-2.0-only | ||
| 9 | # | ||
| 10 | # Todo | ||
| 11 | # Add testtools/subunit import test | ||
| 12 | # Add python3-git test | ||
| 13 | # Add pigz test | ||
| 14 | # vnc tests/checkvnc? | ||
| 15 | # test sendmail works (for QA email notification) | ||
| 16 | # test error report submission works | ||
| 17 | # test buildistory git repo works? | ||
| 18 | # | ||
| 19 | |||
| 20 | if [ ! -x $HOME/yocto-autobuilder-helper/scripts/checkvnc ]; then | ||
| 21 | echo "$HOME/yocto-autobuilder-helper should be created." | ||
| 22 | exit 1 | ||
| 23 | fi | ||
| 24 | $HOME/yocto-autobuilder-helper/scripts/checkvnc | ||
| 25 | |||
| 26 | . ./oe-init-build-env > /dev/null | ||
| 27 | if [ "$?" != "0" ]; then | ||
| 28 | exit 1 | ||
| 29 | fi | ||
| 30 | git config --global user.name > /dev/null | ||
| 31 | if [ "$?" != "0" ]; then | ||
| 32 | echo "Please set git config --global user.name" | ||
| 33 | exit 1 | ||
| 34 | fi | ||
| 35 | git config --global user.email > /dev/null | ||
| 36 | if [ "$?" != "0" ]; then | ||
| 37 | echo "Please set git config --global user.email" | ||
| 38 | exit 1 | ||
| 39 | fi | ||
| 40 | python3 -c "import jinja2" | ||
| 41 | if [ "$?" != "0" ]; then | ||
| 42 | echo "Please ensure jinja2 is available" | ||
| 43 | exit 1 | ||
| 44 | fi | ||
| 45 | bitbake -p | ||
| 46 | if [ "$?" != "0" ]; then | ||
| 47 | echo "Bitbake parsing failed" | ||
| 48 | exit 1 | ||
| 49 | fi | ||
| 50 | |||
| 51 | WATCHES=$(PATH="/sbin:/usr/sbin:$PATH" sysctl fs.inotify.max_user_watches -n) | ||
| 52 | if (( $WATCHES < 65000 )); then | ||
| 53 | echo 'Need to increase watches (echo fs.inotify.max_user_watches=65536 | sudo tee -a /etc/sysctl.conf' | ||
| 54 | exit 1 | ||
| 55 | fi | ||
| 56 | OPEN_FILES=$(ulimit -n) | ||
| 57 | if (( $OPEN_FILES < 65535 )); then | ||
| 58 | echo 'Increase maximum open files in /etc/security/limits.conf' | ||
| 59 | echo '* soft nofile 131072' | ||
| 60 | echo '* hard nofile 131072' | ||
| 61 | exit 1 | ||
| 62 | fi | ||
| 63 | MAX_PROCESSES=$(ulimit -u) | ||
| 64 | if (( $MAX_PROCESSES < 514542 )); then | ||
| 65 | echo 'Increase maximum user processes in /etc/security/limits.conf' | ||
| 66 | echo '* hard nproc 515294' | ||
| 67 | echo '* soft nproc 514543' | ||
| 68 | exit 1 | ||
| 69 | fi | ||
| 70 | |||
| 71 | mkdir -p tmp/deploy/images/qemux86-64 | ||
| 72 | pushd tmp/deploy/images/qemux86-64 | ||
| 73 | if [ ! -e core-image-minimal-qemux86-64.ext4 ]; then | ||
| 74 | wget http://downloads.yoctoproject.org/releases/yocto/yocto-4.0/machines/qemu/qemux86-64/core-image-minimal-qemux86-64.ext4 | ||
| 75 | fi | ||
| 76 | if [ ! -e core-image-minimal-qemux86-64.qemuboot.conf ]; then | ||
| 77 | wget http://downloads.yoctoproject.org/releases/yocto/yocto-4.0/machines/qemu/qemux86-64/core-image-minimal-qemux86-64.qemuboot.conf | ||
| 78 | fi | ||
| 79 | if [ ! -e bzImage-qemux86-64.bin ]; then | ||
| 80 | wget http://downloads.yoctoproject.org/releases/yocto/yocto-4.0/machines/qemu/qemux86-64/bzImage-qemux86-64.bin | ||
| 81 | fi | ||
| 82 | popd | ||
| 83 | bitbake qemu-helper-native | ||
| 84 | DISPLAY=:1 runqemu serialstdio qemux86-64 | ||
| 85 | if [ "$?" != "0" ]; then | ||
| 86 | echo "Unable to use runqemu" | ||
| 87 | exit 1 | ||
| 88 | fi | ||
| 89 | DISPLAY=:1 runqemu serialstdio qemux86-64 kvm | ||
| 90 | if [ "$?" != "0" ]; then | ||
| 91 | echo "Unable to use runqemu with kvm" | ||
| 92 | exit 1 | ||
| 93 | fi | ||
