null+****@clear*****
null+****@clear*****
2012年 8月 9日 (木) 23:02:03 JST
Kouhei Sutou 2012-08-09 23:02:03 +0900 (Thu, 09 Aug 2012) New Revision: 16529fd40b1036f8abf79366f6a89b6986c03006 https://github.com/mroonga/mroonga/commit/16529fd40b1036f8abf79366f6a89b6986c03006 Log: test: build parallel if available Modified files: test/run-sql-test.sh test/run-unit-test.sh Modified: test/run-sql-test.sh (+13 -1) =================================================================== --- test/run-sql-test.sh 2012-08-09 22:54:37 +0900 (1779ac4) +++ test/run-sql-test.sh 2012-08-09 23:02:03 +0900 (951c92e) @@ -4,7 +4,19 @@ export BASE_DIR="$(cd $(dirname $0); pwd)" top_dir="$BASE_DIR/.." if test "$NO_MAKE" != "yes"; then - make -C ${top_dir} > /dev/null || exit 1 + MAKE_ARGS= + case `uname` in + Linux) + MAKE_ARGS="-j$(grep '^processor' /proc/cpuinfo | wc -l)" + ;; + Darwin) + MAKE_ARGS="-j$(/usr/sbin/sysctl -n hw.ncpu)" + ;; + *) + : + ;; + esac + make $MAKE_ARGS -C $top_dir > /dev/null || exit 1 fi . "${top_dir}/config.sh" Modified: test/run-unit-test.sh (+13 -1) =================================================================== --- test/run-unit-test.sh 2012-08-09 22:54:37 +0900 (3c2e513) +++ test/run-unit-test.sh 2012-08-09 23:02:03 +0900 (6d99513) @@ -4,7 +4,19 @@ export BASE_DIR="`dirname $0`" top_dir="$BASE_DIR/.." if test -z "$NO_MAKE"; then - make -C $top_dir > /dev/null || exit 1 + MAKE_ARGS= + case `uname` in + Linux) + MAKE_ARGS="-j$(grep '^processor' /proc/cpuinfo | wc -l)" + ;; + Darwin) + MAKE_ARGS="-j$(/usr/sbin/sysctl -n hw.ncpu)" + ;; + *) + : + ;; + esac + make $MAKE_ARGS -C $top_dir > /dev/null || exit 1 fi if test -z "$CUTTER"; then -------------- next part -------------- HTML$B$NE:IU%U%!%$%k$rJ]4I$7$^$7$?(B...下載