null+****@clear*****
null+****@clear*****
2012年 6月 9日 (土) 17:05:56 JST
Kouhei Sutou 2012-06-09 17:05:56 +0900 (Sat, 09 Jun 2012)
New Revision: a815d8726d7792ca5ba1d199eb914d9cadf2914e
Log:
test: use -j for implicit make
Modified files:
test/unit/run-test.sh
Modified: test/unit/run-test.sh (+13 -1)
===================================================================
--- test/unit/run-test.sh 2012-06-09 16:55:48 +0900 (5600894)
+++ test/unit/run-test.sh 2012-06-09 17:05:56 +0900 (062a8b9)
@@ -10,7 +10,19 @@ top_dir="$BUILD_DIR/../.."
top_dir=$(cd -P "$top_dir" 2>/dev/null || cd "$top_dir"; pwd)
if test x"$NO_MAKE" != x"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
if test -z "$CUTTER"; then