Skip to content

Commit

Permalink
Add iscsi/params test case (#827) (cont)
Browse files Browse the repository at this point in the history
    For RHEL7, use python2 instead because python3 is not available by default

Signed-off-by: Vector Li <[email protected]>
  • Loading branch information
Vector Li authored and veruu committed Jul 2, 2019
1 parent 5984559 commit bee480c
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
2 changes: 2 additions & 0 deletions storage/include/libbkrm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
source /usr/bin/rhts_environment.sh
source /usr/share/beakerlib/beakerlib.sh

BKRM_RC_ANY="0-255" # make sure rlRun supports any return code

#
# A simple wrapper function to skip a test because beakerlib doesn't support
# such an important feature, right here we just leverage 'rhts'. Note we
Expand Down
18 changes: 16 additions & 2 deletions storage/include/libstqe.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ source /usr/share/beakerlib/beakerlib.sh
source $(dirname $(readlink -f $BASH_SOURCE))/libbkrm.sh

STQE_GIT="https://gitlab.com/rh-kernel-stqe/python-stqe.git"
STQE_STABLE_VERSION=${STQE_STABLE_VERSION:-"ad38f15"}
STQE_STABLE_VERSION=${STQE_STABLE_VERSION:-"6ae4855"}
LIBSAN_STABLE_VERSION=${LIBSAN_STABLE_VERSION:-"0.3.0"}

function stqe_get_fwroot
Expand Down Expand Up @@ -53,7 +53,21 @@ function stqe_init_fwroot
fi
fi

rlRun "python3 setup.py install --prefix=" || \
#
# XXX: On RHEL7, should use python2 instead because python3
# is not available by default
#
typeset python=""
typeset cmd=""
for cmd in python3 python2 python; do
$cmd -V > /dev/null 2>&1 && python=$cmd && break
done
[[ -n $python ]] || rlSkip "python not found"

# install required packages
rlRun "bash env_setup.sh" $BKRM_RC_ANY

rlRun "$python setup.py install --prefix=" || \
rlAbort "fail to install test framework"

popd
Expand Down

0 comments on commit bee480c

Please sign in to comment.