Skip to content

Commit 28032e6

Browse files
committed
change tracker
1 parent 436455f commit 28032e6

File tree

12 files changed

+25
-7
lines changed

12 files changed

+25
-7
lines changed

src/bootstrap/src/core/build_steps/test.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1409,7 +1409,7 @@ impl Step for RustdocGUI {
14091409
/// (To run the tidy tool's internal tests, use the alias "tidyselftest" instead.)
14101410
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
14111411
pub struct Tidy {
1412-
is_for_rerunning_tests: IsForRerunningTests,
1412+
pub is_for_rerunning_tests: IsForRerunningTests,
14131413
}
14141414

14151415
impl Step for Tidy {

src/bootstrap/src/core/builder/tests.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ fn run_build(paths: &[PathBuf], config: Config) -> Cache {
3535
let kind = config.cmd.kind();
3636
let build = Build::new(config);
3737
let builder = Builder::new(&build);
38-
builder.run_step_descriptions(&Builder::get_step_descriptions(kind), paths);
38+
builder.run_step_descriptions(&Builder::get_step_descriptions(kind), paths, &[]);
3939
builder.cache
4040
}
4141

@@ -509,6 +509,7 @@ fn any_debug() {
509509
mod snapshot {
510510
use std::path::PathBuf;
511511

512+
use crate::core::build_steps::test::failed_tests::IsForRerunningTests;
512513
use crate::core::build_steps::{compile, dist, doc, test, tool};
513514
use crate::core::builder::tests::{
514515
RenderConfig, TEST_TRIPLE_1, TEST_TRIPLE_2, TEST_TRIPLE_3, configure, first, host_target,
@@ -2378,7 +2379,7 @@ mod snapshot {
23782379

23792380
let host = TargetSelection::from_user(&host_target());
23802381
steps.assert_contains(StepMetadata::test("compiletest-rustdoc-ui", host).stage(1));
2381-
steps.assert_not_contains(test::Tidy);
2382+
steps.assert_not_contains(test::Tidy { is_for_rerunning_tests: IsForRerunningTests::No });
23822383
}
23832384

23842385
#[test]
@@ -3238,7 +3239,7 @@ impl ConfigBuilder {
32383239
let kind = config.cmd.kind();
32393240
let build = Build::new(config);
32403241
let builder = Builder::new(&build);
3241-
builder.run_step_descriptions(&Builder::get_step_descriptions(kind), &builder.paths);
3242+
builder.run_step_descriptions(&Builder::get_step_descriptions(kind), &builder.paths, &[]);
32423243
builder.cache
32433244
}
32443245

src/bootstrap/src/core/config/config.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1440,8 +1440,8 @@ impl Config {
14401440
patch_binaries_for_nix: build_patch_binaries_for_nix,
14411441
path_modification_cache,
14421442
paths: flags_paths,
1443-
previously_failed_test_paths,
14441443
prefix: install_prefix.map(PathBuf::from),
1444+
previously_failed_test_paths,
14451445
print_step_rusage: build_print_step_rusage.unwrap_or(false),
14461446
print_step_timings: build_print_step_timings.unwrap_or(false),
14471447
profiler: build_profiler.unwrap_or(false),

src/bootstrap/src/utils/change_tracker.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -621,4 +621,9 @@ pub const CONFIG_CHANGE_HISTORY: &[ChangeInfo] = &[
621621
severity: ChangeSeverity::Info,
622622
summary: "`x.py` stopped accepting partial argument names. Use full names to avoid errors.",
623623
},
624+
ChangeInfo {
625+
change_id: 154586,
626+
severity: ChangeSeverity::Info,
627+
summary: "New option `build.record_failed_tests_path` to store failed tests when passing `--record`. These can be rerun with `--rerun`.",
628+
},
624629
];

src/etc/completions/x.fish

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,8 @@ complete -c x -n "__fish_x_using_subcommand test" -l rustfix-coverage -d 'enable
339339
complete -c x -n "__fish_x_using_subcommand test" -l no-capture -d 'don\'t capture stdout/stderr of tests'
340340
complete -c x -n "__fish_x_using_subcommand test" -l bypass-ignore-backends -d 'Ignore `//@ ignore-backends` directives'
341341
complete -c x -n "__fish_x_using_subcommand test" -l no-doc -d 'Deprecated. Use `--all-targets` or `--tests` instead'
342+
complete -c x -n "__fish_x_using_subcommand test" -l record -d 'Record all the failed tests in a file in the build directory'
343+
complete -c x -n "__fish_x_using_subcommand test" -l rerun -d 'Rerun tests that previously failed, and stored with `--record`'
342344
complete -c x -n "__fish_x_using_subcommand test" -s v -l verbose -d 'use verbose output (-vv for very verbose)'
343345
complete -c x -n "__fish_x_using_subcommand test" -s i -l incremental -d 'use incremental compilation'
344346
complete -c x -n "__fish_x_using_subcommand test" -l include-default-paths -d 'include default paths in addition to the provided ones'

src/etc/completions/x.ps1

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -386,6 +386,8 @@ Register-ArgumentCompleter -Native -CommandName 'x' -ScriptBlock {
386386
[CompletionResult]::new('--no-capture', '--no-capture', [CompletionResultType]::ParameterName, 'don''t capture stdout/stderr of tests')
387387
[CompletionResult]::new('--bypass-ignore-backends', '--bypass-ignore-backends', [CompletionResultType]::ParameterName, 'Ignore `//@ ignore-backends` directives')
388388
[CompletionResult]::new('--no-doc', '--no-doc', [CompletionResultType]::ParameterName, 'Deprecated. Use `--all-targets` or `--tests` instead')
389+
[CompletionResult]::new('--record', '--record', [CompletionResultType]::ParameterName, 'Record all the failed tests in a file in the build directory')
390+
[CompletionResult]::new('--rerun', '--rerun', [CompletionResultType]::ParameterName, 'Rerun tests that previously failed, and stored with `--record`')
389391
[CompletionResult]::new('-v', '-v', [CompletionResultType]::ParameterName, 'use verbose output (-vv for very verbose)')
390392
[CompletionResult]::new('--verbose', '--verbose', [CompletionResultType]::ParameterName, 'use verbose output (-vv for very verbose)')
391393
[CompletionResult]::new('-i', '-i', [CompletionResultType]::ParameterName, 'use incremental compilation')

src/etc/completions/x.py.fish

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -339,6 +339,8 @@ complete -c x.py -n "__fish_x.py_using_subcommand test" -l rustfix-coverage -d '
339339
complete -c x.py -n "__fish_x.py_using_subcommand test" -l no-capture -d 'don\'t capture stdout/stderr of tests'
340340
complete -c x.py -n "__fish_x.py_using_subcommand test" -l bypass-ignore-backends -d 'Ignore `//@ ignore-backends` directives'
341341
complete -c x.py -n "__fish_x.py_using_subcommand test" -l no-doc -d 'Deprecated. Use `--all-targets` or `--tests` instead'
342+
complete -c x.py -n "__fish_x.py_using_subcommand test" -l record -d 'Record all the failed tests in a file in the build directory'
343+
complete -c x.py -n "__fish_x.py_using_subcommand test" -l rerun -d 'Rerun tests that previously failed, and stored with `--record`'
342344
complete -c x.py -n "__fish_x.py_using_subcommand test" -s v -l verbose -d 'use verbose output (-vv for very verbose)'
343345
complete -c x.py -n "__fish_x.py_using_subcommand test" -s i -l incremental -d 'use incremental compilation'
344346
complete -c x.py -n "__fish_x.py_using_subcommand test" -l include-default-paths -d 'include default paths in addition to the provided ones'

src/etc/completions/x.py.ps1

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -386,6 +386,8 @@ Register-ArgumentCompleter -Native -CommandName 'x.py' -ScriptBlock {
386386
[CompletionResult]::new('--no-capture', '--no-capture', [CompletionResultType]::ParameterName, 'don''t capture stdout/stderr of tests')
387387
[CompletionResult]::new('--bypass-ignore-backends', '--bypass-ignore-backends', [CompletionResultType]::ParameterName, 'Ignore `//@ ignore-backends` directives')
388388
[CompletionResult]::new('--no-doc', '--no-doc', [CompletionResultType]::ParameterName, 'Deprecated. Use `--all-targets` or `--tests` instead')
389+
[CompletionResult]::new('--record', '--record', [CompletionResultType]::ParameterName, 'Record all the failed tests in a file in the build directory')
390+
[CompletionResult]::new('--rerun', '--rerun', [CompletionResultType]::ParameterName, 'Rerun tests that previously failed, and stored with `--record`')
389391
[CompletionResult]::new('-v', '-v', [CompletionResultType]::ParameterName, 'use verbose output (-vv for very verbose)')
390392
[CompletionResult]::new('--verbose', '--verbose', [CompletionResultType]::ParameterName, 'use verbose output (-vv for very verbose)')
391393
[CompletionResult]::new('-i', '-i', [CompletionResultType]::ParameterName, 'use incremental compilation')

src/etc/completions/x.py.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3875,7 +3875,7 @@ _x.py() {
38753875
return 0
38763876
;;
38773877
x.py__test)
3878-
opts="-v -i -j -h --no-fail-fast --test-args --compiletest-rustc-args --all-targets --doc --tests --bless --extra-checks --force-rerun --only-modified --compare-mode --pass --run --rustfix-coverage --no-capture --test-codegen-backend --bypass-ignore-backends --no-doc --verbose --incremental --config --build-dir --build --host --target --exclude --skip --include-default-paths --rustc-error-format --on-fail --dry-run --dump-bootstrap-shims --stage --keep-stage --keep-stage-std --src --jobs --warnings --json-output --compile-time-deps --color --bypass-bootstrap-lock --rust-profile-generate --rust-profile-use --llvm-profile-use --llvm-profile-generate --enable-bolt-settings --skip-stage0-validation --reproducible-artifact --set --ci --skip-std-check-if-no-download-rustc --help [PATHS]... [ARGS]..."
3878+
opts="-v -i -j -h --no-fail-fast --test-args --compiletest-rustc-args --all-targets --doc --tests --bless --extra-checks --force-rerun --only-modified --compare-mode --pass --run --rustfix-coverage --no-capture --test-codegen-backend --bypass-ignore-backends --no-doc --record --rerun --verbose --incremental --config --build-dir --build --host --target --exclude --skip --include-default-paths --rustc-error-format --on-fail --dry-run --dump-bootstrap-shims --stage --keep-stage --keep-stage-std --src --jobs --warnings --json-output --compile-time-deps --color --bypass-bootstrap-lock --rust-profile-generate --rust-profile-use --llvm-profile-use --llvm-profile-generate --enable-bolt-settings --skip-stage0-validation --reproducible-artifact --set --ci --skip-std-check-if-no-download-rustc --help [PATHS]... [ARGS]..."
38793879
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
38803880
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
38813881
return 0

src/etc/completions/x.py.zsh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -386,6 +386,8 @@ _arguments "${_arguments_options[@]}" : \
386386
'--no-capture[don'\''t capture stdout/stderr of tests]' \
387387
'--bypass-ignore-backends[Ignore \`//@ ignore-backends\` directives]' \
388388
'--no-doc[Deprecated. Use \`--all-targets\` or \`--tests\` instead]' \
389+
'--record[Record all the failed tests in a file in the build directory]' \
390+
'--rerun[Rerun tests that previously failed, and stored with \`--record\`]' \
389391
'*-v[use verbose output (-vv for very verbose)]' \
390392
'*--verbose[use verbose output (-vv for very verbose)]' \
391393
'-i[use incremental compilation]' \

0 commit comments

Comments
 (0)