The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/contrib/device-tree/scripts/cronjob

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    1 #!/bin/bash
    2 
    3 set -e
    4 
    5 cd $(dirname $0)/..
    6 
    7 UPSTREAM_GIT="git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git"
    8 
    9 BRANCHES="master filter-state upstream/master upstream/dts"
   10 
   11 if [ ! -f scripts/filter.sh ] ; then
   12     echo "`pwd`: does not appear to be a device-tree.git" 1>&2
   13     exit 1
   14 fi
   15 
   16 if [ -z "$LATEST_VERSION" ] ; then
   17     FINGER_BANNER="https://www.kernel.org/finger_banner"
   18     LATEST_VERSION=$(wget --quiet -O - "$FINGER_BANNER" |\
   19         sed -n -e '0,/^The latest mainline version of the Linux kernel is:\s*\(.*\)$/s//\1/p')
   20 fi
   21 
   22 if [ -z "$LATEST_VERSION" ] ; then
   23     echo "Unable to determine latest version" 1>&2
   24     exit 1
   25 fi
   26 
   27 echo "Latest Version: v$LATEST_VERSION"
   28 if ! git show-ref --quiet --verify refs/tags/v${LATEST_VERSION} ; then
   29     echo "Latest version is new"
   30 fi
   31 if ! git show-ref --quiet --verify refs/tags/v${LATEST_VERSION}-dts ; then
   32     echo "Latest version is unmerged"
   33 fi
   34 echo
   35 
   36 echo "Current State:"
   37 for branch in $BRANCHES ; do
   38     REF=$(git show-ref --verify refs/heads/${branch})
   39     if [ $? -ne 0 ] ; then
   40         echo "Tree is missing required branch ${branch}, aborting" 1>&2
   41         exit 1
   42     fi
   43     echo "  ${REF}"
   44 done
   45 echo
   46 
   47 trap '
   48 if [ -n "$FILTER_OUTPUT" ] ; then
   49     echo "---------------------------------------------------------------------"
   50     echo "Filter Output:"
   51     echo "---------------------------------------------------------------------"
   52     echo "$FILTER_OUTPUT"
   53     echo
   54 fi
   55 if [ -n "$MERGE_OUTPUT" ] ; then
   56     echo "---------------------------------------------------------------------"
   57     echo "Merge Output:"
   58     echo "---------------------------------------------------------------------"
   59     echo "$MERGE_OUTPUT"
   60     echo
   61 fi
   62 ' EXIT
   63 
   64 FILTER_OUTPUT=`(
   65 set -e
   66 echo "Switching to master branch"
   67 git checkout master
   68 
   69 echo "Fetching $UPSTREAM_GIT master"
   70 git fetch --tags "$UPSTREAM_GIT" master
   71 echo
   72 
   73 echo "Filtering"
   74 ./scripts/filter.sh
   75 echo
   76 ) 2>&1 `
   77 
   78 #git push --dry-run origin filter-state upstream/dts upstream/master
   79 #git push --dry-run origin --tags
   80 #echo
   81 
   82 DATE=$(date +%Y%m%d)
   83 TESTBRANCH=test-${DATE}
   84 MERGE_OUTPUT=`(
   85 set -e
   86 git checkout -b ${TESTBRANCH} origin/master
   87 git -c merge.renameLimit=1000000 merge --no-edit upstream/dts
   88 ) 2>&1 `
   89 REF=$(git show-ref --verify refs/heads/${TESTBRANCH})
   90 echo "Testing: ${REF}"
   91 if git log ${TESTBRANCH} -- MAINTAINERS | grep --quiet . ; then
   92     echo "Filter branch has upstream-only content (MAINTAINERS file)"
   93     exit 1
   94 fi
   95 
   96 make clean -s
   97 TEST_OUTPUT=`make -k -s 2>&1 || true`
   98 if [ -z "${TEST_OUTPUT}" ]; then
   99     echo "Success!"
  100 else
  101     echo "---------------------------------------------------------------------"
  102     echo "Test Output:"
  103     echo "---------------------------------------------------------------------"
  104     echo "$TEST_OUTPUT"
  105 fi
  106 echo
  107 
  108 echo "Switching back to master branch"
  109 git checkout master
  110 
  111 echo "Recording refs/tests/${DATE}"
  112 git update-ref refs/tests/${DATE} ${TESTBRANCH}
  113 
  114 echo "Removing ${TESTBRANCH}"
  115 git branch -D "${TESTBRANCH}"
  116 
  117 echo "Final State:"
  118 for branch in ${BRANCHES} ; do
  119     REF=$(git show-ref --verify refs/heads/${branch})
  120     echo "  ${REF}"
  121 done
  122 echo
  123 
  124 exit 0

Cache object: f05af063235ee1e594a1e26921443019


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.