Skip to content

Commit

Permalink
lib/tests/phoronix-test-suite.sh: fix test hpcc
Browse files Browse the repository at this point in the history
rebuid hpcc and add --allow-run-as-root option to hpcc

Signed-off-by: Chen Rong <[email protected]>
Signed-off-by: Philip Li <[email protected]>
  • Loading branch information
xilabao authored and rli9 committed Nov 17, 2017
1 parent 3fa6caf commit 6900a6f
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions lib/tests/phoronix-test-suite.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,25 @@ fixup_open_porous_media()
sed -i 's/nice mpirun -np/nice mpirun --allow-run-as-root -np/' "$target"
}

# rebuild hpcc and add --allow-run-as-root to hpcc
# the test needs more than 2 hours
fixup_hpcc()
{
[[ -n "$environment_directory" ]] || return

[ -d "/usr/lib/x86_64-linux-gnu/openmpi" ] && {
export MPI_PATH=/usr/lib/x86_64-linux-gnu/openmpi
export MPI_INCLUDE=/usr/lib/x86_64-linux-gnu/openmpi/include
export MPI_LIBS=/usr/lib/x86_64-linux-gnu/openmpi/lib/libmpi.so
export MPI_CC=/usr/bin/mpicc.openmpi
export MPI_VERSION=`$MPI_CC -showme:version 2>&1 | grep MPI | cut -d "(" -f1 | cut -d ":" -f2`
phoronix-test-suite force-install pts/hpcc-1.2.1
}

local target=${environment_directory}/pts/hpcc-1.2.1/hpcc
sed -i 's/mpirun -np/mpirun --allow-run-as-root -np/' "$target"
}

# add --allow-run-as-root to lammps
fixup_lammps()
{
Expand Down Expand Up @@ -113,6 +132,9 @@ run_test()
fio-1.8.2)
fixup_fio
;;
hpcc-1.2.1)
fixup_hpcc
;;
open-porous-media-1.3.1)
fixup_open_porous_media
;;
Expand Down

0 comments on commit 6900a6f

Please sign in to comment.