18c2ecf20Sopenharmony_ci#
28c2ecf20Sopenharmony_ci# This is an example of various tests that you can run
38c2ecf20Sopenharmony_ci#
48c2ecf20Sopenharmony_ci# The variable TEST can be of boot, build, randconfig, or test.
58c2ecf20Sopenharmony_ci#
68c2ecf20Sopenharmony_ci# Note that TEST is a variable created with ':=' and only exists
78c2ecf20Sopenharmony_ci# throughout the config processing (not during the tests itself).
88c2ecf20Sopenharmony_ci#
98c2ecf20Sopenharmony_ci# The TEST option (defined with '=') is used to tell ktest.pl
108c2ecf20Sopenharmony_ci# what test to run after a successful boot. The TEST option is
118c2ecf20Sopenharmony_ci# persistent into the test runs.
128c2ecf20Sopenharmony_ci#
138c2ecf20Sopenharmony_ci
148c2ecf20Sopenharmony_ci# The config that includes this file may define a BOOT_TYPE
158c2ecf20Sopenharmony_ci# variable that tells this config what type of boot test to run.
168c2ecf20Sopenharmony_ci# If it's not defined, the below DEFAULTS will set the default
178c2ecf20Sopenharmony_ci# to 'oldconfig'.
188c2ecf20Sopenharmony_ci#
198c2ecf20Sopenharmony_ciDEFAULTS IF NOT DEFINED BOOT_TYPE
208c2ecf20Sopenharmony_ciBOOT_TYPE := oldconfig
218c2ecf20Sopenharmony_ci
228c2ecf20Sopenharmony_ci# The config that includes this file may define a RUN_TEST
238c2ecf20Sopenharmony_ci# variable that will tell this config what test to run.
248c2ecf20Sopenharmony_ci# (what to set the TEST option to).
258c2ecf20Sopenharmony_ci#
268c2ecf20Sopenharmony_ciDEFAULTS IF NOT DEFINED RUN_TEST
278c2ecf20Sopenharmony_ci# Requires that hackbench is in the PATH
288c2ecf20Sopenharmony_ciRUN_TEST := ${SSH} hackbench 50
298c2ecf20Sopenharmony_ci
308c2ecf20Sopenharmony_ci
318c2ecf20Sopenharmony_ci# If TEST is set to 'boot' then just build a kernel and boot
328c2ecf20Sopenharmony_ci# the target.
338c2ecf20Sopenharmony_ciTEST_START IF ${TEST} == boot
348c2ecf20Sopenharmony_ciTEST_TYPE = boot
358c2ecf20Sopenharmony_ci# Notice how we set the BUILD_TYPE option to the BOOT_TYPE variable.
368c2ecf20Sopenharmony_ciBUILD_TYPE = ${BOOT_TYPE}
378c2ecf20Sopenharmony_ci# Do not do a make mrproper.
388c2ecf20Sopenharmony_ciBUILD_NOCLEAN = 1
398c2ecf20Sopenharmony_ci
408c2ecf20Sopenharmony_ci# If you only want to build the kernel, and perhaps install
418c2ecf20Sopenharmony_ci# and test it yourself, then just set TEST to build.
428c2ecf20Sopenharmony_ciTEST_START IF ${TEST} == build
438c2ecf20Sopenharmony_ciTEST_TYPE = build
448c2ecf20Sopenharmony_ciBUILD_TYPE = ${BOOT_TYPE}
458c2ecf20Sopenharmony_ciBUILD_NOCLEAN = 1
468c2ecf20Sopenharmony_ci
478c2ecf20Sopenharmony_ci# Build, install, boot and test with a randconfg 10 times.
488c2ecf20Sopenharmony_ci# It is important that you have set MIN_CONFIG in the config
498c2ecf20Sopenharmony_ci# that includes this file otherwise it is likely that the
508c2ecf20Sopenharmony_ci# randconfig will not have the necessary configs needed to
518c2ecf20Sopenharmony_ci# boot your box. This version of the test requires a min
528c2ecf20Sopenharmony_ci# config that has enough to make sure the target has network
538c2ecf20Sopenharmony_ci# working.
548c2ecf20Sopenharmony_ciTEST_START ITERATE 10 IF ${TEST} == randconfig
558c2ecf20Sopenharmony_ciMIN_CONFIG = ${CONFIG_DIR}/config-min-net
568c2ecf20Sopenharmony_ciTEST_TYPE = test
578c2ecf20Sopenharmony_ciBUILD_TYPE = randconfig
588c2ecf20Sopenharmony_ciTEST = ${RUN_TEST}
598c2ecf20Sopenharmony_ci
608c2ecf20Sopenharmony_ci# This is the same as above, but only tests to a boot prompt.
618c2ecf20Sopenharmony_ci# The MIN_CONFIG used here does not need to have networking
628c2ecf20Sopenharmony_ci# working.
638c2ecf20Sopenharmony_ciTEST_START ITERATE 10 IF ${TEST} == randconfig && ${MULTI}
648c2ecf20Sopenharmony_ciTEST_TYPE = boot
658c2ecf20Sopenharmony_ciBUILD_TYPE = randconfig
668c2ecf20Sopenharmony_ciMIN_CONFIG = ${CONFIG_DIR}/config-min
678c2ecf20Sopenharmony_ciMAKE_CMD = make
688c2ecf20Sopenharmony_ci
698c2ecf20Sopenharmony_ci# This builds, installs, boots and tests the target.
708c2ecf20Sopenharmony_ciTEST_START IF ${TEST} == test
718c2ecf20Sopenharmony_ciTEST_TYPE = test
728c2ecf20Sopenharmony_ciBUILD_TYPE = ${BOOT_TYPE}
738c2ecf20Sopenharmony_ciTEST = ${RUN_TEST}
748c2ecf20Sopenharmony_ciBUILD_NOCLEAN = 1
75