Blame tests/p_procinfo/5-test_procinfo.sh

Steve Barnes 464547
#!/bin/bash
root 2bfd68
# Author: Steve Barnes (steve@echo.id.au)
Athmane Madjoudj 3a45f5
#         Athmane Madjoudj <athmanem@gmail.com>
Steve Barnes 464547
Athmane Madjoudj 3a45f5
if (t_GetPkgRel basesystem | grep -q el6)
Athmane Madjoudj 3a45f5
then
Athmane Madjoudj 3a45f5
   t_Log It seems to be a CentOS 6.x system, this test will be disabled
Athmane Madjoudj 3a45f5
   exit 0
Athmane Madjoudj 3a45f5
else
Athmane Madjoudj 3a45f5
    t_Log "Running $0 - checking procinfo runs and returns non-zero exit status."
Steve Barnes 464547
Athmane Madjoudj 3a45f5
    PROCINFO=`which procinfo`
Steve Barnes 464547
Athmane Madjoudj 3a45f5
    [ "$PROCINFO" ] || { t_Log "Failed to find procinfo binary. Cannot continue."; exit $FAIL; }
Steve Barnes 464547
Athmane Madjoudj 3a45f5
    $PROCINFO &>/dev/null
Steve Barnes 464547
Athmane Madjoudj 3a45f5
    [ $? -eq 0 ] || { t_Log "Procinfo exited with non-zero status. That ain't good..."; exit $FAIL; }
Athmane Madjoudj 3a45f5
    
Athmane Madjoudj 3a45f5
    t_CheckExitStatus $?
Athmane Madjoudj 0e57f0
Athmane Madjoudj 3a45f5
fi