From d525cf05d28563e6946511d8f6875c362ec96f8d Mon Sep 17 00:00:00 2001 From: jnasbyupgrade Date: Wed, 7 Oct 2026 16:29:09 -0500 Subject: [PATCH 1/2] Test PGXNTOOL_ENABLE_TEST_INSTALL=yes erroring on empty test/install/ Add tests for pgxntool commit 29e2ae4 (error when `PGXNTOOL_ENABLE_TEST_INSTALL=yes` but `test/install/` is empty): - `test/install/schedule` recipe fails with `no .sql files found in test/install/` and writes no schedule New `test-test-install.bats` test runs on the empty-`test/install/` state the preceding test leaves behind: asserts the schedule target fails with that message, and that `make -n dist` and `make clean` still succeed with the variable set (no parse-time error). Co-Authored-By: Claude Opus 5.5 --- test/standard/test-test-install.bats | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/test/standard/test-test-install.bats b/test/standard/test-test-install.bats index cf57d23..e251174 100644 --- a/test/standard/test-test-install.bats +++ b/test/standard/test-test-install.bats @@ -7,6 +7,7 @@ # - Schedule generation with ../install/ relative paths # - Core contract: install state persists into main test suite # - Disabling via PGXNTOOL_ENABLE_TEST_INSTALL +# - PGXNTOOL_ENABLE_TEST_INSTALL=yes erroring when test/install/ is empty # - Cleanup via make clean load ../lib/helpers @@ -111,4 +112,19 @@ setup() { assert_file_not_exists "test/install/schedule" } +@test "PGXNTOOL_ENABLE_TEST_INSTALL=yes errors when test/install/ has no SQL files" { + # test/install/*.sql still removed by the previous test + run make test/install/schedule PGXNTOOL_ENABLE_TEST_INSTALL=yes + assert_failure + echo "$output" | grep -q "no .sql files found in test/install/" + assert_file_not_exists "test/install/schedule" + + # The error must come from the test path only, not at parse time: targets + # that never run test/install still work with the variable set. + run make -n dist PGXNTOOL_ENABLE_TEST_INSTALL=yes + assert_success + run make clean PGXNTOOL_ENABLE_TEST_INSTALL=yes + assert_success +} + # vi: expandtab sw=2 ts=2 From 24668f202f68e759f0bb6d74bd4f5734b1048105 Mon Sep 17 00:00:00 2001 From: jnasbyupgrade Date: Wed, 7 Oct 2026 17:16:38 -0500 Subject: [PATCH 2/2] test-install: drop target-scope assertions from empty-dir error test Co-Authored-By: Claude Sonnet 5.5 --- test/standard/test-test-install.bats | 7 ------- 1 file changed, 7 deletions(-) diff --git a/test/standard/test-test-install.bats b/test/standard/test-test-install.bats index e251174..a627bd8 100644 --- a/test/standard/test-test-install.bats +++ b/test/standard/test-test-install.bats @@ -118,13 +118,6 @@ setup() { assert_failure echo "$output" | grep -q "no .sql files found in test/install/" assert_file_not_exists "test/install/schedule" - - # The error must come from the test path only, not at parse time: targets - # that never run test/install still work with the variable set. - run make -n dist PGXNTOOL_ENABLE_TEST_INSTALL=yes - assert_success - run make clean PGXNTOOL_ENABLE_TEST_INSTALL=yes - assert_success } # vi: expandtab sw=2 ts=2