autobuilder-worker-prereq-tests 1.9 KB

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