From 0e143ba7e7bf5c2d8c94fd44db57f768d0cdc72d Mon Sep 17 00:00:00 2001 From: David Steele Date: Wed, 27 Nov 2024 17:05:31 -0500 Subject: [PATCH] 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. --- .cirrus.yml | 6 +++--- .github/workflows/test.yml | 4 ++-- test/test.pl | 19 ++++--------------- 3 files changed, 9 insertions(+), 20 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index d7dfe22cb..210be0c78 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -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} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a7e8f7758..3dfe52f3f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -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: diff --git a/test/test.pl b/test/test.pl index da68574df..ad039807a 100755 --- a/test/test.pl +++ b/test/test.pl @@ -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";