OpenSDE Framework (without history before r20070)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

96 lines
2.1 KiB

  1. #!/bin/bash
  2. # --- SDE-COPYRIGHT-NOTE-BEGIN ---
  3. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  4. #
  5. # Filename: lib/misc/regtest.sh
  6. # Copyright (C) 2008 The OpenSDE Project
  7. # Copyright (C) 2006 The T2 SDE Project
  8. #
  9. # More information can be found in the files COPYING and README.
  10. #
  11. # This program is free software; you can redistribute it and/or modify
  12. # it under the terms of the GNU General Public License as published by
  13. # the Free Software Foundation; version 2 of the License. A copy of the
  14. # GNU General Public License can be found in the file COPYING.
  15. # --- SDE-COPYRIGHT-NOTE-END ---
  16. # Tiny regression testsuite driver used by some core developers to track
  17. # breakage, sometimes even automated on a nightly basis.
  18. # - Rene Rebe
  19. set -e
  20. embedded=0
  21. while [ "$1" ]; do
  22. case $1 in
  23. -embedded)
  24. embedded=1
  25. ;;
  26. *) echo "Unknown option $1"
  27. exit
  28. ;;
  29. esac
  30. shift
  31. done
  32. mkdir -p regtest
  33. build()
  34. {
  35. if [ ! -e regtest/$x.finished ]; then
  36. mkdir -p config/regtest-$x
  37. cat > config/regtest-$x/config <<-EOT
  38. SDECFG_ARCH=$x
  39. SDECFG_CROSSBUILD=1
  40. SDECFG_PKG_CCACHE_USEIT=1
  41. SDECFG_CONTINUE_ON_ERROR_AFTER=0
  42. SDECFG_ALWAYS_CLEAN=1
  43. SDECFG_XTRACE=1
  44. SDECFG_EXPERT=1
  45. SDECFG_OPT="lazy" # slightly speed up the test builds
  46. EOT
  47. if [ $embedded -eq 1 ]; then
  48. cat >> config/regtest-$x/config <<-EOT
  49. SDECFG_TARGET='embedded'
  50. SDECFG_TARGET_EMBEDDED_STYLE='dietlibc'
  51. SDECFG_PKGSEL='1'
  52. EOT
  53. cat > config/regtest-$x/pkgsel <<-EOT
  54. O linux2*
  55. EOT
  56. fi
  57. ./scripts/Config -cfg regtest-$x -oldconfig
  58. ./scripts/Download -cfg regtest-$x -required >> regtest/$x.log 2>&1
  59. echo "Running build ..."
  60. ./scripts/Build-Target -cfg regtest-$x 2>&1 | tee regtest/$x.log |
  61. grep '> Building\|> Finished'
  62. # id=`grep SDECFG_ID config/regtest-$x/config`
  63. # eval $id
  64. touch regtest/$x.finished
  65. fi
  66. ./scripts/Create-ErrList -cfg regtest-$x | grep " builds "
  67. }
  68. for x in architecture/*/ ; do
  69. [[ $x = *share* ]] && continue
  70. x=${x#*/}; x=${x%/*}
  71. if [ $embedded -eq 1 ]; then
  72. case $x in
  73. cris|hppa*|m68k|mips64|sh*) # no diet support
  74. echo "Skipping $x (for now)"
  75. continue
  76. ;;
  77. esac
  78. fi
  79. echo "Processing $x ..."
  80. build $x
  81. done