xref: /OK3568_Linux_fs/kernel/tools/testing/ktest/examples/include/tests.conf (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun#
2*4882a593Smuzhiyun# This is an example of various tests that you can run
3*4882a593Smuzhiyun#
4*4882a593Smuzhiyun# The variable TEST can be of boot, build, randconfig, or test.
5*4882a593Smuzhiyun#
6*4882a593Smuzhiyun# Note that TEST is a variable created with ':=' and only exists
7*4882a593Smuzhiyun# throughout the config processing (not during the tests itself).
8*4882a593Smuzhiyun#
9*4882a593Smuzhiyun# The TEST option (defined with '=') is used to tell ktest.pl
10*4882a593Smuzhiyun# what test to run after a successful boot. The TEST option is
11*4882a593Smuzhiyun# persistent into the test runs.
12*4882a593Smuzhiyun#
13*4882a593Smuzhiyun
14*4882a593Smuzhiyun# The config that includes this file may define a BOOT_TYPE
15*4882a593Smuzhiyun# variable that tells this config what type of boot test to run.
16*4882a593Smuzhiyun# If it's not defined, the below DEFAULTS will set the default
17*4882a593Smuzhiyun# to 'oldconfig'.
18*4882a593Smuzhiyun#
19*4882a593SmuzhiyunDEFAULTS IF NOT DEFINED BOOT_TYPE
20*4882a593SmuzhiyunBOOT_TYPE := oldconfig
21*4882a593Smuzhiyun
22*4882a593Smuzhiyun# The config that includes this file may define a RUN_TEST
23*4882a593Smuzhiyun# variable that will tell this config what test to run.
24*4882a593Smuzhiyun# (what to set the TEST option to).
25*4882a593Smuzhiyun#
26*4882a593SmuzhiyunDEFAULTS IF NOT DEFINED RUN_TEST
27*4882a593Smuzhiyun# Requires that hackbench is in the PATH
28*4882a593SmuzhiyunRUN_TEST := ${SSH} hackbench 50
29*4882a593Smuzhiyun
30*4882a593Smuzhiyun
31*4882a593Smuzhiyun# If TEST is set to 'boot' then just build a kernel and boot
32*4882a593Smuzhiyun# the target.
33*4882a593SmuzhiyunTEST_START IF ${TEST} == boot
34*4882a593SmuzhiyunTEST_TYPE = boot
35*4882a593Smuzhiyun# Notice how we set the BUILD_TYPE option to the BOOT_TYPE variable.
36*4882a593SmuzhiyunBUILD_TYPE = ${BOOT_TYPE}
37*4882a593Smuzhiyun# Do not do a make mrproper.
38*4882a593SmuzhiyunBUILD_NOCLEAN = 1
39*4882a593Smuzhiyun
40*4882a593Smuzhiyun# If you only want to build the kernel, and perhaps install
41*4882a593Smuzhiyun# and test it yourself, then just set TEST to build.
42*4882a593SmuzhiyunTEST_START IF ${TEST} == build
43*4882a593SmuzhiyunTEST_TYPE = build
44*4882a593SmuzhiyunBUILD_TYPE = ${BOOT_TYPE}
45*4882a593SmuzhiyunBUILD_NOCLEAN = 1
46*4882a593Smuzhiyun
47*4882a593Smuzhiyun# Build, install, boot and test with a randconfg 10 times.
48*4882a593Smuzhiyun# It is important that you have set MIN_CONFIG in the config
49*4882a593Smuzhiyun# that includes this file otherwise it is likely that the
50*4882a593Smuzhiyun# randconfig will not have the necessary configs needed to
51*4882a593Smuzhiyun# boot your box. This version of the test requires a min
52*4882a593Smuzhiyun# config that has enough to make sure the target has network
53*4882a593Smuzhiyun# working.
54*4882a593SmuzhiyunTEST_START ITERATE 10 IF ${TEST} == randconfig
55*4882a593SmuzhiyunMIN_CONFIG = ${CONFIG_DIR}/config-min-net
56*4882a593SmuzhiyunTEST_TYPE = test
57*4882a593SmuzhiyunBUILD_TYPE = randconfig
58*4882a593SmuzhiyunTEST = ${RUN_TEST}
59*4882a593Smuzhiyun
60*4882a593Smuzhiyun# This is the same as above, but only tests to a boot prompt.
61*4882a593Smuzhiyun# The MIN_CONFIG used here does not need to have networking
62*4882a593Smuzhiyun# working.
63*4882a593SmuzhiyunTEST_START ITERATE 10 IF ${TEST} == randconfig && ${MULTI}
64*4882a593SmuzhiyunTEST_TYPE = boot
65*4882a593SmuzhiyunBUILD_TYPE = randconfig
66*4882a593SmuzhiyunMIN_CONFIG = ${CONFIG_DIR}/config-min
67*4882a593SmuzhiyunMAKE_CMD = make
68*4882a593Smuzhiyun
69*4882a593Smuzhiyun# This builds, installs, boots and tests the target.
70*4882a593SmuzhiyunTEST_START IF ${TEST} == test
71*4882a593SmuzhiyunTEST_TYPE = test
72*4882a593SmuzhiyunBUILD_TYPE = ${BOOT_TYPE}
73*4882a593SmuzhiyunTEST = ${RUN_TEST}
74*4882a593SmuzhiyunBUILD_NOCLEAN = 1
75