Skip to content

Commit

Permalink
Revamp results target
Browse files Browse the repository at this point in the history
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`).
  • Loading branch information
theory committed Sep 24, 2023
1 parent b000b4b commit e94465b
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 11 deletions.
11 changes: 8 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -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--*
Expand Down
13 changes: 6 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions test/expected/runjusttests.out
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion test/expected/runjusttests_5.out
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e94465b

Please sign in to comment.