]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Emit more clang scan information
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Tue, 12 Dec 2017 21:50:29 +0000 (21:50 +0000)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Tue, 12 Dec 2017 21:50:29 +0000 (21:50 +0000)
scripts/boiler.mk
scripts/travis/build.sh

index 0e32210be58756b03b23602c45a4aad5ea2fc4d4..d18106241116b750cf9fc57fe7ad8ede034cb548 100644 (file)
@@ -38,6 +38,17 @@ else
     Q=
 endif
 
+#
+#  If you want HTML output of the scanner to be rendered to the terminal:
+#
+#      $ ANALYZE_C_DUMP=1 make ... args ...
+#
+ifeq "${ANALYZE_C_DUMP}" ""
+    ANALYZE_C_DUMP=false
+else
+    ANALYZE_C_DUMP=true
+endif
+
 # ADD_CLEAN_RULE - Parameterized "function" that adds a new rule and phony
 #   target for cleaning the specified target (removing its build-generated
 #   files).
@@ -290,6 +301,7 @@ define ANALYZE_C_CMDS
        $(Q)$(ECHO) SCAN $<
        $(Q)$(strip ${ANALYZE.c} --analyze -Xanalyzer -analyzer-output=html -c $< -o $@ ${CPPFLAGS} \
            ${CFLAGS} ${SRC_CFLAGS} ${INCDIRS} $(addprefix -I,${SRC_INCDIRS}) ${SRC_DEFS} ${DEFS}) || (rm -f $@ && false)
+        $(Q)$(ANALYZE_C_DUMP) && which lynx > /dev/null && test -d $@ && lynx -width=200 -dump $@/*.html
        $(Q)touch $@
 endef
 
index efcc8b693f0ddb7607d1bac404a17aae9f05e722..3b707be0081d89735a7be606c65bd9d330e390d8 100755 (executable)
@@ -58,7 +58,7 @@ make -j8
 if [ "${COVERITY_SCAN_BRANCH}" != 1 -a "${CC}" = 'clang' ]; then
     echo "Starting clang scan"
     # Travis only has two cores
-    make -j2 scan && [ "$(find build/plist/ -name *.html)" = '' ];
+    ANALYZE_C_DUMP=1 make -j2 scan && [ "$(find build/plist/ -name *.html)" = '' ];
 fi
 
 #