diff options
author | Steven Rostedt <srostedt@redhat.com> | 2011-03-08 09:38:12 -0500 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2011-03-08 09:52:58 -0500 |
commit | 3410f6fd5e3e96de4b557a62b7a2fbf19d74b1cd (patch) | |
tree | f7f08bd88be72787b704d3d39d949e145e2097b9 /tools/testing | |
parent | c23dca7cd28eb1bf90053ce4ba30d65d22d2a81e (diff) |
ktest: Add BISECT_FILES to run git bisect on paths
Add the config option BISECT_FILES that allows the user to
specify what path in the kernel to run the git bisect on.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'tools/testing')
-rwxr-xr-x | tools/testing/ktest/ktest.pl | 9 | ||||
-rw-r--r-- | tools/testing/ktest/sample.conf | 9 |
2 files changed, 17 insertions, 1 deletions
diff --git a/tools/testing/ktest/ktest.pl b/tools/testing/ktest/ktest.pl index 0f62916a43f7..65c5c5515b47 100755 --- a/tools/testing/ktest/ktest.pl +++ b/tools/testing/ktest/ktest.pl | |||
@@ -1280,6 +1280,13 @@ sub bisect { | |||
1280 | my $type = $opt{"BISECT_TYPE[$i]"}; | 1280 | my $type = $opt{"BISECT_TYPE[$i]"}; |
1281 | my $start = $opt{"BISECT_START[$i]"}; | 1281 | my $start = $opt{"BISECT_START[$i]"}; |
1282 | my $replay = $opt{"BISECT_REPLAY[$i]"}; | 1282 | my $replay = $opt{"BISECT_REPLAY[$i]"}; |
1283 | my $start_files = $opt{"BISECT_FILES[$i]"}; | ||
1284 | |||
1285 | if (defined($start_files)) { | ||
1286 | $start_files = " -- " . $start_files; | ||
1287 | } else { | ||
1288 | $start_files = ""; | ||
1289 | } | ||
1283 | 1290 | ||
1284 | # convert to true sha1's | 1291 | # convert to true sha1's |
1285 | $good = get_sha1($good); | 1292 | $good = get_sha1($good); |
@@ -1333,7 +1340,7 @@ sub bisect { | |||
1333 | die "Failed to checkout $head"; | 1340 | die "Failed to checkout $head"; |
1334 | } | 1341 | } |
1335 | 1342 | ||
1336 | run_command "git bisect start" or | 1343 | run_command "git bisect start$start_files" or |
1337 | dodie "could not start bisect"; | 1344 | dodie "could not start bisect"; |
1338 | 1345 | ||
1339 | run_command "git bisect good $good" or | 1346 | run_command "git bisect good $good" or |
diff --git a/tools/testing/ktest/sample.conf b/tools/testing/ktest/sample.conf index 4c46b7ef8e46..4c83ae77926c 100644 --- a/tools/testing/ktest/sample.conf +++ b/tools/testing/ktest/sample.conf | |||
@@ -528,6 +528,15 @@ | |||
528 | # when something other than the BISECT_TYPE fails, ktest.pl will | 528 | # when something other than the BISECT_TYPE fails, ktest.pl will |
529 | # run "git bisect skip" and try again. | 529 | # run "git bisect skip" and try again. |
530 | # | 530 | # |
531 | # BISECT_FILES = <path> (optional, default undefined) | ||
532 | # | ||
533 | # To just run the git bisect on a specific path, set BISECT_FILES. | ||
534 | # For example: | ||
535 | # | ||
536 | # BISECT_FILES = arch/x86 kernel/time | ||
537 | # | ||
538 | # Will run the bisect with "git bisect start -- arch/x86 kernel/time" | ||
539 | # | ||
531 | # BISECT_REVERSE = 1 (optional, default 0) | 540 | # BISECT_REVERSE = 1 (optional, default 0) |
532 | # | 541 | # |
533 | # In those strange instances where it was broken forever | 542 | # In those strange instances where it was broken forever |