Skip to content

Commit

Permalink
Merge pull request #34 from yosefe/topic/jenkins-affinity
Browse files Browse the repository at this point in the history
JENKINS: Set CPU affinity according to executor number.
  • Loading branch information
mike-dubman committed Nov 26, 2014
2 parents 915cc82 + 002bec1 commit 4c639a0
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions contrib/test_jenkins.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,15 @@ else
WS_URL=$JOB_URL/ws
fi

# Set CPU affinity to 2 cores, for performance tests
if [ -n "$EXECUTOR_NUMBER" ]
then
AFFINITY="taskset -c $(( 2 * EXECUTOR_NUMBER ))","$(( 2 * EXECUTOR_NUMBER + 1))"
else
AFFINITY=""
fi


rpm_topdir=$WORKSPACE/rpm-dist

make_opt="-j$(($(nproc) - 1))"
Expand All @@ -26,7 +35,7 @@ echo "Making a directory for test build"
mkdir -p build-test
cd build-test

echo "Build w/o IB"
echo "Build without IB verbs"
../contrib/configure-release --without-verbs && make $make_opt

echo "Build release"
Expand All @@ -37,15 +46,14 @@ module load hpcx-gcc
make clean && ../contrib/configure-devel --with-mpi && make $make_opt
module unload hpcx-gcc

echo "Starting gtest"

make -C test/gtest test
echo "Running unit tests"
$AFFINITY make -C test/gtest test

echo "Running valgrind tests"
module load tools/valgrind
make -C test/gtest VALGRIND_EXTRA_ARGS="--xml=yes --xml-file=valgrind.xml" test_valgrind
$AFFINITY make -C test/gtest VALGRIND_EXTRA_ARGS="--xml=yes --xml-file=valgrind.xml" test_valgrind
module unload tools/valgrind


echo "Build with coverity"
module load tools/cov
cov_build_id="cov_build_${BUILD_NUMBER}"
Expand Down

0 comments on commit 4c639a0

Please sign in to comment.