#! /bin/bash
ret=0

which mpiexec
s=$?
if [ $s -ne 0 ]
then
    echo "no mpiexec"
else 
    echo "mpiexec - boo#1041706 not fixed"
    ret=1;
fi

which mpiexec.slurm
s=$?
if [ $s -eq 0 ]
then
    echo "mpiexec.slurm exists"
else
    echo "no mpiexec.slurm - boo#1041706 not fixed"
    ret=1;
fi
[ $ret -eq 0 ] && echo "boo#1041706 fixed"

require=$(rpm -q --requires slurm-torque | grep -E "(perl-slurm|slurm-perlapi)")
s=$?
if [ $s -ne 0 ]
then
    echo "Cannot test boo#1031872"
    ret=1
else
    case $require in
	perl-slurm)
	    echo "Requires: perl-slurm present" ;&
	slurm-perlapi)
	    echo "Requires: slurm-perlapi present"
	    ret=1;;
    esac
    [ $ret -eq 0 ] && echo "boo#1031872 fixed"
fi    

exit $ret
