<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>change log for rtems-testing (2011-08-01)</title>
</head>
<body text='#000000' bgcolor='#ffffff'>
<a name='cs1'></a>
<table border='0' cellspacing='0' cellpadding='5' width='100%' bgcolor='#eeeeee'>
<tr><td colspan='3' bgcolor='#dddddd'>
 <font color='#bb2222'><strong>joel</strong></font>
</td></tr>
<tr><td colspan='3' bgcolor='#dddddd'><pre>2011-08-01 Joel Sherrill <joel.sherrill@oarcorp.com>

        * Makefile: Enhance to check more than a BSP.
        * check_submission: New file.
        * check_bsp: Removed.
</pre></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems-testing/merge-helpers/ChangeLog.diff?r1=text&tr1=1.9&r2=text&tr2=1.10&diff_format=h">M</a></td><td width='1%'>1.10</td><td width='100%'>merge-helpers/ChangeLog</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems-testing/merge-helpers/Makefile.diff?r1=text&tr1=1.1&r2=text&tr2=1.2&diff_format=h">M</a></td><td width='1%'>1.2</td><td width='100%'>merge-helpers/Makefile</td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems-testing/merge-helpers/check_bsp?rev=1.9&content-type=text/vnd.viewcvs-markup">R</a></td><td width='1%'><font color="#880000">1.9</font></td><td width='100%'><font color="#880000">merge-helpers/check_bsp</font></td></tr>
<tr><td width='1%'><a href="http://www.rtems.com/cgi-bin/viewcvs.cgi//rtems-testing/merge-helpers/check_submission?rev=1.1&content-type=text/vnd.viewcvs-markup">A</a></td><td width='1%'><font color="#000088">1.1</font></td><td width='100%'><font color="#000088">merge-helpers/check_submission</font></td></tr>
</table>
<pre>
<font color='#006600'>diff -u rtems-testing/merge-helpers/ChangeLog:1.9 rtems-testing/merge-helpers/ChangeLog:1.10
--- rtems-testing/merge-helpers/ChangeLog:1.9   Mon Jan 24 09:33:04 2011
+++ rtems-testing/merge-helpers/ChangeLog       Mon Aug  1 09:23:14 2011
</font><font color='#997700'>@@ -1,3 +1,9 @@
</font><font color='#000088'>+2011-08-01    Joel Sherrill <joel.sherrill@oarcorp.com>
+
+       * Makefile: Enhance to check more than a BSP.<span style="background-color: #FF0000"> </span>
+       * check_submission: New file.
+       * check_bsp: Removed.
+
</font> 2011-01-24        Joel Sherrill <joel.sherrill@oarcorp.com>
 
        * check_bsp: Fix copyright check to allow Copyright.

<font color='#006600'>diff -u rtems-testing/merge-helpers/Makefile:1.1 rtems-testing/merge-helpers/Makefile:1.2
--- rtems-testing/merge-helpers/Makefile:1.1    Thu Sep 10 14:42:35 2009
+++ rtems-testing/merge-helpers/Makefile        Mon Aug  1 09:23:14 2011
</font><font color='#997700'>@@ -3,7 +3,7 @@
</font> #
 
 INSTALL_DIR=../bin
<font color='#880000'>-SCRIPTS=check_bsp
</font><font color='#000088'>+SCRIPTS=check_submission
</font> 
 all: prep ${SCRIPTS} install
 

<font color='#006600'>diff -u /dev/null rtems-testing/merge-helpers/check_submission:1.1
--- /dev/null   Mon Aug  1 10:10:03 2011
+++ rtems-testing/merge-helpers/check_submission        Mon Aug  1 09:23:15 2011
</font><font color='#997700'>@@ -0,0 +1,227 @@
</font><font color='#000088'>+#
+#  Script to test for various things we want in a BSP when it is
+#  submitted.
+#
+#  Test for:
+#    - XXX
+#
+#  $Id$
+#
+
+usage()
+{
+cat <<EOF
+check_submission [options] directory
+  -v - verbose
+EOF
+}
+
+fatal()
+{
+  usage
+  exit 1
+}
+
+toggle()
+{
+  case $1 in
+    no)  echo "yes" ;;
+    yes) echo "no" ;;
+    *)   fatal "Unknown value to toggle ($1)" ;;
+  esac
+}
+
+verbose="no"
+do_bsp="no"
+do_test="no"
+
+while getopts vbt OPT
+do
+    case "$OPT" in
+        b) do_bsp="yes" ; do_test="no"  ;;
+        t) do_bsp="no"  ; do_test="yes" ;;
+        v) verbose=`toggle ${verbose}` ;;
+        *) fatal ;;
+    esac
+done
+
+########################### Grab Directory ###########################
+
+shiftcount=`expr $OPTIND - 1`
+shift $shiftcount
+
+basedir=${1}
+
+if [ ${do_bsp} = "no" -a ${do_test} = "no" ] ; then
+  fatal must select test or bsp check mode
+fi
+
+if [ ! -d ${basedir} ] ; then
+  fatal ${basedir} is not a directory
+fi
+
+
+cd ${basedir}
+if [ $? -ne 0 ] ; then
+  echo Unable to cd to ${basedir}
+  exit 1
+fi
+
+
+test_its_there()
+{
+  if [ $# -ne 2 ] ; then
+    echo Usage: $0 FILE pattern
+  fi
+  grep ${2} ${1} >/dev/null
+  if [ $? -ne 0 ] ; then
+    echo "${2} is NOT in ${basedir}/${1}"
+  fi
+
+}
+
+test_its_there_all_case()
+{
+  if [ $# -ne 2 ] ; then
+    echo Usage: $0 FILE pattern
+  fi
+  grep -i ${2} ${1} >/dev/null
+  if [ $? -ne 0 ] ; then
+    echo "${2} is NOT in ${basedir}/${1} - case independent check"
+  fi
+
+}
+
+test_its_NOT_there_all_case()
+{
+  if [ $# -lt 2 ] ; then
+    echo Usage: $0 FILE pattern
+  fi
+  FILE=$1
+  shift
+  grep -i "${*}" ${FILE} >/dev/null
+  if [ $? -eq 0 ] ; then
+    echo "(${*}) SHOULD NOT BE IN ${basedir}/${FILE} - case independent check"
+  fi
+}
+
+test_its_NOT_there()
+{
+  if [ $# -lt 2 ] ; then
+    echo Usage: $0 FILE pattern
+  fi
+  FILE=$1
+  shift
+  grep "${*}" ${FILE} >/dev/null
+  if [ $? -eq 0 ] ; then
+    echo "(${*}) SHOULD NOT BE IN ${basedir}/${FILE}"
+  fi
+}
+
+find_source()
+{
+  findArgs=
+  while getopts "cCm" OPT
+  do
+   case "$OPT" in
+     c) findArgs="${findArgs} -o -name configure.ac" ;;
+     C) findArgs="${findArgs} -o -name *.cfg" ;;
+     m) findArgs="${findArgs} -o -name Makefile.am" ;;
+     *) echo "bad arg to find_source ($OPT)" ; exit 1 ;;
+   esac
+  done
+
+  shiftcount=`expr $OPTIND - 1`
+  shift $shiftcount
+
+  args=$*
+
+  find . -name "*.[chS]" ${findArgs}
+}
+
+# Verify no lines longer than 80 columns
+echo "=== Checking for lines greater than 79 columns"
+find_source -m -c -C | while read f
+do
+  grep  ".\{80,\}" ${f} >/dev/null
+  if [ $? -eq 0 ] ; then
+    echo "*** ${basedir}/${f} has the following lines that are too long"
+    grep -n '.\{80,\}' ${f}
+  fi
+done
+
+# really need to make the copyright strings consistent in BSPs
+echo "=== Checking for copyright notices"
+find_source | while read f
+do
+  test_its_there_all_case ${f} COPYRIGHT
+done
+
+# We want CVS Id strings everywhere possible
+echo "=== Checking for CVS Id strings"
+find_source | while read f
+do
+  test_its_there ${f} "\$Id"
+done
+
+# We do not want the reformatted license notice
+echo "=== Checking for reformatted RTEMS license notices"
+find_source -m -c -C | while read f
+do
+  test_its_NOT_there ${f} "this file may be found in the file"
+done
+
+# We do not want GPL code
+echo "=== Checking for hints of GPL code"
+find_source -m -c -C | while read f
+do
+  test_its_NOT_there ${f} "Free Software Foundation"
+  test_its_NOT_there ${f} "program is free software"
+  test_its_NOT_there ${f} "General Public License"
+done
+
+# We do not want hints that there are things left to do
+echo "=== Checking for TODO hints"
+find_source -m -c -C | while read f
+do
+  test_its_NOT_there ${f} XXX
+  test_its_NOT_there ${f} TODO
+  test_its_NOT_there ${f} TBD
+done
+
+# If not using -O2, then we really want to know
+if [ ${do_bsp} = "yes" ] ; then
+  # We do not want stdio in a BSP
+  echo "=== Checking for stdio"
+  find_source -m -c -C | while read f
+  do
+    test_its_NOT_there ${f} printf
+    test_its_NOT_there ${f} puts
+  done
+
+  # BSPs should include RTEMS_BSP_CLEANUP_OPTIONS and maybe
+  #   RTEMS_BSP_BOOTCARD_OPTIONS
+  if [ -r configure.ac ] ; then
+    echo "=== Checking for RTEMS_BSP_BOOTCARD_OPTIONS in BSP configure.ac"
+    test_its_there configure.ac RTEMS_BSP_BOOTCARD_OPTIONS
+    echo "=== Checking for RTEMS_BSP_CLEANUP_OPTIONS in BSP configure.ac"
+    test_its_there configure.ac RTEMS_BSP_CLEANUP_OPTIONS
+  fi
+
+  # BSPs should normally use -O2
+  echo "=== Checking for not using -O2"
+  grep -H "\-O[013456789]" make/custom/*.cfg
+
+  # BSPs should not turn on extra warnings
+  echo "=== Checking for turning on extra GCC warning checks"
+  grep -H "\-W" make/custom/*.cfg
+
+  # Hopefully have some output from the tmtests
+  echo "=== Checking for timing information"
+  c=`ls -1 times* 2>/dev/null | wc -l`
+  if [ ${c} -eq 0 ] ; then
+    echo "Please run the timing tests and include the results."
+  fi
+fi  ## END OF IF BSP
+
+exit 0
</font></pre>
<p> </p>

<p>--<br />
<small>Generated by <a href="http://www.codewiz.org/projects/index.html#loginfo">Deluxe Loginfo</a> 2.122 by Bernardo Innocenti <bernie@develer.com></small></p>
</body>
</html>