randconfig.sh 815 B

12345678910111213141516171819202122232425262728293031323334
  1. #!/bin/sh
  2. # build random configurations
  3. # Usage:
  4. # ARCH=i386 nohup ./extra/scripts/randconfig.sh & sleep 1800 && touch STOP
  5. #
  6. # The above builds random i386 configs and automatically stops after 30 minutes
  7. test "x$ARCH" = "x" && ARCH=`uname -m`
  8. KCONFIG_ALLCONFIG=.config.allconfig
  9. (echo TARGET_$ARCH=y
  10. echo '# UCLIBC_PREGENERATED_LOCALE_DATA is not set'
  11. echo '# DOMULTI is not set'
  12. echo '# UCLIBC_DOWNLOAD_PREGENERATED_LOCALE_DATA is not set'
  13. ) > $KCONFIG_ALLCONFIG
  14. export KCONFIG_ALLCONFIG
  15. i=0
  16. while test ! -f STOP
  17. do
  18. make $* randconfig > /dev/null
  19. make $* silentoldconfig > /dev/null
  20. if (make $*) 2>&1 >& mk.log
  21. then
  22. :
  23. else
  24. i=`expr $i + 1`
  25. num=`printf "%.5d" $i`
  26. mv .config FAILED.$num.config
  27. mv mk.log FAILED.$num.log
  28. fi
  29. make distclean > /dev/null || true
  30. done
  31. rm -f STOP