Navigation Menu

Skip to content

Commit

Permalink
test: build parallel if available
Browse files Browse the repository at this point in the history
  • Loading branch information
kou committed Aug 9, 2012
1 parent d2dec26 commit 16529fd
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 2 deletions.
14 changes: 13 additions & 1 deletion test/run-sql-test.sh
Expand Up @@ -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"
Expand Down
14 changes: 13 additions & 1 deletion test/run-unit-test.sh
Expand Up @@ -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
Expand Down

0 comments on commit 16529fd

Please sign in to comment.