162306a36Sopenharmony_ci# 262306a36Sopenharmony_ci# This is an example of various tests that you can run 362306a36Sopenharmony_ci# 462306a36Sopenharmony_ci# The variable TEST can be of boot, build, randconfig, or test. 562306a36Sopenharmony_ci# 662306a36Sopenharmony_ci# Note that TEST is a variable created with ':=' and only exists 762306a36Sopenharmony_ci# throughout the config processing (not during the tests itself). 862306a36Sopenharmony_ci# 962306a36Sopenharmony_ci# The TEST option (defined with '=') is used to tell ktest.pl 1062306a36Sopenharmony_ci# what test to run after a successful boot. The TEST option is 1162306a36Sopenharmony_ci# persistent into the test runs. 1262306a36Sopenharmony_ci# 1362306a36Sopenharmony_ci 1462306a36Sopenharmony_ci# The config that includes this file may define a BOOT_TYPE 1562306a36Sopenharmony_ci# variable that tells this config what type of boot test to run. 1662306a36Sopenharmony_ci# If it's not defined, the below DEFAULTS will set the default 1762306a36Sopenharmony_ci# to 'oldconfig'. 1862306a36Sopenharmony_ci# 1962306a36Sopenharmony_ciDEFAULTS IF NOT DEFINED BOOT_TYPE 2062306a36Sopenharmony_ciBOOT_TYPE := oldconfig 2162306a36Sopenharmony_ci 2262306a36Sopenharmony_ci# The config that includes this file may define a RUN_TEST 2362306a36Sopenharmony_ci# variable that will tell this config what test to run. 2462306a36Sopenharmony_ci# (what to set the TEST option to). 2562306a36Sopenharmony_ci# 2662306a36Sopenharmony_ciDEFAULTS IF NOT DEFINED RUN_TEST 2762306a36Sopenharmony_ci# Requires that hackbench is in the PATH 2862306a36Sopenharmony_ciRUN_TEST := ${SSH} hackbench 50 2962306a36Sopenharmony_ci 3062306a36Sopenharmony_ci 3162306a36Sopenharmony_ci# If TEST is set to 'boot' then just build a kernel and boot 3262306a36Sopenharmony_ci# the target. 3362306a36Sopenharmony_ciTEST_START IF ${TEST} == boot 3462306a36Sopenharmony_ciTEST_TYPE = boot 3562306a36Sopenharmony_ci# Notice how we set the BUILD_TYPE option to the BOOT_TYPE variable. 3662306a36Sopenharmony_ciBUILD_TYPE = ${BOOT_TYPE} 3762306a36Sopenharmony_ci# Do not do a make mrproper. 3862306a36Sopenharmony_ciBUILD_NOCLEAN = 1 3962306a36Sopenharmony_ci 4062306a36Sopenharmony_ci# If you only want to build the kernel, and perhaps install 4162306a36Sopenharmony_ci# and test it yourself, then just set TEST to build. 4262306a36Sopenharmony_ciTEST_START IF ${TEST} == build 4362306a36Sopenharmony_ciTEST_TYPE = build 4462306a36Sopenharmony_ciBUILD_TYPE = ${BOOT_TYPE} 4562306a36Sopenharmony_ciBUILD_NOCLEAN = 1 4662306a36Sopenharmony_ci 4762306a36Sopenharmony_ci# Build, install, boot and test with a randconfg 10 times. 4862306a36Sopenharmony_ci# It is important that you have set MIN_CONFIG in the config 4962306a36Sopenharmony_ci# that includes this file otherwise it is likely that the 5062306a36Sopenharmony_ci# randconfig will not have the necessary configs needed to 5162306a36Sopenharmony_ci# boot your box. This version of the test requires a min 5262306a36Sopenharmony_ci# config that has enough to make sure the target has network 5362306a36Sopenharmony_ci# working. 5462306a36Sopenharmony_ciTEST_START ITERATE 10 IF ${TEST} == randconfig 5562306a36Sopenharmony_ciMIN_CONFIG = ${CONFIG_DIR}/config-min-net 5662306a36Sopenharmony_ciTEST_TYPE = test 5762306a36Sopenharmony_ciBUILD_TYPE = randconfig 5862306a36Sopenharmony_ciTEST = ${RUN_TEST} 5962306a36Sopenharmony_ci 6062306a36Sopenharmony_ci# This is the same as above, but only tests to a boot prompt. 6162306a36Sopenharmony_ci# The MIN_CONFIG used here does not need to have networking 6262306a36Sopenharmony_ci# working. 6362306a36Sopenharmony_ciTEST_START ITERATE 10 IF ${TEST} == randconfig && ${MULTI} 6462306a36Sopenharmony_ciTEST_TYPE = boot 6562306a36Sopenharmony_ciBUILD_TYPE = randconfig 6662306a36Sopenharmony_ciMIN_CONFIG = ${CONFIG_DIR}/config-min 6762306a36Sopenharmony_ciMAKE_CMD = make 6862306a36Sopenharmony_ci 6962306a36Sopenharmony_ci# This builds, installs, boots and tests the target. 7062306a36Sopenharmony_ciTEST_START IF ${TEST} == test 7162306a36Sopenharmony_ciTEST_TYPE = test 7262306a36Sopenharmony_ciBUILD_TYPE = ${BOOT_TYPE} 7362306a36Sopenharmony_ciTEST = ${RUN_TEST} 7462306a36Sopenharmony_ciBUILD_NOCLEAN = 1 75