Last change
on this file since 2550 was 1508, checked in by Bruno Cornec, 17 years ago |
- Add scsi_transport_sas to SCSI_MODS for LSI SAS1064E on CentOS 5 (Brandon Poyner bpoyner_at_ccac.edu)
- Fix a bug on the MODULE variable and grep -F usage with spaces.
- Fix Virtual media usage (Patrick Albert)
- Also computes number of media for NFS backups
- Do not launch 64 bits versions if called with specific VMs
- Improve message around ISO directory (Patrick Albert and Bryan Gartner)
- Fix mondo mailing list archive link
- Ubuntu version is 6.06
|
-
Property svn:executable
set to
*
|
File size:
1.8 KB
|
Line | |
---|
1 | #!/bin/bash
|
---|
2 | #
|
---|
3 | # $Id$
|
---|
4 | #
|
---|
5 | # Mesures quality improvement of mondorescue project
|
---|
6 | #
|
---|
7 |
|
---|
8 | # Adapt to your needs
|
---|
9 | dname=`dirname $0`
|
---|
10 | prem=`echo $dname |cut -c1`
|
---|
11 | if [ ${prem} == "/" ]; then
|
---|
12 | export TOOLHOME=$dname
|
---|
13 | else
|
---|
14 | export TOOLHOME=${PWD}/$dname
|
---|
15 | fi
|
---|
16 |
|
---|
17 | d=$TOOLHOME/..
|
---|
18 |
|
---|
19 | if [ $# -gt 0 ]; then
|
---|
20 | if [ -d $1 ]; then
|
---|
21 | d=$1
|
---|
22 | fi
|
---|
23 | fi
|
---|
24 |
|
---|
25 | echo "Working on $d"
|
---|
26 | echo " "
|
---|
27 | cd $d
|
---|
28 |
|
---|
29 | # How many sprintf/strcat/strcpy vs asprintf are they
|
---|
30 | for s in asprintf mr_asprintf sprintf strcat strcpy strncpy malloc mr_malloc malloc_string fgets getline mr_getline MAX_STR_LEN getcwd goto free mr_free paranoid_free system paranoid_system mr_system; do
|
---|
31 | echo "monodrescue $s usage : "
|
---|
32 | tot=0
|
---|
33 | for i in `find . -name '*.c' -o -name '*.h' | egrep -v '\.svn|/\*|monitas|mindi-busybox' | xargs grep -r -c -w $s | egrep -v ":0$"`; do
|
---|
34 | echo " === $i"
|
---|
35 | ((tot=$tot+`echo $i | cut -d: -f2`))
|
---|
36 | done
|
---|
37 | echo "total $s usage : $tot"
|
---|
38 | done
|
---|
39 |
|
---|
40 | echo " "
|
---|
41 | echo "Qualimetry: "
|
---|
42 | find . -name '*.c' -o -name '*.h' | egrep -v '\.svn|/\*|monitas|/\*|mindi-busybox' | xargs grep -r asprintf | egrep -v '/\*' | egrep -v 'asprintf\(&' > /tmp/mondo.quality
|
---|
43 | cat /tmp/mondo.quality
|
---|
44 | echo "monodrescue uses : `cat /tmp/mondo.quality | wc -l` asprintf without &"
|
---|
45 | find . -name '*.c' -o -name '*.h' | egrep -v '\.svn|/\*|monitas|/\*|mindi-busybox' | xargs grep -r getline | egrep -v '/\*' | egrep -v 'getline\(&' > /tmp/mondo.quality
|
---|
46 | cat /tmp/mondo.quality
|
---|
47 | echo "monodrescue uses : `cat /tmp/mondo.quality | wc -l` getline without &"
|
---|
48 |
|
---|
49 | echo " "
|
---|
50 | echo "Splint: "
|
---|
51 | find . -name '*.c' -o -name '*.h' | xargs splint +posixlib -Dlinux -I$TOOLHOME/../mondo/src/include
|
---|
52 |
|
---|
53 | echo " "
|
---|
54 | echo "LoC: "
|
---|
55 | for i in `find . -name '*.c' -o -name '*.h' | egrep -v '\.svn|/\*|monitas|mindi-busybox' `; do
|
---|
56 | echo " === $i"
|
---|
57 | ((tot=$tot+`echo $i | cut -d: -f2`))
|
---|
58 | done
|
---|
59 | echo "total $s usage : $tot"
|
---|
60 | rm -f /tmp/mondo.quality
|
---|
Note:
See
TracBrowser
for help on using the repository browser.