From e94465b2243821c1677b992db8d5e55608ba5d73 Mon Sep 17 00:00:00 2001 From: "David E. Wheeler" Date: Sun, 24 Sep 2023 11:12:56 -0400 Subject: [PATCH] Revamp results target Teach it to always finish (closes #220), document it should be run on the latest stable version of Postgres, and note that alternate output files will not be updated. Swap `runjusttests.out` alternates so the output from Postgres 16 is in the default file. Also update `.gitignore` to ignore more compiler-generated files (it was not ignoring `pgtap.o`). --- .gitignore | 11 ++++++++--- Makefile | 13 ++++++------- test/expected/runjusttests.out | 1 + test/expected/runjusttests_5.out | 1 - 4 files changed, 15 insertions(+), 11 deletions(-) diff --git a/.gitignore b/.gitignore index 249e89fb..9a8dd1e0 100644 --- a/.gitignore +++ b/.gitignore @@ -6,15 +6,20 @@ pgtap-core.sql pgtap-schema.sql uninstall_pgtap.sql results -pgtap.so -pgtap.dylib -pgtap.dll regression.* *.html *.html1 *.sql.orig bbin +# Compiler-generated files (borrowed from +# https://github.com/github/gitignore/blob/main/C.gitignore) +*.o +*.dll +*.so +*.so.* +*.dylib + /sql/pgtap--?.??.?.sql /sql/pgtap--?.?.?.sql /sql/pgtap-core--* diff --git a/Makefile b/Makefile index ab00b403..41e09611 100644 --- a/Makefile +++ b/Makefile @@ -490,15 +490,14 @@ latest-changes.md: Changes # # STOLEN FROM pgxntool # - -# TARGET results: runs `make test` and copies all result files to test/expected/. DO NOT RUN THIS UNLESS YOU'RE CERTAIN ALL YOUR TESTS ARE PASSING! +# TARGET results: runs `make test` and copies all result files to +# test/expected/. Use for basic test changes with the latest version of +# Postgres, but be aware that alternate `_n.out` files will not be updated. +# DO NOT RUN THIS UNLESS YOU'RE CERTAIN ALL YOUR TESTS ARE PASSING! .PHONY: results -results: installcheck result-rsync - -.PHONY: -result-rsync: +results: + $(MAKE) installcheck || true rsync -rlpgovP results/ test/expected - # To use this, do make print-VARIABLE_NAME print-% : ; $(info $* is $(flavor $*) variable set to "$($*)") @true diff --git a/test/expected/runjusttests.out b/test/expected/runjusttests.out index 89f6cc0c..8eece0a1 100644 --- a/test/expected/runjusttests.out +++ b/test/expected/runjusttests.out @@ -25,6 +25,7 @@ ok 3 - whatever.testplpgsql # CONSTRAINT: CONSTRAINT # TYPE: TYPE # CONTEXT: + # PL/pgSQL function __die() line 3 at RAISE # SQL statement "SELECT __die();" # PL/pgSQL function whatever.testplpgsqldie() line 43 at EXECUTE # PL/pgSQL function _runner(text[],text[],text[],text[],text[]) line 62 at FOR over EXECUTE statement diff --git a/test/expected/runjusttests_5.out b/test/expected/runjusttests_5.out index 8eece0a1..89f6cc0c 100644 --- a/test/expected/runjusttests_5.out +++ b/test/expected/runjusttests_5.out @@ -25,7 +25,6 @@ ok 3 - whatever.testplpgsql # CONSTRAINT: CONSTRAINT # TYPE: TYPE # CONTEXT: - # PL/pgSQL function __die() line 3 at RAISE # SQL statement "SELECT __die();" # PL/pgSQL function whatever.testplpgsqldie() line 43 at EXECUTE # PL/pgSQL function _runner(text[],text[],text[],text[],text[]) line 62 at FOR over EXECUTE statement