source: rtems-testing/merge-helpers/check_bsp @ 3505500

4.11
Last change on this file since 3505500 was 3505500, checked in by Joel Sherrill <joel.sherrill@…>, on Sep 10, 2009 at 7:33:25 PM

2009-09-10 Joel Sherrill <joel.sherrill@…>

  • check_bsp: Fix comment.
  • Property mode set to 100755
File size: 1.4 KB
Line 
1#
2#  Script to test for various things we want in a BSP when it is
3#  submitted.
4#
5#  Test for:
6#    - presense of BSP_BOOTCARD_OPTIONS
7#    - XXX
8#
9
10if [ $# -ne 1 ] ; then
11  echo Usage: $0 BSPDIR
12  exit 1
13fi
14
15bspdir=${1}
16
17if [ ! -d ${bspdir} ] ; then
18  echo ${bspdir} is not a directory
19  exit 1
20fi
21
22cd ${bspdir}
23if [ $? -ne 0 ] ; then
24  echo Unable to cd to ${bspdir}
25  exit 1
26fi
27
28
29test_its_there()
30{
31  if [ $# -ne 2 ] ; then
32    echo Usage: $0 FILE pattern
33  fi
34  grep ${2} ${1} >/dev/null
35  if [ $? -ne 0 ] ; then
36    echo ${2} is NOT in ${bspdir}/${1}
37  fi
38
39}
40
41test_its_NOT_there()
42{
43  if [ $# -ne 2 ] ; then
44    echo Usage: $0 FILE pattern
45  fi
46  grep ${2} ${1} >/dev/null
47  if [ $? -eq 0 ] ; then
48    echo ${2} SHOULD NOT BE IN ${bspdir}/${1}
49  fi
50
51}
52
53test_its_there configure.ac RTEMS_BSP_BOOTCARD_OPTIONS
54test_its_there configure.ac RTEMS_BSP_CLEANUP_OPTIONS
55
56# really need to make the copyright strings consistent in BSPs
57find . -name "*.[chS]" | while read f
58do
59  grep -i COPYRIGHT ${f} >/dev/null
60  if [ $? -ne 0 ] ; then
61    echo Copyright is NOT in ${bspdir}/${f}
62  fi
63done
64
65# We want CVS Id strings everywhere possible
66find . -name "*.[chS]" -o -name "*.ac" -o -name "Makefile.am" | while read f
67do
68  test_its_there ${f} "\$Id"
69done
70
71# We do not want printf or puts in a BSP
72find . -name "*.[chS]" -o -name "*.ac" -o -name "Makefile.am" | while read f
73do
74  test_its_NOT_there ${f} printf
75  test_its_NOT_there ${f} puts
76done
77
Note: See TracBrowser for help on using the repository browser.