From 961a1d1e080c1835fe20f1746f877c947b37b30d Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Tue, 28 Feb 2012 16:51:31 +0300 Subject: [PATCH] new: smatch_scripts/build_kernel_data.sh Populates the smatch_data/ directory and builds the smatch database. Signed-off-by: Dan Carpenter --- smatch_scripts/build_kernel_data.sh | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 smatch_scripts/build_kernel_data.sh diff --git a/smatch_scripts/build_kernel_data.sh b/smatch_scripts/build_kernel_data.sh new file mode 100644 index 00000000..b49939b9 --- /dev/null +++ b/smatch_scripts/build_kernel_data.sh @@ -0,0 +1,35 @@ +#!/bin/bash + +PROJECT=kernel + +function usage { + echo + echo "Usage: $0" + echo "Updates the smatch_data/ directory and builds the smatch database" + echo + exit 1 +} + +if [ "$1" = "-h" ] || [ "$1" = "--help" ] ; then + usage; +fi + +SCRIPT_DIR=$(dirname $0) +if [ -e $SCRIPT_DIR/../smatch ] ; then + CMD=$SCRIPT_DIR/../smatch + DATA_DIR=$SCRIPT_DIR/../smatch_data +else + echo "This script should be run from the smatch_scripts/ directory." + exit 1 +fi + +$SCRIPT_DIR/test_kernel.sh --info --param-mapper --data=$DATA_DIR + +for i in $SCRIPT_DIR/gen_* ; do + $i warns.txt +done + +mv ${PROJECT}.* $DATA_DIR +mv no_return_funcs $DATA_DIR/${PROJECT}.no_return_funcs +$SCRIPT_DIR/db/create_db.sh warns.txt + -- 2.11.4.GIT