Show diff when test.pl --gen-check detects unexpected autogeneration.
This will help track down autogeneration issues if they can't be reproduced locally.
@@ -520,7 +520,10 @@ eval
# Error when checking that files have already been generated but they change
if ($bGenCheck && @stryBuilt)
{
- confess &log(ERROR, "unexpected autogeneration of version in configure.ac script: " . join(', ', @stryBuilt));
+ confess &log(
+ ERROR,
+ "unexpected autogeneration of version in configure.ac script: " . join(', ', @stryBuilt) . ":\n" .
+ trim(executeTest("git -C ${strBackRestBase} diff")));
}
&log(INFO,
@@ -578,7 +581,10 @@ eval
# Error when checking that files have already been generated but they change
if ($bGenCheck && @stryBuilt)
{
- confess &log(ERROR, "unexpected autogeneration of configure script: " . join(', ', @stryBuilt));
+ confess &log(
+ ERROR,
+ "unexpected autogeneration of configure script: " . join(', ', @stryBuilt) . ":\n" .
+ trim(executeTest("git -C ${strBackRestBase} diff")));
}
&log(INFO, " autogenerated configure script: " . (@stryBuilt ? join(', ', @stryBuilt) : 'no changes'));
@@ -623,7 +629,10 @@ eval
# Error when checking that files have already been generated but they change
if ($bGenCheck && @stryBuilt)
{
- confess &log(ERROR, "unexpected autogeneration of C code: " . join(', ', @stryBuilt));
+ confess &log(
+ ERROR,
+ 'unexpected autogeneration of C code: ' . join(', ', @stryBuilt) . ":\n" .
+ trim(executeTest("git -C ${strBackRestBase} diff")));
}
&log(INFO, " autogenerated C code: " . (@stryBuilt ? join(', ', @stryBuilt) : 'no changes'));
