16d76f469SSteven Rostedt#
26d76f469SSteven Rostedt# This is an example of various tests that you can run
36d76f469SSteven Rostedt#
46d76f469SSteven Rostedt# The variable TEST can be of boot, build, randconfig, or test.
56d76f469SSteven Rostedt#
66d76f469SSteven Rostedt# Note that TEST is a variable created with ':=' and only exists
76d76f469SSteven Rostedt# throughout the config processing (not during the tests itself).
86d76f469SSteven Rostedt#
96d76f469SSteven Rostedt# The TEST option (defined with '=') is used to tell ktest.pl
106d76f469SSteven Rostedt# what test to run after a successful boot. The TEST option is
116d76f469SSteven Rostedt# persistent into the test runs.
126d76f469SSteven Rostedt#
136d76f469SSteven Rostedt
146d76f469SSteven Rostedt# The config that includes this file may define a BOOT_TYPE
156d76f469SSteven Rostedt# variable that tells this config what type of boot test to run.
166d76f469SSteven Rostedt# If it's not defined, the below DEFAULTS will set the default
176d76f469SSteven Rostedt# to 'oldconfig'.
186d76f469SSteven Rostedt#
196d76f469SSteven RostedtDEFAULTS IF NOT DEFINED BOOT_TYPE
206d76f469SSteven RostedtBOOT_TYPE := oldconfig
216d76f469SSteven Rostedt
226d76f469SSteven Rostedt# The config that includes this file may define a RUN_TEST
236d76f469SSteven Rostedt# variable that will tell this config what test to run.
246d76f469SSteven Rostedt# (what to set the TEST option to).
256d76f469SSteven Rostedt#
266d76f469SSteven RostedtDEFAULTS IF NOT DEFINED RUN_TEST
276d76f469SSteven Rostedt# Requires that hackbench is in the PATH
286d76f469SSteven RostedtRUN_TEST := ${SSH} hackbench 50
296d76f469SSteven Rostedt
306d76f469SSteven Rostedt
316d76f469SSteven Rostedt# If TEST is set to 'boot' then just build a kernel and boot
326d76f469SSteven Rostedt# the target.
336d76f469SSteven RostedtTEST_START IF ${TEST} == boot
346d76f469SSteven RostedtTEST_TYPE = boot
356d76f469SSteven Rostedt# Notice how we set the BUILD_TYPE option to the BOOT_TYPE variable.
366d76f469SSteven RostedtBUILD_TYPE = ${BOOT_TYPE}
376d76f469SSteven Rostedt# Do not do a make mrproper.
386d76f469SSteven RostedtBUILD_NOCLEAN = 1
396d76f469SSteven Rostedt
406d76f469SSteven Rostedt# If you only want to build the kernel, and perhaps install
416d76f469SSteven Rostedt# and test it yourself, then just set TEST to build.
426d76f469SSteven RostedtTEST_START IF ${TEST} == build
436d76f469SSteven RostedtTEST_TYPE = build
446d76f469SSteven RostedtBUILD_TYPE = ${BOOT_TYPE}
456d76f469SSteven RostedtBUILD_NOCLEAN = 1
466d76f469SSteven Rostedt
476d76f469SSteven Rostedt# Build, install, boot and test with a randconfg 10 times.
486d76f469SSteven Rostedt# It is important that you have set MIN_CONFIG in the config
496d76f469SSteven Rostedt# that includes this file otherwise it is likely that the
50ce8283d5SMasanari Iida# randconfig will not have the necessary configs needed to
516d76f469SSteven Rostedt# boot your box. This version of the test requires a min
526d76f469SSteven Rostedt# config that has enough to make sure the target has network
536d76f469SSteven Rostedt# working.
546d76f469SSteven RostedtTEST_START ITERATE 10 IF ${TEST} == randconfig
556d76f469SSteven RostedtMIN_CONFIG = ${CONFIG_DIR}/config-min-net
566d76f469SSteven RostedtTEST_TYPE = test
576d76f469SSteven RostedtBUILD_TYPE = randconfig
586d76f469SSteven RostedtTEST = ${RUN_TEST}
596d76f469SSteven Rostedt
606d76f469SSteven Rostedt# This is the same as above, but only tests to a boot prompt.
616d76f469SSteven Rostedt# The MIN_CONFIG used here does not need to have networking
626d76f469SSteven Rostedt# working.
636d76f469SSteven RostedtTEST_START ITERATE 10 IF ${TEST} == randconfig && ${MULTI}
646d76f469SSteven RostedtTEST_TYPE = boot
656d76f469SSteven RostedtBUILD_TYPE = randconfig
666d76f469SSteven RostedtMIN_CONFIG = ${CONFIG_DIR}/config-min
676d76f469SSteven RostedtMAKE_CMD = make
686d76f469SSteven Rostedt
696d76f469SSteven Rostedt# This builds, installs, boots and tests the target.
706d76f469SSteven RostedtTEST_START IF ${TEST} == test
716d76f469SSteven RostedtTEST_TYPE = test
726d76f469SSteven RostedtBUILD_TYPE = ${BOOT_TYPE}
736d76f469SSteven RostedtTEST = ${RUN_TEST}
746d76f469SSteven RostedtBUILD_NOCLEAN = 1
75