From: Justin Pryzby Date: Fri, 25 Feb 2022 17:23:26 -0600 Subject: [PATCH 04/19] s!also remove PATH. This essentially reverts commit f4ce6c4d3a30ec3a12c7f64b90a6fc82887ddd7b And partially reverts 6b04abdfc5e0653542ac5d586e639185a8c61a39 XXX: also set PATH=bindir ? --- src/Makefile.global.in | 6 +++--- src/interfaces/libpq/Makefile | 4 ++-- src/test/perl/PostgreSQL/Test/Utils.pm | 10 ++++++++++ src/tools/msvc/vcregress.pl | 4 ---- 4 files changed, 15 insertions(+), 9 deletions(-) diff --git a/src/Makefile.global.in b/src/Makefile.global.in index 1e1b44485d5..fd1ba039e61 100644 --- a/src/Makefile.global.in +++ b/src/Makefile.global.in @@ -440,7 +440,7 @@ ld_library_path_var = LD_LIBRARY_PATH # need something more here. If not defined then the expansion does # nothing. with_temp_install = \ - PATH="$(abs_top_builddir)/tmp_install$(bindir):$(CURDIR):$$PATH" \ + PATH="$(abs_top_builddir)/tmp_install$(bindir):$$PATH" \ $(call add_to_path,$(strip $(ld_library_path_var)),$(abs_top_builddir)/tmp_install$(libdir)) \ $(with_temp_install_extra) @@ -452,7 +452,7 @@ echo "+++ tap install-check in $(subdir) +++" && \ rm -rf '$(CURDIR)'/tmp_check && \ $(MKDIR_P) '$(CURDIR)'/tmp_check && \ cd $(srcdir) && \ - PATH="$(bindir):$(CURDIR):$$PATH" \ + PATH="$(bindir):$$PATH" \ PGPORT='6$(DEF_PGPORT)' top_builddir='$(CURDIR)/$(top_builddir)' \ PG_SUBDIR='$(CURDIR)' \ PG_REGRESS='$(CURDIR)/$(top_builddir)/src/test/regress/pg_regress' \ @@ -464,7 +464,7 @@ echo "+++ tap install-check in $(subdir) +++" && \ rm -rf '$(CURDIR)'/tmp_check && \ $(MKDIR_P) '$(CURDIR)'/tmp_check && \ cd $(srcdir) && \ - PATH="$(bindir):$(CURDIR):$$PATH" \ + PATH="$(bindir):$$PATH" \ PGPORT='6$(DEF_PGPORT)' top_builddir='$(top_builddir)' \ PG_SUBDIR='$(CURDIR)' \ PG_REGRESS='$(top_builddir)/src/test/regress/pg_regress' \ diff --git a/src/interfaces/libpq/Makefile b/src/interfaces/libpq/Makefile index b5fd72a4acf..c5aa91df3d9 100644 --- a/src/interfaces/libpq/Makefile +++ b/src/interfaces/libpq/Makefile @@ -144,10 +144,10 @@ test-build: $(MAKE) -C test all check: test-build all - PATH="$(CURDIR)/test:$$PATH" && $(prove_check) + $(prove_check) installcheck: test-build all - PATH="$(CURDIR)/test:$$PATH" && $(prove_installcheck) + $(prove_installcheck) installdirs: installdirs-lib $(MKDIR_P) '$(DESTDIR)$(includedir)' '$(DESTDIR)$(includedir_internal)' '$(DESTDIR)$(datadir)' diff --git a/src/test/perl/PostgreSQL/Test/Utils.pm b/src/test/perl/PostgreSQL/Test/Utils.pm index 063a19b1df5..c6c4b2fec8a 100644 --- a/src/test/perl/PostgreSQL/Test/Utils.pm +++ b/src/test/perl/PostgreSQL/Test/Utils.pm @@ -195,6 +195,16 @@ INIT $ENV{TESTDIR} = $test_dir; + if ($PostgreSQL::Test::Utils::windows_os && + $Config{osname} eq 'MSWin32') + { + $ENV{PATH} =~ s!;!;$test_dir;!; + } + else + { + $ENV{PATH} =~ s!:!:$test_dir:!; + } + # Determine output directories, and create them. $tmp_check = "$test_dir/tmp_check"; $log_path = "$tmp_check/log"; diff --git a/src/tools/msvc/vcregress.pl b/src/tools/msvc/vcregress.pl index ae19ff5736b..54c31b0e14f 100644 --- a/src/tools/msvc/vcregress.pl +++ b/src/tools/msvc/vcregress.pl @@ -291,10 +291,6 @@ sub tap_check $ENV{PG_REGRESS} = "$topdir/$Config/pg_regress/pg_regress"; $ENV{REGRESS_SHLIB} = "$topdir/src/test/regress/regress.dll"; - my $module = basename $dir; - # add the module build dir as the second element in the PATH - $ENV{PATH} =~ s!;!;$topdir/$Config/$module;!; - rmtree('tmp_check'); system(@args); my $status = $? >> 8; -- 2.17.1 --Sw7tCqrGA+HQ0/zt Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="0005-cirrus-macos-enable-various-runtime-checks.patch"