diff --git a/build/lib/pgBackRestBuild/Config/Data.pm b/build/lib/pgBackRestBuild/Config/Data.pm
index c844aee37..ad6010b77 100644
--- a/build/lib/pgBackRestBuild/Config/Data.pm
+++ b/build/lib/pgBackRestBuild/Config/Data.pm
@@ -41,6 +41,10 @@
#
# CFGDEF_ALLOW_LIST:
# Lists the allowable settings for the option.
+#
+# CFGDEF_INTERNAL:
+# Option is used by the command internally but is not exposed in the documentation. This is useful for commands that need to know
+# where they are running by looking at other options in the config. Also good for test options.
####################################################################################################################################
package pgBackRestBuild::Config::Data;
@@ -423,6 +427,8 @@ use constant CFGDEF_INDEX => 'index';
push @EXPORT, qw(CFGDEF_INDEX);
use constant CFGDEF_INDEX_TOTAL => 'indexTotal';
push @EXPORT, qw(CFGDEF_INDEX_TOTAL);
+use constant CFGDEF_INTERNAL => 'internal';
+ push @EXPORT, qw(CFGDEF_INTERNAL);
use constant CFGDEF_NEGATE => 'negate';
push @EXPORT, qw(CFGDEF_NEGATE);
use constant CFGDEF_PREFIX => 'prefix';
@@ -798,6 +804,7 @@ my %hConfigDefine =
&CFGOPT_TEST =>
{
&CFGDEF_TYPE => CFGDEF_TYPE_BOOLEAN,
+ &CFGDEF_INTERNAL => true,
&CFGDEF_DEFAULT => false,
&CFGDEF_COMMAND =>
{
@@ -809,6 +816,7 @@ my %hConfigDefine =
&CFGOPT_TEST_DELAY =>
{
&CFGDEF_TYPE => CFGDEF_TYPE_FLOAT,
+ &CFGDEF_INTERNAL => true,
&CFGDEF_DEFAULT => 5,
&CFGDEF_DEPEND =>
{
@@ -821,6 +829,7 @@ my %hConfigDefine =
&CFGOPT_TEST_POINT =>
{
&CFGDEF_TYPE => CFGDEF_TYPE_HASH,
+ &CFGDEF_INTERNAL => true,
&CFGDEF_REQUIRED => false,
&CFGDEF_DEPEND => CFGOPT_TEST_DELAY,
&CFGDEF_COMMAND => CFGOPT_TEST,
@@ -1857,8 +1866,10 @@ foreach my $strKey (sort(keys(%hConfigDefine)))
$hConfigDefine{$strKey}{&CFGDEF_REQUIRED} = true;
}
- if (!defined($hConfigDefine{$strKey}{&CFGDEF_INDEX}))
+ # Default internal is false
+ if (!defined($hConfigDefine{$strKey}{&CFGDEF_INTERNAL}))
{
+ $hConfigDefine{$strKey}{&CFGDEF_INTERNAL} = false;
}
# Set index total for db-*
diff --git a/doc/lib/BackRestDoc/Common/DocConfig.pm b/doc/lib/BackRestDoc/Common/DocConfig.pm
index e988756b1..35ed93da1 100644
--- a/doc/lib/BackRestDoc/Common/DocConfig.pm
+++ b/doc/lib/BackRestDoc/Common/DocConfig.pm
@@ -209,8 +209,8 @@ sub process
foreach my $strOption (sort(keys(%{$oOptionDefine})))
{
- # Test options are not documented
- next if ($strOption =~ /^test/);
+ # Skip options that are internal only for all commands (test options)
+ next if $oOptionDefine->{$strOption}{&CFGDEF_INTERNAL};
# Iterate through all commands
my @stryCommandList = sort(keys(%{defined($$oOptionDefine{$strOption}{&CFGDEF_COMMAND}) ?
@@ -229,6 +229,9 @@ sub process
next;
}
+ # Skip options that are internal only for the current command
+ next if $oOptionDefine->{$strOption}{&CFGDEF_COMMAND}{$strCommand}{&CFGDEF_INTERNAL};
+
my $oCommandDoc = $oDoc->nodeGet('operation')->nodeGet('command-list')->nodeGetById('command', $strCommand);
# First check if the option is documented in the command
diff --git a/doc/xml/release.xml b/doc/xml/release.xml
index 61a493dd2..a3f640adc 100644
--- a/doc/xml/release.xml
+++ b/doc/xml/release.xml
@@ -74,6 +74,10 @@
Add coding standards document.
+
+
+
Allow internal options that do not show up in the documentation. Used for test options initially but other use cases are on the horizon.