summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@kernel.org>2022-04-14 14:24:53 +0200
committerPetri Latvala <petri.latvala@intel.com>2022-04-14 18:19:39 +0300
commit66d0b15760b88aa58fcc02c1d178a1fc5b54f9ca (patch)
tree4687595316a73401545e50c5e2bf7f169a13e52d /scripts
parent0d704a35a3042e325d58b3d24ac91090f661deac (diff)
scripts/code_cov_gen_report: add support for filtering info files
Now that we have a script that allows filtering the results, add support for it when generating code coverage reports. Reviewed-by: Andrzej Hajda <andrzej.hajda@intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/code_cov_gen_report19
1 files changed, 19 insertions, 0 deletions
diff --git a/scripts/code_cov_gen_report b/scripts/code_cov_gen_report
index 05efebe1..b7c90b11 100755
--- a/scripts/code_cov_gen_report
+++ b/scripts/code_cov_gen_report
@@ -16,6 +16,8 @@ Usage:
$(basename $0)
--read <file or dir> --kernel-source <dir> --kernel-object <dir>
--output-dir <dir> [--info or --tar] [--force-override]
+ [--print] [--stat] [--ignore-unused] [--only-i915] [--only-drm]
+ [--show-files] [--func-filters <file>] [--source-filters <file>]
--kernel-object is only needed when Kernel was built with make O=dir
"
@@ -28,6 +30,7 @@ KSRC=
KOBJ=
DEST_DIR=
FORCE=
+PARSE_ARGS=
while [ "$1" != "" ]; do
case $1 in
@@ -69,6 +72,17 @@ while [ "$1" != "" ]; do
shift
fi
;;
+ --print|--stat|--ignore-unused|--only-i915|--only-drm|--show-files)
+ PARSE_ARGS="$PARSE_ARGS $1"
+ ;;
+ --func-filters|--source-filters)
+ if [ "$2" == "" ]; then
+ usage 1
+ else
+ PARSE_ARGS="$PARSE_ARGS $1 $2"
+ shift
+ fi
+ ;;
--force-override|-f)
FORCE=1
;;
@@ -166,5 +180,10 @@ else
fi
fi
+if [ "x$PARSE_ARGS" != "x" ]; then
+ ${SCRIPT_DIR}/$PARSE_INFO $PARSE_ARGS --output filtered_${TITLE}.info ${TITLE}.info
+ TITLE=filtered_${TITLE}
+fi
+
echo "Generating HTML files..."
genhtml -q ${TITLE}.info