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