Home | History | Annotate | Line # | Download | only in bin
reg-newmid revision 1.1.1.1.8.2
      1  1.1.1.1.8.2  tls #! /bin/sh
      2  1.1.1.1.8.2  tls 
      3  1.1.1.1.8.2  tls # The build failed for and identifier in the range bwetween LOW and HIGH.
      4  1.1.1.1.8.2  tls # Find a new patch id to try within that range.
      5  1.1.1.1.8.2  tls #
      6  1.1.1.1.8.2  tls # It's meant to be easy to modify the heuristics used to select the
      7  1.1.1.1.8.2  tls # next patch to try by adding to or rearranging the patches listed in
      8  1.1.1.1.8.2  tls # MIDLIST.  Known failures are recorded in ${REG_FAILLIST}.
      9  1.1.1.1.8.2  tls #
     10  1.1.1.1.8.2  tls # A nifty improvement would be to record known ranges of failure as
     11  1.1.1.1.8.2  tls # ranges, and then pick revisions just before and just after the range.
     12  1.1.1.1.8.2  tls #
     13  1.1.1.1.8.2  tls # Copyright (C) 2006 Free Software Foundation, Inc.
     14  1.1.1.1.8.2  tls #
     15  1.1.1.1.8.2  tls # This file is free software; you can redistribute it and/or modify
     16  1.1.1.1.8.2  tls # it under the terms of the GNU General Public License as published by
     17  1.1.1.1.8.2  tls # the Free Software Foundation; either version 3 of the License, or
     18  1.1.1.1.8.2  tls # (at your option) any later version.
     19  1.1.1.1.8.2  tls #
     20  1.1.1.1.8.2  tls # This program is distributed in the hope that it will be useful,
     21  1.1.1.1.8.2  tls # but WITHOUT ANY WARRANTY; without even the implied warranty of
     22  1.1.1.1.8.2  tls # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     23  1.1.1.1.8.2  tls # GNU General Public License for more details.
     24  1.1.1.1.8.2  tls #
     25  1.1.1.1.8.2  tls # For a copy of the GNU General Public License, write the the
     26  1.1.1.1.8.2  tls # Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
     27  1.1.1.1.8.2  tls # Boston, MA 02111-1301, USA.
     28  1.1.1.1.8.2  tls 
     29  1.1.1.1.8.2  tls LOW=$1
     30  1.1.1.1.8.2  tls HIGH=$2
     31  1.1.1.1.8.2  tls 
     32  1.1.1.1.8.2  tls MIDLIST=""
     33  1.1.1.1.8.2  tls 
     34  1.1.1.1.8.2  tls let MID01=LOW+LOW+LOW+LOW+LOW+LOW+LOW+LOW+LOW+LOW+LOW+HIGH
     35  1.1.1.1.8.2  tls let MID01=MID01/12
     36  1.1.1.1.8.2  tls let MID02=LOW+LOW+LOW+LOW+LOW+LOW+LOW+LOW+LOW+LOW+HIGH+HIGH
     37  1.1.1.1.8.2  tls let MID02=MID02/12
     38  1.1.1.1.8.2  tls let MID03=LOW+LOW+LOW+LOW+LOW+LOW+LOW+LOW+LOW+HIGH+HIGH+HIGH
     39  1.1.1.1.8.2  tls let MID03=MID03/12
     40  1.1.1.1.8.2  tls let MID04=LOW+LOW+LOW+LOW+LOW+LOW+LOW+LOW+HIGH+HIGH+HIGH+HIGH
     41  1.1.1.1.8.2  tls let MID04=MID04/12
     42  1.1.1.1.8.2  tls let MID05=LOW+LOW+LOW+LOW+LOW+LOW+LOW+HIGH+HIGH+HIGH+HIGH+HIGH
     43  1.1.1.1.8.2  tls let MID05=MID05/12
     44  1.1.1.1.8.2  tls let MID06=LOW+LOW+LOW+LOW+LOW+LOW+HIGH+HIGH+HIGH+HIGH+HIGH+HIGH
     45  1.1.1.1.8.2  tls let MID06=MID06/12
     46  1.1.1.1.8.2  tls let MID07=LOW+LOW+LOW+LOW+LOW+HIGH+HIGH+HIGH+HIGH+HIGH+HIGH+HIGH
     47  1.1.1.1.8.2  tls let MID07=MID07/12
     48  1.1.1.1.8.2  tls let MID08=LOW+LOW+LOW+LOW+HIGH+HIGH+HIGH+HIGH+HIGH+HIGH+HIGH+HIGH
     49  1.1.1.1.8.2  tls let MID08=MID08/12
     50  1.1.1.1.8.2  tls let MID09=LOW+LOW+LOW+HIGH+HIGH+HIGH+HIGH+HIGH+HIGH+HIGH+HIGH+HIGH
     51  1.1.1.1.8.2  tls let MID09=MID09/12
     52  1.1.1.1.8.2  tls let MID10=LOW+LOW+HIGH+HIGH+HIGH+HIGH+HIGH+HIGH+HIGH+HIGH+HIGH+HIGH
     53  1.1.1.1.8.2  tls let MID10=MID10/12
     54  1.1.1.1.8.2  tls let MID11=LOW+HIGH+HIGH+HIGH+HIGH+HIGH+HIGH+HIGH+HIGH+HIGH+HIGH+HIGH
     55  1.1.1.1.8.2  tls let MID11=MID11/12
     56  1.1.1.1.8.2  tls 
     57  1.1.1.1.8.2  tls # Look in this order; MID has already been done:
     58  1.1.1.1.8.2  tls #
     59  1.1.1.1.8.2  tls #  LOW--10---7---6---3---2---MID---1---4---5---8---9---HIGH
     60  1.1.1.1.8.2  tls 
     61  1.1.1.1.8.2  tls MIDLIST="${MIDLIST} ${MID07}"
     62  1.1.1.1.8.2  tls MIDLIST="${MIDLIST} ${MID05}"
     63  1.1.1.1.8.2  tls MIDLIST="${MIDLIST} ${MID04}"
     64  1.1.1.1.8.2  tls MIDLIST="${MIDLIST} ${MID08}"
     65  1.1.1.1.8.2  tls MIDLIST="${MIDLIST} ${MID09}"
     66  1.1.1.1.8.2  tls MIDLIST="${MIDLIST} ${MID03}"
     67  1.1.1.1.8.2  tls MIDLIST="${MIDLIST} ${MID02}"
     68  1.1.1.1.8.2  tls MIDLIST="${MIDLIST} ${MID10}"
     69  1.1.1.1.8.2  tls MIDLIST="${MIDLIST} ${MID11}"
     70  1.1.1.1.8.2  tls MIDLIST="${MIDLIST} ${MID01}"
     71  1.1.1.1.8.2  tls 
     72  1.1.1.1.8.2  tls for MID in ${MIDLIST}
     73  1.1.1.1.8.2  tls do
     74  1.1.1.1.8.2  tls   # Skip this if it's the low endpoint.
     75  1.1.1.1.8.2  tls   if [ ${MID} != ${LOW} ]; then
     76  1.1.1.1.8.2  tls     # Is this patch already known to fail?
     77  1.1.1.1.8.2  tls     ${REG_CHECKFAIL} ${MID}
     78  1.1.1.1.8.2  tls     if [ $? -ne 0 ]; then
     79  1.1.1.1.8.2  tls       echo ${MID}
     80  1.1.1.1.8.2  tls       exit 0
     81  1.1.1.1.8.2  tls     fi
     82  1.1.1.1.8.2  tls   fi
     83  1.1.1.1.8.2  tls done
     84  1.1.1.1.8.2  tls 
     85  1.1.1.1.8.2  tls echo 0
     86  1.1.1.1.8.2  tls exit 1
     87