Skip to content

Commit

Permalink
run-make-check.sh: Init defaults after deps are installed.
Browse files Browse the repository at this point in the history
get_processors() depends on coreutils nproc. Alpine does not install coreutils by default.

Signed-off-by: John Coyle <[email protected]>
  • Loading branch information
dx9 committed Dec 21, 2016
1 parent 12706d7 commit 3d0c778
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions run-make-check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,6 @@ function get_processors() {
fi
}

DEFAULT_MAKEOPTS=${DEFAULT_MAKEOPTS:--j$(get_processors)}
BUILD_MAKEOPTS=${BUILD_MAKEOPTS:-$DEFAULT_MAKEOPTS}
CHECK_MAKEOPTS=${CHECK_MAKEOPTS:-$DEFAULT_MAKEOPTS}

function run() {
local install_cmd
if test -f /etc/redhat-release ; then
Expand All @@ -53,6 +49,12 @@ function run() {
if test -f ./install-deps.sh ; then
$DRY_RUN ./install-deps.sh || return 1
fi

# Init defaults after deps are installed. get_processors() depends on coreutils nproc.
DEFAULT_MAKEOPTS=${DEFAULT_MAKEOPTS:--j$(get_processors)}
BUILD_MAKEOPTS=${BUILD_MAKEOPTS:-$DEFAULT_MAKEOPTS}
CHECK_MAKEOPTS=${CHECK_MAKEOPTS:-$DEFAULT_MAKEOPTS}

$DRY_RUN ./do_cmake.sh $@ || return 1
$DRY_RUN cd build
$DRY_RUN make $BUILD_MAKEOPTS tests || return 1
Expand Down

0 comments on commit 3d0c778

Please sign in to comment.