Skip to content

Commit

Permalink
Print git info on test failure, for a particular test
Browse files Browse the repository at this point in the history
For one CPAN Tester[0], the 'fork-point and merge-base are different'
test fails with unexpected upstreams, and it's difficult to investigate
further without getting more information about the git version and its
config.

[0]: http://www.cpantesters.org/cpan/report/3c155e5c-5392-11ee-8fb6-04536e8775ea
  • Loading branch information
torbiak committed Oct 13, 2023
1 parent 37f0f4a commit 50ab875
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions t/implicit_upstream.t
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,13 @@ EOF
$ok &&= Util::repo_state_ok($repo, $topic, $wants);
}

# Help investigate an upstream mismatch that only happens for one CPAN
# Tester env.
if (!$ok) {
system('git version >&2');
system('PAGER= git config -l >&2');
}

ok($ok, $name);
};
if ($@) {
Expand Down

0 comments on commit 50ab875

Please sign in to comment.