change log for rtems-testing (2010-08-08)

rtems-vc at rtems.org rtems-vc at rtems.org
Sun Aug 8 15:10:04 UTC 2010


 *joel*:
2010-08-08	Joel Sherrill <joel.sherrill at oarcorp.com>

	* check_bsp: Add more checks.

M    1.4  merge-helpers/ChangeLog
M    1.4  merge-helpers/check_bsp

diff -u rtems-testing/merge-helpers/ChangeLog:1.3 rtems-testing/merge-helpers/ChangeLog:1.4
--- rtems-testing/merge-helpers/ChangeLog:1.3	Thu Sep 10 14:42:35 2009
+++ rtems-testing/merge-helpers/ChangeLog	Sun Aug  8 09:52:23 2010
@@ -1,3 +1,7 @@
+2010-08-08	Joel Sherrill <joel.sherrill at oarcorp.com>
+
+	* check_bsp: Add more checks.
+
 2009-09-10	Joel Sherrill <joel.sherrill at oarcorp.com>
 
 	* check_bsp: Clean up check_bsp.

diff -u rtems-testing/merge-helpers/check_bsp:1.3 rtems-testing/merge-helpers/check_bsp:1.4
--- rtems-testing/merge-helpers/check_bsp:1.3	Thu Sep 10 14:42:35 2009
+++ rtems-testing/merge-helpers/check_bsp	Sun Aug  8 09:52:23 2010
@@ -33,11 +33,24 @@
   fi
   grep ${2} ${1} >/dev/null
   if [ $? -ne 0 ] ; then
-    echo NOT in ${bspdir}/${1}
+    echo "${2} is NOT in ${bspdir}/${1}"
   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 ${bspdir}/${FILE} - case independent check"
+  fi
+}
+
 test_its_NOT_there()
 {
   if [ $# -lt 2 ] ; then
@@ -47,9 +60,29 @@
   shift
   grep "${*}" ${FILE} >/dev/null
   if [ $? -eq 0 ] ; then
-    echo SHOULD NOT BE IN ${bspdir}/${FILE}
+    echo "(${*}) SHOULD NOT BE IN ${bspdir}/${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}
 }
 
 if [ -r configure.ac ] ; then
@@ -58,42 +91,77 @@
   test_its_there configure.ac RTEMS_BSP_CLEANUP_OPTIONS
 fi
 
+# 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 "${bspdir}/${FILE} has the following lines that are too long"
+    grep -n '.\{80,\}' ${f}
+  fi
+done
+
+# We want CVS Id strings everywhere possible
 # really need to make the copyright strings consistent in BSPs
 echo "=== Checking for copyright notices"
-find . -name "*.[chS]" | while read f
+find_source | while read f
 do
-  grep -i COPYRIGHT ${f} >/dev/null
-  if [ $? -ne 0 ] ; then
-    echo Copyright is NOT in ${bspdir}/${f}
-  fi
+  test_its_NOT_there_all_case ${f} COPYRIGHT
 done
 
 # We want CVS Id strings everywhere possible
 echo "=== Checking for CVS Id strings"
-find . -name "*.[chS]" -o -name "*.ac" -o -name "Makefile.am" | while read f
+find_source | while read f
 do
   test_its_there ${f} "\$Id"
 done
 
-# We do not want printf in a BSP
-echo "=== Checking for printf"
-find . -name "*.[chS]" -o -name "*.ac" -o -name "Makefile.am" | while read f
+# 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
-done
-
-# We do not want puts in a BSP
-echo "=== Checking for puts"
-find . -name "*.[chS]" -o -name "*.ac" -o -name "Makefile.am" | while read f
-do
   test_its_NOT_there ${f} puts
 done
 
 # We do not want the reformatted license notice
 echo "=== Checking for reformatted RTEMS license notices"
-find . -name "*.[chS]" -o -name "*.ac" -o -name "Makefile.am" | while read f
+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
+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
 exit 0


 *joel*:
2010-08-08	Joel Sherrill <joel.sherrill at oarcorp.com>

	* check_bsp: Add CVS Id and blanks at EOL.

M    1.5  merge-helpers/ChangeLog
M    1.5  merge-helpers/check_bsp

diff -u rtems-testing/merge-helpers/ChangeLog:1.4 rtems-testing/merge-helpers/ChangeLog:1.5
--- rtems-testing/merge-helpers/ChangeLog:1.4	Sun Aug  8 09:52:23 2010
+++ rtems-testing/merge-helpers/ChangeLog	Sun Aug  8 09:57:41 2010
@@ -1,5 +1,9 @@
 2010-08-08	Joel Sherrill <joel.sherrill at oarcorp.com>
 
+	* check_bsp: Add CVS Id and blanks at EOL.
+
+2010-08-08	Joel Sherrill <joel.sherrill at oarcorp.com>
+
 	* check_bsp: Add more checks.
 
 2009-09-10	Joel Sherrill <joel.sherrill at oarcorp.com>

diff -u rtems-testing/merge-helpers/check_bsp:1.4 rtems-testing/merge-helpers/check_bsp:1.5
--- rtems-testing/merge-helpers/check_bsp:1.4	Sun Aug  8 09:52:23 2010
+++ rtems-testing/merge-helpers/check_bsp	Sun Aug  8 09:57:41 2010
@@ -5,6 +5,9 @@
 #  Test for:
 #    - presense of BSP_BOOTCARD_OPTIONS
 #    - XXX
+#    - XXX
+#
+#  $Id$
 #
 
 if [ $# -ne 1 ] ; then
@@ -29,7 +32,7 @@
 test_its_there()
 {
   if [ $# -ne 2 ] ; then
-    echo Usage: $0 FILE pattern 
+    echo Usage: $0 FILE pattern
   fi
   grep ${2} ${1} >/dev/null
   if [ $? -ne 0 ] ; then
@@ -41,7 +44,7 @@
 test_its_NOT_there_all_case()
 {
   if [ $# -lt 2 ] ; then
-    echo Usage: $0 FILE pattern 
+    echo Usage: $0 FILE pattern
   fi
   FILE=$1
   shift
@@ -54,7 +57,7 @@
 test_its_NOT_there()
 {
   if [ $# -lt 2 ] ; then
-    echo Usage: $0 FILE pattern 
+    echo Usage: $0 FILE pattern
   fi
   FILE=$1
   shift



--

Generated by Deluxe Loginfo [http://www.codewiz.org/projects/index.html#loginfo] 2.122 by Bernardo Innocenti <bernie at develer.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/vc/attachments/20100808/583cd269/attachment.html>


More information about the vc mailing list