Print this page
12166 resync smatch to 0.6.1-rc1-il-3
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/tools/smatch/src/smatch_scripts/build_kernel_data.sh
+++ new/usr/src/tools/smatch/src/smatch_scripts/build_kernel_data.sh
1 1 #!/bin/bash
2 2
3 3 PROJECT=kernel
4 4
5 5 function usage {
6 6 echo
7 7 echo "Usage: $0"
8 8 echo "Updates the smatch_data/ directory and builds the smatch database"
9 9 echo
10 10 exit 1
11 11 }
12 12
13 13 if [ "$1" = "-h" ] || [ "$1" = "--help" ] ; then
14 14 usage;
15 15 fi
16 16
17 17 SCRIPT_DIR=$(dirname $0)
18 18 if [ -e $SCRIPT_DIR/../smatch -a -d kernel -a -d fs ] ; then
19 19 CMD=$SCRIPT_DIR/../smatch
20 20 DATA_DIR=$SCRIPT_DIR/../smatch_data
21 21 else
22 22 echo "This script should be located in the smatch_scripts/ subdirectory of the smatch source."
23 23 echo "It should be run from the root of a kernel source tree."
24 24 exit 1
25 25 fi
26 26
27 27 # If someone is building the database for the first time then make sure all the
28 28 # required packages are installed
↓ open down ↓ |
28 lines elided |
↑ open up ↑ |
29 29 if [ ! -e smatch_db.sqlite ] ; then
30 30 [ -e smatch_warns.txt ] || touch smatch_warns.txt
31 31 if ! $DATA_DIR/db/create_db.sh -p=kernel smatch_warns.txt ; then
32 32 echo "Hm... Not working. Make sure you have all the sqlite3 packages"
33 33 echo "And the sqlite3 libraries for Perl and Python"
34 34 exit 1
35 35 fi
36 36 fi
37 37
38 38 BUILD_STATUS=0
39 -$SCRIPT_DIR/test_kernel.sh --call-tree --info --param-mapper --spammy --data=$DATA_DIR || BUILD_STATUS=$?
39 +$SCRIPT_DIR/test_kernel.sh --call-tree --info --spammy --data=$DATA_DIR || BUILD_STATUS=$?
40 40
41 41 for i in $SCRIPT_DIR/gen_* ; do
42 42 $i smatch_warns.txt -p=kernel
43 43 done
44 44
45 45 mv ${PROJECT}.* $DATA_DIR
46 46
47 47 $DATA_DIR/db/create_db.sh -p=kernel smatch_warns.txt
48 48
49 49 exit $BUILD_STATUS
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX