testheader.inc 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. ARCH=`make -f scripts/test/Makefile ARCH`
  2. DATE=`date +%Y%m%d`
  3. LOGFILE=build-results-${DATE}-${ARCH}.log
  4. function mk()
  5. {
  6. scripts/mkpkg $1 $2 "$3" | tee -a ${LOGFILE}
  7. }
  8. function header()
  9. {
  10. echo "#!/bin/sh" | tee -a ${LOGFILE}
  11. echo "source \"scripts/testheader.inc\""
  12. }
  13. active=1
  14. busybox=0
  15. function SKIP()
  16. {
  17. echo SKIP | tee -a ${LOGFILE}
  18. active=0
  19. }
  20. function RESTART()
  21. {
  22. echo RESTART | tee -a ${LOGFILE}
  23. active=1
  24. }
  25. function EXE()
  26. {
  27. printf "EXE " | tee -a ${LOGFILE}
  28. if [ ${active} == 1 ] ; then
  29. $1 $2 $3 "$4"
  30. return 0;
  31. else
  32. printf "%-8s" "$1" | tee -a ${LOGFILE}
  33. printf "%-32s" "$2" | tee -a ${LOGFILE}
  34. printf "%-16s" "$3" | tee -a ${LOGFILE}
  35. if [ "${4}X" != "X" ] ; then
  36. printf "%-64s" "\"$4\"" | tee -a ${LOGFILE}
  37. fi
  38. echo | tee -a ${LOGFILE}
  39. return 1;
  40. fi
  41. }
  42. function AVR()
  43. {
  44. printf "AVR " | tee -a ${LOGFILE}
  45. if [ "${ARCH}X" == "avr32X" ] ; then
  46. echo "mk $2 UNSUPPORTED \"$4\" $5 $6" | tee -a ${LOGFILE}
  47. return 1;
  48. elif [ ${active} == 1 ] ; then
  49. $1 $2 "$3" "$4"
  50. return 0;
  51. else
  52. printf "%-8s" "$1" | tee -a ${LOGFILE}
  53. printf "%-32s" "$2" | tee -a ${LOGFILE}
  54. printf "%-16s" "$3" | tee -a ${LOGFILE}
  55. if [ "${4}X" != "X" ] ; then
  56. printf "%-64s" "\"$4\"" | tee -a ${LOGFILE}
  57. fi
  58. echo | tee -a ${LOGFILE}
  59. return 1;
  60. fi
  61. }
  62. function skip()
  63. {
  64. printf "skip %-8s" "$1" | tee -a ${LOGFILE}
  65. printf "%-32s" "$2" | tee -a ${LOGFILE}
  66. if [ "$3X" == "OKX" ] ; then
  67. printf "%-16s" "DISABLED" | tee -a ${LOGFILE}
  68. if [ "${4}X" != "X" ] ; then
  69. printf "%-64s" "\"$4\"" | tee -a ${LOGFILE}
  70. fi
  71. elif [ "$3X" == "FAILX" ] ; then
  72. printf "%-16s" "DISABLED" | tee -a ${LOGFILE}
  73. if [ "${4}X" != "X" ] ; then
  74. printf "%-64s" "\"$4\"" | tee -a ${LOGFILE}
  75. fi
  76. elif [ "$3X" == "BROKENX" ] ; then
  77. printf "%-16s" "DISABLED" | tee -a ${LOGFILE}
  78. if [ "${4}X" != "X" ] ; then
  79. printf "%-64s" "\"$4\"" | tee -a ${LOGFILE}
  80. fi
  81. elif [ "$3X" == "DISABLEDX" ] ; then
  82. printf "%-16s" "DISABLED" | tee -a ${LOGFILE}
  83. if [ "${4}X" != "X" ] ; then
  84. printf "%-64s" "\"$4\"" | tee -a ${LOGFILE}
  85. fi
  86. else
  87. printf "%-16s" "DISABLED" | tee -a ${LOGFILE}
  88. if [ "${4}X" != "X" ] ; then
  89. printf "%-64s" "\"$4\"" | tee -a ${LOGFILE}
  90. fi
  91. fi
  92. echo | tee -a ${LOGFILE}
  93. }
  94. function bb()
  95. {
  96. printf "%-8s" "bb" | tee -a ${LOGFILE}
  97. if [ ${busybox} == 1 ] ; then
  98. printf "%-8s" "$1" | tee -a ${LOGFILE}
  99. $1 $2 $3 $4 $5 $6
  100. return 0;
  101. else
  102. echo "$1 $2 $3 $4 $5 $6" | tee -a ${LOGFILE}
  103. return 1;
  104. fi
  105. }
  106. function comment()
  107. {
  108. echo "comment $1" | tee -a ${LOGFILE}
  109. }
  110. # Enable HASERL
  111. sed -i s/.*BR2_PACKAGE_HASERL.*// .config
  112. echo "# BR2_PACKAGE_HASERL_VERSION_0_8_X is not set" >> .config
  113. echo "BR2_PACKAGE_HASERL_VERSION_0_9_X=y" >> .config
  114. echo "BR2_PACKAGE_HASERL_VERSION=\"0.9.25\"" >> .config
  115. echo "BR2_PACKAGE_HASERL=y" >> .config
  116. # Enable SSL
  117. sed -i s/.*BR2_PACKAGE_OPENSSL.*// .config
  118. echo "BR2_PACKAGE_OPENSSL=y" >> .config
  119. # Enable socat
  120. sed -i s/.*BR2_PACKAGE_SOCAT.*// .config
  121. echo "BR2_PACKAGE_SOCAT=y" >> .config
  122. echo "BR2_PACKAGE_SOCAT_PREDEF_CRDLY_SHIFT=\"9\"" >> .config
  123. echo "BR2_PACKAGE_SOCAT_PREDEF_TABDLY_SHIFT=\"11\"" >> .config
  124. echo "BR2_PACKAGE_SOCAT_PREDEF_CSIZE_SHIFT=\"4\"" >> .config
  125. # Enable Freetype
  126. sed -i s/.*BR2_PACKAGE_FREETYPE.*// .config
  127. echo "BR2_PACKAGE_FREETYPE=y" >> .config
  128. sed -i s/.*BR2_FREETYPE_VERSION.*// .config
  129. echo "# BR2_FREETYPE_VERSION_2_2_1 is not set" >> .config
  130. echo "BR2_FREETYPE_VERSION_2_3_7=y" >> .config
  131. echo "BR2_FREETYPE_VERSION=\"2.3.7\"" >> .config