aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/ktest/examples
diff options
context:
space:
mode:
authorSteven Rostedt (Red Hat) <rostedt@goodmis.org>2013-01-30 18:37:47 -0500
committerSteven Rostedt <rostedt@goodmis.org>2013-01-31 10:24:56 -0500
commit4283b169abfb0380850b56287ee644697ecf321a (patch)
treefb7bd9ab621a17d2e566b8f6e65dded09a4ad78c /tools/testing/ktest/examples
parent04262be3db53d2b77ec09fa3e4d18313b6b9dcf9 (diff)
ktest: Add make_warnings_file and process full warnings
Although the patchcheck test checks for warnings in the files that were changed, this check does not catch warnings that were caused by header file changes and the warnings appear in C files not touched by the commit. Add a new option called WARNINGS_FILE. If this option is set, then the file it points to is read before bulid, and the file should contain a list of known warnings. If a warning appears in the build, this file is checked, and if the warning does not exist in this file, then it fails the build showing the new warning. If the WARNINGS_FILE points to a file that does not exist, this will cause any warning in the build to fail. A new test is also added called "make_warnings_file". This test will create do a build and record any warnings it finds into the WARNINGS_FILE. This test is something that can be run before other tests to build a warnings file of "known warnings", ie, warnings that were there before your changes. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'tools/testing/ktest/examples')
-rw-r--r--tools/testing/ktest/examples/include/patchcheck.conf37
1 files changed, 37 insertions, 0 deletions
diff --git a/tools/testing/ktest/examples/include/patchcheck.conf b/tools/testing/ktest/examples/include/patchcheck.conf
index 339d3e1700ff..0eb0a5ac77da 100644
--- a/tools/testing/ktest/examples/include/patchcheck.conf
+++ b/tools/testing/ktest/examples/include/patchcheck.conf
@@ -14,6 +14,16 @@
14PATCH_START := HEAD~3 14PATCH_START := HEAD~3
15PATCH_END := HEAD 15PATCH_END := HEAD
16 16
17# Use the oldconfig if build_type wasn't defined
18DEFAULTS IF NOT DEFINED BUILD_TYPE
19DO_BUILD_TYPE := oldconfig
20
21DEFAULTS ELSE
22DO_BUILD_TYPE := ${BUILD_TYPE}
23
24DEFAULTS
25
26
17# Change PATCH_CHECKOUT to be the branch you want to test. The test will 27# Change PATCH_CHECKOUT to be the branch you want to test. The test will
18# do a git checkout of this branch before starting. Obviously both 28# do a git checkout of this branch before starting. Obviously both
19# PATCH_START and PATCH_END must be in this branch (and PATCH_START must 29# PATCH_START and PATCH_END must be in this branch (and PATCH_START must
@@ -43,6 +53,31 @@ PATCH_TEST_TYPE := boot
43# (space delimited) 53# (space delimited)
44#IGNORE_WARNINGS = 39eaf7ef884dcc44f7ff1bac803ca2a1dcf43544 6edb2a8a385f0cdef51dae37ff23e74d76d8a6ce 54#IGNORE_WARNINGS = 39eaf7ef884dcc44f7ff1bac803ca2a1dcf43544 6edb2a8a385f0cdef51dae37ff23e74d76d8a6ce
45 55
56# Instead of just checking for warnings to files that are changed
57# it can be advantageous to check for any new warnings. If a
58# header file is changed, it could cause a warning in a file not
59# touched by the commit. To detect these kinds of warnings, you
60# can use the WARNINGS_FILE option.
61#
62# If the variable CREATE_WARNINGS_FILE is set, this config will
63# enable the WARNINGS_FILE during the patchcheck test. Also,
64# before running the patchcheck test, it will create the
65# warnings file.
66#
67DEFAULTS IF DEFINED CREATE_WARNINGS_FILE
68WARNINGS_FILE = ${OUTPUT_DIR}/warnings_file
69
70TEST_START IF DEFINED CREATE_WARNINGS_FILE
71# WARNINGS_FILE is already set by the DEFAULTS above
72TEST_TYPE = make_warnings_file
73# Checkout the commit before the patches to test,
74# and record all the warnings that exist before the patches
75# to test are added
76CHECKOUT = ${PATCHCHECK_START}~1
77# Force a full build
78BUILD_NOCLEAN = 0
79BUILD_TYPE = ${DO_BUILD_TYPE}
80
46# If you are running a multi test, and the test failed on the first 81# If you are running a multi test, and the test failed on the first
47# test but on, say the 5th patch. If you want to restart on the 82# test but on, say the 5th patch. If you want to restart on the
48# fifth patch, set PATCH_START1. This will make the first test start 83# fifth patch, set PATCH_START1. This will make the first test start
@@ -61,6 +96,7 @@ PATCHCHECK_TYPE = ${PATCH_TEST_TYPE}
61PATCHCHECK_START = ${PATCH_START1} 96PATCHCHECK_START = ${PATCH_START1}
62PATCHCHECK_END = ${PATCH_END} 97PATCHCHECK_END = ${PATCH_END}
63CHECKOUT = ${PATCH_CHECKOUT} 98CHECKOUT = ${PATCH_CHECKOUT}
99BUILD_TYPE = ${DO_BUILD_TYPE}
64 100
65TEST_START IF ${TEST} == patchcheck && ${MULTI} 101TEST_START IF ${TEST} == patchcheck && ${MULTI}
66TEST_TYPE = patchcheck 102TEST_TYPE = patchcheck
@@ -72,3 +108,4 @@ PATCHCHECK_END = ${PATCH_END}
72CHECKOUT = ${PATCH_CHECKOUT} 108CHECKOUT = ${PATCH_CHECKOUT}
73# Use multi to test different compilers? 109# Use multi to test different compilers?
74MAKE_CMD = CC=gcc-4.5.1 make 110MAKE_CMD = CC=gcc-4.5.1 make
111BUILD_TYPE = ${DO_BUILD_TYPE}