From 8233b9f81bbeee2e53723202c140e938f2af72a1 Mon Sep 17 00:00:00 2001 From: Ralph Lange Date: Fri, 10 Jan 2020 16:27:33 +0100 Subject: [PATCH] travis: auto-fix missing inclusion of ../RELEASE.local --- travis-test.sh | 7 +++++++ travis/utils.sh | 9 +++++++++ 2 files changed, 16 insertions(+) diff --git a/travis-test.sh b/travis-test.sh index a433c69..5d9420c 100755 --- a/travis-test.sh +++ b/travis-test.sh @@ -158,6 +158,7 @@ add_dependency BASE R3.15.6 [ -e $location/LICENSE ] || die "Missing dependency was not checked out" BUILT=$(cat "$location/built") [ "$BUILT" != "$hash_3_15_6" ] && die "Wrong commit of dependency checked out (expected=\"$hash_3_15_6\" found=\"$BUILT\")" +grep -q "include \$(TOP)/../RELEASE.local" $location/configure/RELEASE && die "RELEASE in Base includes RELEASE.local" # up-to-date dependency does exist in the cache ( cd $CACHEDIR; git clone --quiet --depth 5 --recursive --branch R3.15.6 https://github.com/epics-base/epics-base.git base-R3.15.6 ) @@ -173,3 +174,9 @@ BUILT=$(cat "$location/built") [ "$BUILT" != "$hash_3_15_6" ] && die "Wrong commit of dependency checked out (expected=\"$hash_3_15_6\" found=\"$BUILT\")" rm -fr $location + +# missing inclusion of RELEASE.local in configure/RELEASE +location=$CACHEDIR/std-R3-4 +add_dependency STD R3-4 +grep -q "include \$(TOP)/../RELEASE.local" $location/configure/RELEASE || die "Inclusion of RELEASE.local not added to configure/RELEASE" +rm -fr $location diff --git a/travis/utils.sh b/travis/utils.sh index 10efb76..0e0ef9a 100644 --- a/travis/utils.sh +++ b/travis/utils.sh @@ -176,6 +176,15 @@ add_dependency() { git clone --quiet $deptharg $recurse --branch "$TAG" $repourl $dirname-$TAG ( cd $dirname-$TAG && git log -n1 ) modules_to_compile="${modules_to_compile} $CACHEDIR/$dirname-$TAG" + # fix non-base modules that do not include the .local files in configure/RELEASE + if [ $DEP != "BASE" ] + then + release=$CACHEDIR/$dirname-$TAG/configure/RELEASE + if [ -e $release ] + then + grep -q "include \$(TOP)/../RELEASE.local" $release || echo "-include \$(TOP)/../RELEASE.local" >> $release + fi + fi # run hook eval hook="\${${DEP}_HOOK}" if [ "$hook" ]