build_test.sh 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. #!/bin/sh
  2. exec 2>&1
  3. BUILD_TEST_DIR=/tmp/aria2_build_test
  4. LOG=build_test.log
  5. if [ ! -d $BUILD_TEST_DIR ]; then
  6. mkdir $BUILD_TEST_DIR || 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 && make -j2 check && \
  23. cp src/aria2c $BUILD_TEST_DIR/aria2c_$2 && \
  24. cp config.log $BUILD_TEST_DIR/config.log_$2
  25. }
  26. clear()
  27. {
  28. for file in `ls $BUILD_TEST_DIR`; do
  29. rm -f $BUILD_TEST_DIR/$file;
  30. done
  31. }
  32. case "$1" in
  33. clear)
  34. clear
  35. ;;
  36. *)
  37. build "--without-gnutls" "openssl"
  38. build "--without-gnutls --without-openssl" "nossl"
  39. build "--without-libcares" "nocares"
  40. build "--without-libxml2" "nolibxml2"
  41. build "--without-libxml2 --without-libexpat" "noxml"
  42. # Feature combinations
  43. build "--disable-bittorrent" "nobt"
  44. build "--disable-metalink" "noml"
  45. build "--disable-bittorrent --disable-metalink" "nobt_noml"
  46. build "--disable-epoll" "noepoll"
  47. build "--disable-epoll --without-libcares" "noepoll_nocares"
  48. ;;
  49. esac