Skip to content

Commit

Permalink
Another version of installcheck to run docker tests correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
dlepikhova committed May 7, 2021
1 parent 93eda98 commit 5a2486d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 10 deletions.
18 changes: 13 additions & 5 deletions Makefile
Expand Up @@ -22,18 +22,16 @@ include $(top_builddir)/src/Makefile.global
include $(top_srcdir)/contrib/contrib-global.mk
endif

EXTRA_REGRESS_OPTS=--temp-config=$(top_srcdir)/$(subdir)/test.conf

$(EXTENSION)--$(EXTVERSION).sql: init.sql
cat $^ > $@

ISOLATIONCHECKS=corner_cases

check: isolationcheck

installcheck:
$(pg_isolation_regress_installcheck) $(ISOLATIONCHECKS)

submake-isolation:
$(MAKE) -C $(top_builddir)/src/test/isolation all
installcheck: isolationcheck-install-force

isolationcheck: | submake-isolation temp-install
$(MKDIR_P) isolation_output
Expand All @@ -42,4 +40,14 @@ isolationcheck: | submake-isolation temp-install
--outputdir=isolation_output \
$(ISOLATIONCHECKS)

isolationcheck-install-force: all | submake-isolation submake-pg_query_state temp-install
$(pg_isolation_regress_installcheck) \
$(ISOLATIONCHECKS)

submake-isolation:
$(MAKE) -C $(top_builddir)/src/test/isolation all

submake-pg_query_state:
$(MAKE) -C $(top_builddir)/contrib/pg_query_state

temp-install: EXTRA_INSTALL=contrib/pg_query_state
7 changes: 2 additions & 5 deletions run_tests.sh
Expand Up @@ -138,17 +138,14 @@ fi
# something's wrong, exit now!
if [ $status -ne 0 ]; then cat /tmp/postgres.log; exit 1; fi

cd $CUSTOM_PG_SRC

# run regression tests
export PG_REGRESS_DIFF_OPTS="-w -U3" # for alpine's diff (BusyBox)
make -C $CUSTOM_PG_SRC/contrib/pg_query_state installcheck || status=$?
cd $CUSTOM_PG_SRC/contrib/pg_query_state
make installcheck || status=$?

# show diff if it exists
if [ -f regression.diffs ]; then cat regression.diffs; fi

cd $CUSTOM_PG_SRC/contrib/pg_query_state

# run python tests
set +x -e
python3 -m venv /tmp/env && source /tmp/env/bin/activate &&
Expand Down

0 comments on commit 5a2486d

Please sign in to comment.