build_test.sh 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. #!/bin/sh
  2. exec 2>&1
  3. BUILD_TEST_DIR=/tmp/aria2_build_test
  4. if [ ! -d "$BUILD_TEST_DIR" ]; then
  5. mkdir "$BUILD_TEST_DIR" \
  6. || echo "Failed to create directory $BUILD_TEST_DIR" \
  7. && exit -1
  8. fi
  9. echo -n "Starting build test "
  10. echo `date`
  11. # build CONFIGURE_OPTS BIN_SUFFIX DESC
  12. build()
  13. {
  14. echo -n "new build() started at "
  15. echo `date`
  16. echo "*** configure opts=$1"
  17. BIN_NAME="aria2c_$2"
  18. if [ -f "$BUILD_TEST_DIR/$BIN_NAME" ]; then
  19. echo "$BIN_NAME exists, skipping"
  20. return
  21. fi
  22. ./configure $1 \
  23. && cp config.log "$BUILD_TEST_DIR/config.log_$2" \
  24. && LANG=C make -j2 check > "$BUILD_TEST_DIR/aria2c_$2.log" \
  25. && cp src/aria2c "$BUILD_TEST_DIR/aria2c_$2"
  26. }
  27. clear()
  28. {
  29. for file in `ls $BUILD_TEST_DIR`; do
  30. rm -f "$BUILD_TEST_DIR/$file";
  31. done
  32. }
  33. case "$1" in
  34. clear)
  35. clear
  36. ;;
  37. *)
  38. # Library combinations
  39. build "--without-gnutls" "openssl"
  40. build "--without-gnutls --without-openssl" "nossl"
  41. build "--without-libcares" "nocares"
  42. build "--without-libxml2" "expat"
  43. build "--without-libxml2 --without-libexpat" "noxml"
  44. build "--without-libz" "nozlib"
  45. build "--without-sqlite3" "nosqlite3"
  46. # Feature combinations
  47. build "--disable-bittorrent" "nobt"
  48. build "--disable-metalink" "noml"
  49. build "--disable-bittorrent --disable-metalink" "nobt_noml"
  50. build "--disable-epoll" "noepoll"
  51. build "--disable-epoll --without-libcares" "noepoll_nocares"
  52. ;;
  53. esac