patchcheck.conf 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. # patchcheck.conf
  2. #
  3. # This contains a test that takes two git commits and will test each
  4. # commit between the two. The build test will look at what files the
  5. # commit has touched, and if any of those files produce a warning, then
  6. # the build will fail.
  7. # PATCH_START is the commit to begin with and PATCH_END is the commit
  8. # to end with (inclusive). This is similar to doing a git rebase -i PATCH_START~1
  9. # and then testing each commit and doing a git rebase --continue.
  10. # You can use a SHA1, a git tag, or anything that git will accept for a checkout
  11. PATCH_START := HEAD~3
  12. PATCH_END := HEAD
  13. # Use the oldconfig if build_type wasn't defined
  14. DEFAULTS IF NOT DEFINED BUILD_TYPE
  15. DO_BUILD_TYPE := oldconfig
  16. DEFAULTS ELSE
  17. DO_BUILD_TYPE := ${BUILD_TYPE}
  18. DEFAULTS
  19. # Change PATCH_CHECKOUT to be the branch you want to test. The test will
  20. # do a git checkout of this branch before starting. Obviously both
  21. # PATCH_START and PATCH_END must be in this branch (and PATCH_START must
  22. # be contained by PATCH_END).
  23. PATCH_CHECKOUT := test/branch
  24. # Usually it's a good idea to have a set config to use for testing individual
  25. # patches.
  26. PATCH_CONFIG := ${CONFIG_DIR}/config-patchcheck
  27. # Change PATCH_TEST to run some test for each patch. Each commit that is
  28. # tested, after it is built and installed on the test machine, this command
  29. # will be executed. Usually what is done is to ssh to the target box and
  30. # run some test scripts. If you just want to boot test your patches
  31. # comment PATCH_TEST out.
  32. PATCH_TEST := ${SSH} "/usr/local/bin/ktest-test-script"
  33. DEFAULTS IF DEFINED PATCH_TEST
  34. PATCH_TEST_TYPE := test
  35. DEFAULTS ELSE
  36. PATCH_TEST_TYPE := boot
  37. # If for some reason a file has a warning that one of your patches touch
  38. # but you do not care about it, set IGNORE_WARNINGS to that commit(s)
  39. # (space delimited)
  40. #IGNORE_WARNINGS = 39eaf7ef884dcc44f7ff1bac803ca2a1dcf43544 6edb2a8a385f0cdef51dae37ff23e74d76d8a6ce
  41. # Instead of just checking for warnings to files that are changed
  42. # it can be advantageous to check for any new warnings. If a
  43. # header file is changed, it could cause a warning in a file not
  44. # touched by the commit. To detect these kinds of warnings, you
  45. # can use the WARNINGS_FILE option.
  46. #
  47. # If the variable CREATE_WARNINGS_FILE is set, this config will
  48. # enable the WARNINGS_FILE during the patchcheck test. Also,
  49. # before running the patchcheck test, it will create the
  50. # warnings file.
  51. #
  52. DEFAULTS IF DEFINED CREATE_WARNINGS_FILE
  53. WARNINGS_FILE = ${OUTPUT_DIR}/warnings_file
  54. TEST_START IF DEFINED CREATE_WARNINGS_FILE
  55. # WARNINGS_FILE is already set by the DEFAULTS above
  56. TEST_TYPE = make_warnings_file
  57. # Checkout the commit before the patches to test,
  58. # and record all the warnings that exist before the patches
  59. # to test are added
  60. CHECKOUT = ${PATCHCHECK_START}~1
  61. # Force a full build
  62. BUILD_NOCLEAN = 0
  63. BUILD_TYPE = ${DO_BUILD_TYPE}
  64. # If you are running a multi test, and the test failed on the first
  65. # test but on, say the 5th patch. If you want to restart on the
  66. # fifth patch, set PATCH_START1. This will make the first test start
  67. # from this commit instead of the PATCH_START commit.
  68. # Note, do not change this option. Just define PATCH_START1 in the
  69. # top config (the one you pass to ktest.pl), and this will use it,
  70. # otherwise it will just use PATCH_START if PATCH_START1 is not defined.
  71. DEFAULTS IF NOT DEFINED PATCH_START1
  72. PATCH_START1 := ${PATCH_START}
  73. TEST_START IF ${TEST} == patchcheck
  74. TEST_TYPE = patchcheck
  75. MIN_CONFIG = ${PATCH_CONFIG}
  76. TEST = ${PATCH_TEST}
  77. PATCHCHECK_TYPE = ${PATCH_TEST_TYPE}
  78. PATCHCHECK_START = ${PATCH_START1}
  79. PATCHCHECK_END = ${PATCH_END}
  80. CHECKOUT = ${PATCH_CHECKOUT}
  81. BUILD_TYPE = ${DO_BUILD_TYPE}
  82. TEST_START IF ${TEST} == patchcheck && ${MULTI}
  83. TEST_TYPE = patchcheck
  84. MIN_CONFIG = ${PATCH_CONFIG}
  85. TEST = ${PATCH_TEST}
  86. PATCHCHECK_TYPE = ${PATCH_TEST_TYPE}
  87. PATCHCHECK_START = ${PATCH_START}
  88. PATCHCHECK_END = ${PATCH_END}
  89. CHECKOUT = ${PATCH_CHECKOUT}
  90. # Use multi to test different compilers?
  91. MAKE_CMD = CC=gcc-4.5.1 make
  92. BUILD_TYPE = ${DO_BUILD_TYPE}