Changeset 21182


Ignore:
Timestamp:
09/01/16 14:25:03 (9 years ago)
Author:
glperez
Message:

CHG: Adding logic for handling externalpackages that do not create install dir. Also, adding tests for externalpackages even when skipped.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/jenkins/jenkins.sh

    r21180 r21182  
    116116#Install external packages    (ISSM_EXTERNALPACKAGES){{{
    117117
     118#number of packages:
     119NUMPACKAGES=$(($(echo $EXTERNALPACKAGES | wc -w )/2))
     120
    118121#Jenkins xml files for individual packages
    119122EXTERNAL_TEST_FILE="$ISSM_DIR/nightlylog/results/external.xml"
     
    121124echo "<testsuite tests=\"$NUMPACKAGES\">" > $EXTERNAL_TEST_FILE
    122125
    123 #number of packages:
    124 NUMPACKAGES=$(($(echo $EXTERNALPACKAGES | wc -w )/2))
    125126for ((i=1;i<=$NUMPACKAGES;i++))
    126127do
     
    137138                echo "       Installing $PACKAGENAME                        ";
    138139                echo "======================================================";
     140
     141                # Jenkins needs to now whether the installation of externalpackages suceeded or not.
     142                # The majority of externalpackages populate an install directory with various files.
     143                # However, a few do not do this. Consequently, we need a way to confirm that these
     144                # packages were installed correctly. The following accomplishes this without polluting
     145                # installation directories.
     146                echo "if [ ! -d ./install ]; then" >> ./$PACKAGEINST
     147                echo "\tmkdir ./install" >> ./$PACKAGEINST
     148                echo "fi" >> ./$PACKAGEINST
     149                echo "touch ./install/SUCCESS" >> ./$PACKAGEINST
     150
    139151                ./$PACKAGEINST > compil.log
    140152                if [ $? -ne 0 ]; then
     
    158170                echo "       Skipping $PACKAGENAME                          ";
    159171                echo "======================================================";
     172                echo "<testcase classname=\"externalpackages\" name=\"$PACKAGENAME\"/>" >> $EXTERNAL_TEST_FILE
    160173        fi
    161174done
Note: See TracChangeset for help on using the changeset viewer.