agora inbox for pgsql-hackers@postgresql.org  
help / color / mirror / Atom feed
From: Justin Pryzby <pryzbyj@telsasoft.com>
Subject: [PATCH 15/19] msvc: do not install libpq test tools by default
Date: Sun, 1 May 2022 07:55:57 -0500

See also:
https://www.postgresql.org/message-id/flat/20220501080706.GA1542365%40rfd.leadboat.com
a17fd67d2f2861ae0ce00d1aeefdf2facc47cd5e Build libpq test programs under MSVC.
https://www.postgresql.org/message-id/74952229-b3b0-fe47-f958-4088529a3f21@dunslane.net MSVC build system installs extra executables
https://www.postgresql.org/message-id/e4233934-98a6-6f76-46a0-992c0f4f1208@dunslane.net Re: set TESTDIR from perl rather than Makefile

ci-os-only: windows
---
 .cirrus.yml               |  1 +
 src/tools/msvc/Install.pm | 13 +++++++++++++
 2 files changed, 14 insertions(+)

diff --git a/.cirrus.yml b/.cirrus.yml
index 35e51453dfd..52092f83bc6 100644
--- a/.cirrus.yml
+++ b/.cirrus.yml
@@ -434,6 +434,7 @@ task:
 
   tempinstall_script:
     # Installation on windows currently only completely works from src/tools/msvc
+    - set INSTALL_TESTS=1
     - cd src/tools/msvc && perl install.pl %CIRRUS_WORKING_DIR%/tmp_install
 
   this_tap_script: |
diff --git a/src/tools/msvc/Install.pm b/src/tools/msvc/Install.pm
index 8de79c618cb..f70dbb1daf2 100644
--- a/src/tools/msvc/Install.pm
+++ b/src/tools/msvc/Install.pm
@@ -29,6 +29,10 @@ my @client_program_files = (
 	'pg_config',     'pg_dump',        'pg_dumpall', 'pg_isready',
 	'pg_receivewal', 'pg_recvlogical', 'pg_restore', 'psql',
 	'reindexdb',     'vacuumdb',       @client_contribs);
+my @test_program_files = (
+	'isolationtester',	'libpq_pipeline',	'libpq_testclient',
+	'libpq_uri_regress',	'pg_isolation_regress', 'pg_regress_ecpg',
+	'pg_regress',		'zic');
 
 sub lcopy
 {
@@ -264,10 +268,19 @@ sub CopySolutionOutput
 
 		$sln =~ s/$rem//;
 
+		# Only install client tools
 		next
 		  if ($insttype eq "client" && !grep { $_ eq $pf }
 			@client_program_files);
 
+		# Install test tools only in test mode
+		if (!$ENV{INSTALL_TESTS} && grep { $_ eq $pf }
+			@test_program_files)
+		{
+			print "Skipping install: $pf\n";
+			next;
+		}
+
 		my $proj = read_file("$pf.$vcproj")
 		  || croak "Could not open $pf.$vcproj\n";
 
-- 
2.17.1


--Sw7tCqrGA+HQ0/zt
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment; filename="0016-cirrus-code-coverage.patch"



view thread (4+ messages)

Message-ID: <no-message-id-649278@localhost>
Permalink:  ../../no-message-id-649278@localhost/
Also on:    postgresql.org/message-id/no-message-id-649278@localhost

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: pryzbyj@telsasoft.com
  Subject: Re: [PATCH 15/19] msvc: do not install libpq test tools by default
  In-Reply-To: <no-message-id-649278@localhost>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox