Branch: refs/heads/blead
  Home:   https://github.com/Perl/perl5
  Commit: 938df7bd54133016aa8627c69d8380a1742b25da
      
https://github.com/Perl/perl5/commit/938df7bd54133016aa8627c69d8380a1742b25da
  Author: Yves Orton <demer...@gmail.com>
  Date:   2023-03-17 (Fri, 17 Mar 2023)

  Changed paths:
    M t/test.pl
    M t/test_pl/can_isa_ok.t
    M t/test_pl/plan_skip_all.t
    M t/test_pl/tempfile.t

  Log Message:
  -----------
  test_pl tests - we have not been testing test.pl for some time, fix tests

Somewhere along the way we stopped testing test.pl itself. This fixes
that oversight, and repairs the tests to accomodate some of the changes
that should have been noticed.

This includes hardening the tests for Win32, which does not allow unlinking
a file that is open.


  Commit: 508a94b63cac0897fed26cb5972a13b2e974ee8c
      
https://github.com/Perl/perl5/commit/508a94b63cac0897fed26cb5972a13b2e974ee8c
  Author: Yves Orton <demer...@gmail.com>
  Date:   2023-03-17 (Fri, 17 Mar 2023)

  Changed paths:
    M t/TEST
    M t/harness

  Log Message:
  -----------
  t/harness - die if t/harness wont run a test listed in MANIFEST

Historically we used to parse out the tests that we ran in t/harness
from the MANIFEST file.  At some point this changed and we started
consulting the disk using globs.  However because we do not use a
recursive search over the t/ directory it is quite possible that a new
directory of tests is added which actually never runs.

In https://github.com/Perl/perl5/pull/20637#discussion_r1137878155 Tony
C noticed that I had added a new test file t/op/hook/require.t which is
in a new subdirectory t/op/hook/ which was unknown to t/harness and thus
not actually being run by make test_harness.  (This patch does NOT add
t/op/hoop to the list of directories to scan, I will do that in the PR.)

I then took the time to add code to detect if any other test files are
not being run, and it turns out that it is also the case for the new
t/class/ directory of tests and it is also the case for the tests for
test.pl itself, found in the t/test_pl directory.

This patch adds logic to detect if this happens and make t/harness die
if it finds a test file in the manifest which will not be detected by
the custom rules for finding test files that is used in t/harness.  It
does not die if t/harness finds tests that are not in MANIFEST, that
should be detected by a different test.

The level of complexity in finding and deciding the tests files that we
should run, and the differences between t/TEST and t/harness is fairly
high.  In the past Nicholas put some effort into unifying the logic, but
it seems since then we have drifted apart.  Even though t/harness uses
t/TEST and the _tests_from_manifest() function, for some time now it
has only used it to find which extensions to test, not which test
files to run.  I have *NOT* dug into whether t/TEST is also missing
test files that are in manifest.  That can happen in a follow up patch.

Long term we should unify all of this logic so that t/TEST and t/harness
run the same test files always, and that we will always detect
discrepancies between the MANIFEST and the tests we are running.  We do
not for instance test that they test the same things. :-) :-(


Compare: https://github.com/Perl/perl5/compare/801c406dcd5a...508a94b63cac

Reply via email to