Path: blob/master/tools/testing/ktest/examples/include/patchcheck.conf
26299 views
# patchcheck.conf1#2# This contains a test that takes two git commits and will test each3# commit between the two. The build test will look at what files the4# commit has touched, and if any of those files produce a warning, then5# the build will fail.678# PATCH_START is the commit to begin with and PATCH_END is the commit9# to end with (inclusive). This is similar to doing a git rebase -i PATCH_START~110# and then testing each commit and doing a git rebase --continue.11# You can use a SHA1, a git tag, or anything that git will accept for a checkout1213PATCH_START := HEAD~314PATCH_END := HEAD1516# Use the oldconfig if build_type wasn't defined17DEFAULTS IF NOT DEFINED BUILD_TYPE18DO_BUILD_TYPE := oldconfig1920DEFAULTS ELSE21DO_BUILD_TYPE := ${BUILD_TYPE}2223DEFAULTS242526# Change PATCH_CHECKOUT to be the branch you want to test. The test will27# do a git checkout of this branch before starting. Obviously both28# PATCH_START and PATCH_END must be in this branch (and PATCH_START must29# be contained by PATCH_END).3031PATCH_CHECKOUT := test/branch3233# Usually it's a good idea to have a set config to use for testing individual34# patches.35PATCH_CONFIG := ${CONFIG_DIR}/config-patchcheck3637# Change PATCH_TEST to run some test for each patch. Each commit that is38# tested, after it is built and installed on the test machine, this command39# will be executed. Usually what is done is to ssh to the target box and40# run some test scripts. If you just want to boot test your patches41# comment PATCH_TEST out.42PATCH_TEST := ${SSH} "/usr/local/bin/ktest-test-script"4344DEFAULTS IF DEFINED PATCH_TEST45PATCH_TEST_TYPE := test4647DEFAULTS ELSE48PATCH_TEST_TYPE := boot4950# If for some reason a file has a warning that one of your patches touch51# but you do not care about it, set IGNORE_WARNINGS to that commit(s)52# (space delimited)53#IGNORE_WARNINGS = 39eaf7ef884dcc44f7ff1bac803ca2a1dcf43544 6edb2a8a385f0cdef51dae37ff23e74d76d8a6ce5455# Instead of just checking for warnings to files that are changed56# it can be advantageous to check for any new warnings. If a57# header file is changed, it could cause a warning in a file not58# touched by the commit. To detect these kinds of warnings, you59# can use the WARNINGS_FILE option.60#61# If the variable CREATE_WARNINGS_FILE is set, this config will62# enable the WARNINGS_FILE during the patchcheck test. Also,63# before running the patchcheck test, it will create the64# warnings file.65#66DEFAULTS IF DEFINED CREATE_WARNINGS_FILE67WARNINGS_FILE = ${OUTPUT_DIR}/warnings_file6869TEST_START IF DEFINED CREATE_WARNINGS_FILE70# WARNINGS_FILE is already set by the DEFAULTS above71TEST_TYPE = make_warnings_file72# Checkout the commit before the patches to test,73# and record all the warnings that exist before the patches74# to test are added75CHECKOUT = ${PATCHCHECK_START}~176# Force a full build77BUILD_NOCLEAN = 078BUILD_TYPE = ${DO_BUILD_TYPE}7980# If you are running a multi test, and the test failed on the first81# test but on, say the 5th patch. If you want to restart on the82# fifth patch, set PATCH_START1. This will make the first test start83# from this commit instead of the PATCH_START commit.84# Note, do not change this option. Just define PATCH_START1 in the85# top config (the one you pass to ktest.pl), and this will use it,86# otherwise it will just use PATCH_START if PATCH_START1 is not defined.87DEFAULTS IF NOT DEFINED PATCH_START188PATCH_START1 := ${PATCH_START}8990TEST_START IF ${TEST} == patchcheck91TEST_TYPE = patchcheck92MIN_CONFIG = ${PATCH_CONFIG}93TEST = ${PATCH_TEST}94PATCHCHECK_TYPE = ${PATCH_TEST_TYPE}95PATCHCHECK_START = ${PATCH_START1}96PATCHCHECK_END = ${PATCH_END}97CHECKOUT = ${PATCH_CHECKOUT}98BUILD_TYPE = ${DO_BUILD_TYPE}99100TEST_START IF ${TEST} == patchcheck && ${MULTI}101TEST_TYPE = patchcheck102MIN_CONFIG = ${PATCH_CONFIG}103TEST = ${PATCH_TEST}104PATCHCHECK_TYPE = ${PATCH_TEST_TYPE}105PATCHCHECK_START = ${PATCH_START}106PATCHCHECK_END = ${PATCH_END}107CHECKOUT = ${PATCH_CHECKOUT}108# Use multi to test different compilers?109MAKE_CMD = CC=gcc-4.5.1 make110BUILD_TYPE = ${DO_BUILD_TYPE}111112113