Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Commit

Permalink
Fix issue where unit tests would take all host resources.
Browse files Browse the repository at this point in the history
  • Loading branch information
scottarnette committed Oct 15, 2019
1 parent d9ad302 commit 107129d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scripts/parallel-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
set -eo pipefail
# variables
echo "+++ $([[ "$BUILDKITE" == 'true' ]] && echo ':evergreen_tree: ')Configuring Environment"
[[ -z "$CPUS" ]] && export CPUS=$(getconf _NPROCESSORS_ONLN)
[[ -z "$JOBS" ]] && export JOBS=$(getconf _NPROCESSORS_ONLN)
GIT_ROOT="$(dirname $BASH_SOURCE[0])/.."
if [[ "$(uname)" == 'Linux' ]]; then
. /etc/os-release
Expand All @@ -22,8 +22,8 @@ else
fi
# run tests
set +e # defer ctest error handling to end
echo "$ ctest -j $CPUS -LE _tests --output-on-failure -T Test"
ctest -j $CPUS -LE _tests --output-on-failure -T Test
echo "$ ctest -j $JOBS -LE _tests --output-on-failure -T Test"
ctest -j $JOBS -LE _tests --output-on-failure -T Test
EXIT_STATUS=$?
echo 'Done running parallelizable tests.'
exit $EXIT_STATUS

0 comments on commit 107129d

Please sign in to comment.