Bug 42764: Fix false positives caused by mixed filetypes in CI failure store
The ci-results repo stores all failures from a single test run as one
flat JSON array, regardless of whether they came from the pl, tt, or js
filetype pass. On the next incremental run, get_files_to_test('pl') reads
that entire list -- including any .tt failures -- and calls
remove_exceptions with the 'pl' context. Since .tt files only appear in
the tt exception list, they survive the filter and get codespell'd in the
pl pass where nothing is configured to exclude them.
The fix filters stored failures by filetype before applying exceptions,
so each pass only re-checks failures that belong to its own type.
Test plan:
1. Apply all patches
2. Add a file to the tt codespell exceptions in Koha::Devel::Files that
contains a word codespell would flag
3. Introduce a deliberate failure in another file so the ci-results repo
records the excepted .tt file as a previous failure
4. On the next incremental run, confirm the excepted .tt file is not
re-tested in the pl or js pass
5. prove xt/author/codespell.t
=> Tests pass; no false positives from cross-filetype re-checks
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
This commit is contained in:
parent
84536a08c9
commit
cc7c1aa157
|
|
@ -140,6 +140,7 @@ sub get_files_to_test {
|
|||
@koha_commit_history;
|
||||
if ($last_build_commit) {
|
||||
@files = @{ from_json( read_file("$self->{git_repo_dir}/$self->{test_dir}/$last_build_commit") ) };
|
||||
@files = grep { $dev_files->get_filetype($_) eq $filetype } @files;
|
||||
@files = $dev_files->remove_exceptions( \@files, $filetype );
|
||||
push @files, $dev_files->ls_files( $filetype, "$last_build_commit HEAD" );
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Reference in New Issue