X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=jjb%2Fapex%2Fapex-unit-test.sh;h=3f15847f2380001b728f329e9ec4103e282ad776;hb=7851cc2d897b9809118530da77c55c677775119b;hp=abcddcab450b3abba198b2419e22dfc0aa5fb095;hpb=e7d0ada29bd6acf2dab0fb79b8cbfa3b4e20fa0a;p=releng.git diff --git a/jjb/apex/apex-unit-test.sh b/jjb/apex/apex-unit-test.sh index abcddcab4..3f15847f2 100755 --- a/jjb/apex/apex-unit-test.sh +++ b/jjb/apex/apex-unit-test.sh @@ -7,10 +7,27 @@ echo "Starting unit tests for Apex..." echo "---------------------------------------------------------------------------------------" echo +PATH=$PATH:/usr/sbin -pushd ci/ > /dev/null -./test.sh -popd + +pushd build/ > /dev/null +for pkg in yamllint rpmlint iproute epel-release python34-devel python34-nose python34-PyYAML python-pep8 python34-mock python34-pip; do + if ! rpm -q ${pkg} > /dev/null; then + if ! sudo yum install -y ${pkg}; then + echo "Failed to install ${pkg} package..." + exit 1 + fi + fi +done + +# Make sure coverage is installed +if ! python3 -c "import coverage" &> /dev/null; then sudo pip3 install coverage; fi + +make rpmlint +make python-pep8-check +make yamllint +make python-tests +popd > /dev/null echo "--------------------------------------------------------" echo "Unit Tests Done!"