diff options
Diffstat (limited to 'scripts')
| -rwxr-xr-x | scripts/autobuilder-worker-prereq-tests | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/scripts/autobuilder-worker-prereq-tests b/scripts/autobuilder-worker-prereq-tests new file mode 100755 index 0000000000..b5742d5b28 --- /dev/null +++ b/scripts/autobuilder-worker-prereq-tests | |||
| @@ -0,0 +1,59 @@ | |||
| 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 | # | ||
| 6 | |||
| 7 | # | ||
| 8 | # Todo | ||
| 9 | # Add testtools/subunit import test | ||
| 10 | # Add python3-git test | ||
| 11 | # | ||
| 12 | |||
| 13 | . ./oe-init-build-env > /dev/null | ||
| 14 | if [ "$?" != "0" ]; then | ||
| 15 | exit 1 | ||
| 16 | fi | ||
| 17 | git config --global user.name > /dev/null | ||
| 18 | if [ "$?" != "0" ]; then | ||
| 19 | echo "Please set git config --global user.name" | ||
| 20 | exit 1 | ||
| 21 | fi | ||
| 22 | git config --global user.email > /dev/null | ||
| 23 | if [ "$?" != "0" ]; then | ||
| 24 | echo "Please set git config --global user.email" | ||
| 25 | exit 1 | ||
| 26 | fi | ||
| 27 | bitbake -p | ||
| 28 | if [ "$?" != "0" ]; then | ||
| 29 | echo "Bitbake parsing failed" | ||
| 30 | exit 1 | ||
| 31 | fi | ||
| 32 | WATCHES=`sysctl fs.inotify.max_user_watches -n` | ||
| 33 | if (( $WATCHES < 100000 )); then | ||
| 34 | echo 'Need to increase watches (echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf' | ||
| 35 | #exit 1 | ||
| 36 | fi | ||
| 37 | mkdir -p tmp/deploy/images/qemux86-64 | ||
| 38 | pushd tmp/deploy/images/qemux86-64 | ||
| 39 | if [ ! -e core-image-minimal-qemux86-64.ext4 ]; then | ||
| 40 | wget http://downloads.yoctoproject.org/releases/yocto/yocto-2.5.1/machines/qemu/qemux86-64/core-image-minimal-qemux86-64.ext4 | ||
| 41 | fi | ||
| 42 | if [ ! -e core-image-minimal-qemux86-64.qemuboot.conf ]; then | ||
| 43 | wget http://downloads.yoctoproject.org/releases/yocto/yocto-2.5.1/machines/qemu/qemux86-64/core-image-minimal-qemux86-64.qemuboot.conf | ||
| 44 | fi | ||
| 45 | if [ ! -e bzImage-qemux86-64.bin ]; then | ||
| 46 | wget http://downloads.yoctoproject.org/releases/yocto/yocto-2.5.1/machines/qemu/qemux86-64/bzImage-qemux86-64.bin | ||
| 47 | fi | ||
| 48 | popd | ||
| 49 | bitbake qemu-helper-native | ||
| 50 | runqemu qemux86-64 | ||
| 51 | if [ "$?" != "0" ]; then | ||
| 52 | echo "Unable to use runqemu" | ||
| 53 | exit 1 | ||
| 54 | fi | ||
| 55 | runqemu qemux86-64 kvm | ||
| 56 | if [ "$?" != "0" ]; then | ||
| 57 | echo "Unable to use runqemu with kvm" | ||
| 58 | exit 1 | ||
| 59 | fi | ||
