summaryrefslogtreecommitdiffstats
path: root/scripts/autobuilder-worker-prereq-tests
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/autobuilder-worker-prereq-tests')
-rwxr-xr-xscripts/autobuilder-worker-prereq-tests93
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
20if [ ! -x $HOME/yocto-autobuilder-helper/scripts/checkvnc ]; then
21 echo "$HOME/yocto-autobuilder-helper should be created."
22 exit 1
23fi
24$HOME/yocto-autobuilder-helper/scripts/checkvnc
25
26. ./oe-init-build-env > /dev/null
27if [ "$?" != "0" ]; then
28 exit 1
29fi
30git config --global user.name > /dev/null
31if [ "$?" != "0" ]; then
32 echo "Please set git config --global user.name"
33 exit 1
34fi
35git config --global user.email > /dev/null
36if [ "$?" != "0" ]; then
37 echo "Please set git config --global user.email"
38 exit 1
39fi
40python3 -c "import jinja2"
41if [ "$?" != "0" ]; then
42 echo "Please ensure jinja2 is available"
43 exit 1
44fi
45bitbake -p
46if [ "$?" != "0" ]; then
47 echo "Bitbake parsing failed"
48 exit 1
49fi
50
51WATCHES=$(PATH="/sbin:/usr/sbin:$PATH" sysctl fs.inotify.max_user_watches -n)
52if (( $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
55fi
56OPEN_FILES=$(ulimit -n)
57if (( $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
62fi
63MAX_PROCESSES=$(ulimit -u)
64if (( $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
69fi
70
71mkdir -p tmp/deploy/images/qemux86-64
72pushd tmp/deploy/images/qemux86-64
73if [ ! -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
75fi
76if [ ! -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
78fi
79if [ ! -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
81fi
82popd
83bitbake qemu-helper-native
84DISPLAY=:1 runqemu serialstdio qemux86-64
85if [ "$?" != "0" ]; then
86 echo "Unable to use runqemu"
87 exit 1
88fi
89DISPLAY=:1 runqemu serialstdio qemux86-64 kvm
90if [ "$?" != "0" ]; then
91 echo "Unable to use runqemu with kvm"
92 exit 1
93fi