1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2024-12-04 09:43:08 +02:00

Remove --min-gen option from test.pl.

This option was useful for the Perl code generation and autoconf generation, which were both slow. These are both gone now and the C code generation is fast enough that there is no need to exclude it.

--dry-run will still prevent certain code generation from running. This may not be necessary any more but removing it should be the subject of a separate commit.
This commit is contained in:
David Steele 2024-11-27 17:05:31 -05:00
parent cad595f9f8
commit 0e143ba7e7
3 changed files with 9 additions and 20 deletions

View File

@ -39,7 +39,7 @@ freebsd_13_task:
script:
- rsync --version
- cd .. && perl ${CIRRUS_WORKING_DIR}/test/test.pl --min-gen --make-cmd=gmake --vm-max=2 --no-coverage --no-valgrind --module=command --test=backup
- cd .. && perl ${CIRRUS_WORKING_DIR}/test/test.pl --make-cmd=gmake --vm-max=2 --no-coverage --no-valgrind --module=command --test=backup
debug_script:
- ls -lah ${CIRRUS_WORKING_DIR}
@ -55,7 +55,7 @@ freebsd_14_task:
install_script: pkg update && pkg upgrade -y libiconv && pkg install -y bash git postgresql-libpqxx pkgconf libxml2 gmake perl5 libyaml p5-YAML-LibYAML rsync meson
script:
- cd .. && perl ${CIRRUS_WORKING_DIR}/test/test.pl --min-gen --make-cmd=gmake --vm-max=2 --no-coverage --no-valgrind --module=command --test=backup
- cd .. && perl ${CIRRUS_WORKING_DIR}/test/test.pl --make-cmd=gmake --vm-max=2 --no-coverage --no-valgrind --module=command --test=backup
debug_script:
- ls -lah ${CIRRUS_WORKING_DIR}
@ -77,7 +77,7 @@ macos_ventura_task:
script:
- cd ..
- ${CIRRUS_WORKING_DIR}/test/test.pl --min-gen --vm-max=2 --no-coverage --no-valgrind --module=command --test=backup --test=info
- ${CIRRUS_WORKING_DIR}/test/test.pl --vm-max=2 --no-coverage --no-valgrind --module=command --test=backup --test=info
debug_script:
- ls -lah ${CIRRUS_WORKING_DIR}

View File

@ -104,8 +104,8 @@ jobs:
run: |
git config --global --add safe.directory ${GITHUB_WORKSPACE?}/pgbackrest
${GITHUB_WORKSPACE?}/pgbackrest/test/test.pl --min-gen --no-valgrind --no-coverage --no-optimize --build-max=2 --module=command --test=backup
${GITHUB_WORKSPACE?}/pgbackrest/test/test.pl --min-gen --no-valgrind --no-coverage --no-optimize --build-max=2 --module=postgres --test=interface
${GITHUB_WORKSPACE?}/pgbackrest/test/test.pl --no-valgrind --no-coverage --no-optimize --build-max=2 --module=command --test=backup
${GITHUB_WORKSPACE?}/pgbackrest/test/test.pl --no-valgrind --no-coverage --no-optimize --build-max=2 --module=postgres --test=interface
# Run meson unity build to check for errors, unused functions, and externed functions
unity:

View File

@ -74,7 +74,6 @@ test.pl [options]
--container-only only run tests that must be run in a container
--no-performance do not run performance tests
--gen-only only run auto-generation
--min-gen only run required code generation
--gen-check check that auto-generated files are correct (used in CI to detect changes)
--code-count generate code counts
--no-back-trace don't run backrace on C unit tests (may be slow with valgrind)
@ -158,7 +157,6 @@ my $bContainerOnly = false;
my $bNoPerformance = false;
my $bGenOnly = false;
my $bGenCheck = false;
my $bMinGen = false;
my $bCodeCount = false;
my $bProfile = false;
my $bNoBackTrace = false;
@ -207,7 +205,6 @@ GetOptions ('q|quiet' => \$bQuiet,
'no-performance' => \$bNoPerformance,
'gen-only' => \$bGenOnly,
'gen-check' => \$bGenCheck,
'min-gen' => \$bMinGen,
'code-count' => \$bCodeCount,
'code-format' => \$bCodeFormat,
'code-format-check' => \$bCodeFormatCheck,
@ -250,14 +247,6 @@ eval
pod2usage();
}
################################################################################################################################
# Disable code generation on dry-run
################################################################################################################################
if ($bDryRun)
{
$bMinGen = true;
}
################################################################################################################################
# Update options for --coverage-summary
################################################################################################################################
@ -471,7 +460,7 @@ eval
# Create the repo path -- this should hopefully prevent obvious rsync errors below
$oStorageTest->pathCreate($strRepoCachePath, {strMode => '0770', bIgnoreExists => true, bCreateParent => true});
# Auto-generate code files (if --min-gen specified then do minimum required)
# Auto-generate code files (if --dry-run specified then do minimum required)
#-------------------------------------------------------------------------------------------------------------------------------
my $strBuildPath = "${strTestPath}/build/none";
my $strBuildNinja = "${strBuildPath}/build.ninja";
@ -481,9 +470,9 @@ eval
# Setup build if it does not exist
my $strGenerateCommand =
"ninja -C ${strBuildPath} src/build-code" .
($bMinGen ? '' : " && \\\n${strBuildPath}/src/build-code config ${strBackRestBase}/src") .
($bMinGen ? '' : " && \\\n${strBuildPath}/src/build-code error ${strBackRestBase}/src") .
($bMinGen ? '' : " && \\\n${strBuildPath}/src/build-code postgres-version ${strBackRestBase}/src") .
($bDryRun ? '' : " && \\\n${strBuildPath}/src/build-code config ${strBackRestBase}/src") .
($bDryRun ? '' : " && \\\n${strBuildPath}/src/build-code error ${strBackRestBase}/src") .
($bDryRun ? '' : " && \\\n${strBuildPath}/src/build-code postgres-version ${strBackRestBase}/src") .
" && \\\n${strBuildPath}/src/build-code postgres ${strBackRestBase}/src ${strRepoCachePath}" .
" && \\\nninja -C ${strBuildPath} test/src/test-pgbackrest";