162306a36Sopenharmony_ci# 262306a36Sopenharmony_ci# This example shows the bisect tests (git bisect and config bisect) 362306a36Sopenharmony_ci# 462306a36Sopenharmony_ci 562306a36Sopenharmony_ci 662306a36Sopenharmony_ci# The config that includes this file may define a RUN_TEST 762306a36Sopenharmony_ci# variable that will tell this config what test to run. 862306a36Sopenharmony_ci# (what to set the TEST option to). 962306a36Sopenharmony_ci# 1062306a36Sopenharmony_ciDEFAULTS IF NOT DEFINED RUN_TEST 1162306a36Sopenharmony_ci# Requires that hackbench is in the PATH 1262306a36Sopenharmony_ciRUN_TEST := ${SSH} hackbench 50 1362306a36Sopenharmony_ci 1462306a36Sopenharmony_ci 1562306a36Sopenharmony_ci# Set TEST to 'bisect' to do a normal git bisect. You need 1662306a36Sopenharmony_ci# to modify the options below to make it bisect the exact 1762306a36Sopenharmony_ci# commits you are interested in. 1862306a36Sopenharmony_ci# 1962306a36Sopenharmony_ciTEST_START IF ${TEST} == bisect 2062306a36Sopenharmony_ciTEST_TYPE = bisect 2162306a36Sopenharmony_ci# You must set the commit that was considered good (git bisect good) 2262306a36Sopenharmony_ciBISECT_GOOD = v3.3 2362306a36Sopenharmony_ci# You must set the commit that was considered bad (git bisect bad) 2462306a36Sopenharmony_ciBISECT_BAD = HEAD 2562306a36Sopenharmony_ci# It's best to specify the branch to checkout before starting the bisect. 2662306a36Sopenharmony_ciCHECKOUT = origin/master 2762306a36Sopenharmony_ci# This can be build, boot, or test. Here we are doing a bisect 2862306a36Sopenharmony_ci# that requires to run a test to know if the bisect was good or bad. 2962306a36Sopenharmony_ci# The test should exit with 0 on good, non-zero for bad. But see 3062306a36Sopenharmony_ci# the BISECT_RET_* options in samples.conf to override this. 3162306a36Sopenharmony_ciBISECT_TYPE = test 3262306a36Sopenharmony_ciTEST = ${RUN_TEST} 3362306a36Sopenharmony_ci# It is usually a good idea to confirm that the GOOD and the BAD 3462306a36Sopenharmony_ci# commits are truly good and bad respectively. Having BISECT_CHECK 3562306a36Sopenharmony_ci# set to 1 will check both that the good commit works and the bad 3662306a36Sopenharmony_ci# commit fails. If you only want to check one or the other, 3762306a36Sopenharmony_ci# set BISECT_CHECK to 'good' or to 'bad'. 3862306a36Sopenharmony_ciBISECT_CHECK = 1 3962306a36Sopenharmony_ci#BISECT_CHECK = good 4062306a36Sopenharmony_ci#BISECT_CHECK = bad 4162306a36Sopenharmony_ci 4262306a36Sopenharmony_ci# Usually it's a good idea to specify the exact config you 4362306a36Sopenharmony_ci# want to use throughout the entire bisect. Here we placed 4462306a36Sopenharmony_ci# it in the directory we called ktest.pl from and named it 4562306a36Sopenharmony_ci# 'config-bisect'. 4662306a36Sopenharmony_ciMIN_CONFIG = ${THIS_DIR}/config-bisect 4762306a36Sopenharmony_ci# By default, if we are doing a BISECT_TYPE = test run but the 4862306a36Sopenharmony_ci# build or boot fails, ktest.pl will do a 'git bisect skip'. 4962306a36Sopenharmony_ci# Uncomment the below option to make ktest stop testing on such 5062306a36Sopenharmony_ci# an error. 5162306a36Sopenharmony_ci#BISECT_SKIP = 0 5262306a36Sopenharmony_ci# Now if you had BISECT_SKIP = 0 and the test fails, you can 5362306a36Sopenharmony_ci# examine what happened and then do 'git bisect log > /tmp/replay' 5462306a36Sopenharmony_ci# Set BISECT_REPLAY to /tmp/replay and ktest.pl will run the 5562306a36Sopenharmony_ci# 'git bisect replay /tmp/replay' before continuing the bisect test. 5662306a36Sopenharmony_ci#BISECT_REPLAY = /tmp/replay 5762306a36Sopenharmony_ci# If you used BISECT_REPLAY after the bisect test failed, you may 5862306a36Sopenharmony_ci# not want to continue the bisect on that commit that failed. 5962306a36Sopenharmony_ci# By setting BISECT_START to a new commit. ktest.pl will checkout 6062306a36Sopenharmony_ci# that commit after it has performed the 'git bisect replay' but 6162306a36Sopenharmony_ci# before it continues running the bisect test. 6262306a36Sopenharmony_ci#BISECT_START = 2545eb6198e7e1ec50daa0cfc64a4cdfecf24ec9 6362306a36Sopenharmony_ci 6462306a36Sopenharmony_ci# Now if you don't trust ktest.pl to make the decisions for you, then 6562306a36Sopenharmony_ci# set BISECT_MANUAL to 1. This will cause ktest.pl not to decide 6662306a36Sopenharmony_ci# if the commit was good or bad. Instead, it will ask you to tell 6762306a36Sopenharmony_ci# it if the current commit was good. In the mean time, you could 6862306a36Sopenharmony_ci# take the result, load it on any machine you want. Run several tests, 6962306a36Sopenharmony_ci# or whatever you feel like. Then, when you are happy, you can tell 7062306a36Sopenharmony_ci# ktest if you think it was good or not and ktest.pl will continue 7162306a36Sopenharmony_ci# the git bisect. You can even change what commit it is currently at. 7262306a36Sopenharmony_ci#BISECT_MANUAL = 1 7362306a36Sopenharmony_ci 7462306a36Sopenharmony_ci 7562306a36Sopenharmony_ci# One of the unique tests that ktest does is the config bisect. 7662306a36Sopenharmony_ci# Currently (which hopefully will be fixed soon), the bad config 7762306a36Sopenharmony_ci# must be a superset of the good config. This is because it only 7862306a36Sopenharmony_ci# searches for a config that causes the target to fail. If the 7962306a36Sopenharmony_ci# good config is not a subset of the bad config, or if the target 8062306a36Sopenharmony_ci# fails because of a lack of a config, then it will not find 8162306a36Sopenharmony_ci# the config for you. 8262306a36Sopenharmony_ciTEST_START IF ${TEST} == config-bisect 8362306a36Sopenharmony_ciTEST_TYPE = config_bisect 8462306a36Sopenharmony_ci# set to build, boot, test 8562306a36Sopenharmony_ciCONFIG_BISECT_TYPE = boot 8662306a36Sopenharmony_ci# Set the config that is considered bad. 8762306a36Sopenharmony_ciCONFIG_BISECT = ${THIS_DIR}/config-bad 8862306a36Sopenharmony_ci# This config is optional. By default it uses the 8962306a36Sopenharmony_ci# MIN_CONFIG as the good config. 9062306a36Sopenharmony_ciCONFIG_BISECT_GOOD = ${THIS_DIR}/config-good 91