0001 # patchcheck.conf
0002 #
0003 # This contains a test that takes two git commits and will test each
0004 # commit between the two. The build test will look at what files the
0005 # commit has touched, and if any of those files produce a warning, then
0006 # the build will fail.
0007
0008
0009 # PATCH_START is the commit to begin with and PATCH_END is the commit
0010 # to end with (inclusive). This is similar to doing a git rebase -i PATCH_START~1
0011 # and then testing each commit and doing a git rebase --continue.
0012 # You can use a SHA1, a git tag, or anything that git will accept for a checkout
0013
0014 PATCH_START := HEAD~3
0015 PATCH_END := HEAD
0016
0017 # Use the oldconfig if build_type wasn't defined
0018 DEFAULTS IF NOT DEFINED BUILD_TYPE
0019 DO_BUILD_TYPE := oldconfig
0020
0021 DEFAULTS ELSE
0022 DO_BUILD_TYPE := ${BUILD_TYPE}
0023
0024 DEFAULTS
0025
0026
0027 # Change PATCH_CHECKOUT to be the branch you want to test. The test will
0028 # do a git checkout of this branch before starting. Obviously both
0029 # PATCH_START and PATCH_END must be in this branch (and PATCH_START must
0030 # be contained by PATCH_END).
0031
0032 PATCH_CHECKOUT := test/branch
0033
0034 # Usually it's a good idea to have a set config to use for testing individual
0035 # patches.
0036 PATCH_CONFIG := ${CONFIG_DIR}/config-patchcheck
0037
0038 # Change PATCH_TEST to run some test for each patch. Each commit that is
0039 # tested, after it is built and installed on the test machine, this command
0040 # will be executed. Usually what is done is to ssh to the target box and
0041 # run some test scripts. If you just want to boot test your patches
0042 # comment PATCH_TEST out.
0043 PATCH_TEST := ${SSH} "/usr/local/bin/ktest-test-script"
0044
0045 DEFAULTS IF DEFINED PATCH_TEST
0046 PATCH_TEST_TYPE := test
0047
0048 DEFAULTS ELSE
0049 PATCH_TEST_TYPE := boot
0050
0051 # If for some reason a file has a warning that one of your patches touch
0052 # but you do not care about it, set IGNORE_WARNINGS to that commit(s)
0053 # (space delimited)
0054 #IGNORE_WARNINGS = 39eaf7ef884dcc44f7ff1bac803ca2a1dcf43544 6edb2a8a385f0cdef51dae37ff23e74d76d8a6ce
0055
0056 # Instead of just checking for warnings to files that are changed
0057 # it can be advantageous to check for any new warnings. If a
0058 # header file is changed, it could cause a warning in a file not
0059 # touched by the commit. To detect these kinds of warnings, you
0060 # can use the WARNINGS_FILE option.
0061 #
0062 # If the variable CREATE_WARNINGS_FILE is set, this config will
0063 # enable the WARNINGS_FILE during the patchcheck test. Also,
0064 # before running the patchcheck test, it will create the
0065 # warnings file.
0066 #
0067 DEFAULTS IF DEFINED CREATE_WARNINGS_FILE
0068 WARNINGS_FILE = ${OUTPUT_DIR}/warnings_file
0069
0070 TEST_START IF DEFINED CREATE_WARNINGS_FILE
0071 # WARNINGS_FILE is already set by the DEFAULTS above
0072 TEST_TYPE = make_warnings_file
0073 # Checkout the commit before the patches to test,
0074 # and record all the warnings that exist before the patches
0075 # to test are added
0076 CHECKOUT = ${PATCHCHECK_START}~1
0077 # Force a full build
0078 BUILD_NOCLEAN = 0
0079 BUILD_TYPE = ${DO_BUILD_TYPE}
0080
0081 # If you are running a multi test, and the test failed on the first
0082 # test but on, say the 5th patch. If you want to restart on the
0083 # fifth patch, set PATCH_START1. This will make the first test start
0084 # from this commit instead of the PATCH_START commit.
0085 # Note, do not change this option. Just define PATCH_START1 in the
0086 # top config (the one you pass to ktest.pl), and this will use it,
0087 # otherwise it will just use PATCH_START if PATCH_START1 is not defined.
0088 DEFAULTS IF NOT DEFINED PATCH_START1
0089 PATCH_START1 := ${PATCH_START}
0090
0091 TEST_START IF ${TEST} == patchcheck
0092 TEST_TYPE = patchcheck
0093 MIN_CONFIG = ${PATCH_CONFIG}
0094 TEST = ${PATCH_TEST}
0095 PATCHCHECK_TYPE = ${PATCH_TEST_TYPE}
0096 PATCHCHECK_START = ${PATCH_START1}
0097 PATCHCHECK_END = ${PATCH_END}
0098 CHECKOUT = ${PATCH_CHECKOUT}
0099 BUILD_TYPE = ${DO_BUILD_TYPE}
0100
0101 TEST_START IF ${TEST} == patchcheck && ${MULTI}
0102 TEST_TYPE = patchcheck
0103 MIN_CONFIG = ${PATCH_CONFIG}
0104 TEST = ${PATCH_TEST}
0105 PATCHCHECK_TYPE = ${PATCH_TEST_TYPE}
0106 PATCHCHECK_START = ${PATCH_START}
0107 PATCHCHECK_END = ${PATCH_END}
0108 CHECKOUT = ${PATCH_CHECKOUT}
0109 # Use multi to test different compilers?
0110 MAKE_CMD = CC=gcc-4.5.1 make
0111 BUILD_TYPE = ${DO_BUILD_TYPE}