0001 #
0002 # This is an example of various tests that you can run
0003 #
0004 # The variable TEST can be of boot, build, randconfig, or test.
0005 #
0006 # Note that TEST is a variable created with ':=' and only exists
0007 # throughout the config processing (not during the tests itself).
0008 #
0009 # The TEST option (defined with '=') is used to tell ktest.pl
0010 # what test to run after a successful boot. The TEST option is
0011 # persistent into the test runs.
0012 #
0013
0014 # The config that includes this file may define a BOOT_TYPE
0015 # variable that tells this config what type of boot test to run.
0016 # If it's not defined, the below DEFAULTS will set the default
0017 # to 'oldconfig'.
0018 #
0019 DEFAULTS IF NOT DEFINED BOOT_TYPE
0020 BOOT_TYPE := oldconfig
0021
0022 # The config that includes this file may define a RUN_TEST
0023 # variable that will tell this config what test to run.
0024 # (what to set the TEST option to).
0025 #
0026 DEFAULTS IF NOT DEFINED RUN_TEST
0027 # Requires that hackbench is in the PATH
0028 RUN_TEST := ${SSH} hackbench 50
0029
0030
0031 # If TEST is set to 'boot' then just build a kernel and boot
0032 # the target.
0033 TEST_START IF ${TEST} == boot
0034 TEST_TYPE = boot
0035 # Notice how we set the BUILD_TYPE option to the BOOT_TYPE variable.
0036 BUILD_TYPE = ${BOOT_TYPE}
0037 # Do not do a make mrproper.
0038 BUILD_NOCLEAN = 1
0039
0040 # If you only want to build the kernel, and perhaps install
0041 # and test it yourself, then just set TEST to build.
0042 TEST_START IF ${TEST} == build
0043 TEST_TYPE = build
0044 BUILD_TYPE = ${BOOT_TYPE}
0045 BUILD_NOCLEAN = 1
0046
0047 # Build, install, boot and test with a randconfg 10 times.
0048 # It is important that you have set MIN_CONFIG in the config
0049 # that includes this file otherwise it is likely that the
0050 # randconfig will not have the necessary configs needed to
0051 # boot your box. This version of the test requires a min
0052 # config that has enough to make sure the target has network
0053 # working.
0054 TEST_START ITERATE 10 IF ${TEST} == randconfig
0055 MIN_CONFIG = ${CONFIG_DIR}/config-min-net
0056 TEST_TYPE = test
0057 BUILD_TYPE = randconfig
0058 TEST = ${RUN_TEST}
0059
0060 # This is the same as above, but only tests to a boot prompt.
0061 # The MIN_CONFIG used here does not need to have networking
0062 # working.
0063 TEST_START ITERATE 10 IF ${TEST} == randconfig && ${MULTI}
0064 TEST_TYPE = boot
0065 BUILD_TYPE = randconfig
0066 MIN_CONFIG = ${CONFIG_DIR}/config-min
0067 MAKE_CMD = make
0068
0069 # This builds, installs, boots and tests the target.
0070 TEST_START IF ${TEST} == test
0071 TEST_TYPE = test
0072 BUILD_TYPE = ${BOOT_TYPE}
0073 TEST = ${RUN_TEST}
0074 BUILD_NOCLEAN = 1