-#!/bin/bash -e
+#!/usr/bin/env bash
+set -e
source $(dirname $0)/../detect-build-env-vars.sh
dir=$CEPH_ROOT/ceph-object-corpus
-set -e
-
failed=0
numtests=0
pids=""
# Using $MAX_PARALLEL_JOBS jobs if defined, unless the number of logical
# processors
-if [ `uname` == FreeBSD ]; then
+if [ `uname` == FreeBSD -o `uname` == Darwin ]; then
NPROC=`sysctl -n hw.ncpu`
max_parallel_jobs=${MAX_PARALLEL_JOBS:-${NPROC}}
else