public inbox for [email protected]  
help / color / mirror / Atom feed
From: Justin Pryzby <[email protected]>
To: Andres Freund <[email protected]>
Cc: Tom Lane <[email protected]>
Cc: Andrew Dunstan <[email protected]>
Cc: Peter Eisentraut <[email protected]>
Cc: [email protected]
Subject: Re: convert libpq uri-regress tests to tap test
Date: Sat, 16 Apr 2022 09:44:54 -0500
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
	<[email protected]>
	<[email protected]>
	<[email protected]>
	<[email protected]>
	<[email protected]>
	<[email protected]>
	<[email protected]>
	<[email protected]>
	<[email protected]>

On Sat, Feb 26, 2022 at 05:46:26PM -0800, Andres Freund wrote:
> Pushed.  Attached is the remainder, 0003, the move of libpq_pipeline to
> src/interfaces/libpq that I'm not planning to push for now.

I saw that Andrew just pushed something to start building this under MSVC.

In case it's of any interest, I had done this differently a while back.
This probably doesn't apply except on top of some other patches, but you get
the idea.

commit 923f8a1c2cbea35cb01d1599caa2a81e3186181c
Author: Justin Pryzby <[email protected]>
Date:   Mon Feb 28 01:31:10 2022 -0600

    f!
    
    ci-os-only: windows

diff --git a/src/tools/msvc/Mkvcbuild.pm b/src/tools/msvc/Mkvcbuild.pm
index 4364ab943fd..71ec747e544 100644
--- a/src/tools/msvc/Mkvcbuild.pm
+++ b/src/tools/msvc/Mkvcbuild.pm
@@ -44,6 +44,7 @@ my $contrib_extraincludes  = {};
 my $contrib_extrasource    = {
 	'uri-regress' => ['src/interfaces/libpq/test/uri-regress.c'],
 	'testclient' => ['src/interfaces/libpq/test/testclient.c'],
+	'libpq_pipeline' => ['src/interfaces/libpq/test/libpq_pipeline.c'],
 };
 my @contrib_excludes = (
 	'bool_plperl',      'commit_ts',
@@ -475,7 +476,7 @@ sub mkvcbuild
 		push @contrib_excludes, 'uuid-ossp';
 	}
 
-	foreach my $subdir ('contrib', 'src/test/modules', 'src/interfaces/libpq')
+	foreach my $subdir ('contrib', 'src/test/modules') #, 'src/interfaces/libpq')
 	{
 		opendir($D, $subdir) || croak "Could not opendir on $subdir!\n";
 		while (my $d = readdir($D))
@@ -804,6 +805,20 @@ sub mkvcbuild
 		$p->AddReference($postgres);
 	}
 
+	$mf = Project::read_file('src/interfaces/libpq/test/Makefile');
+	$mf =~ s{\\\r?\n}{}g;
+	$mf =~ m{PROGRAMS\s*=\s*(.*)$}m
+	  || die 'Could not match in src/interfaces/libpq/test/Makefile' . "\n";
+	foreach my $prg (split /\s+/, $1)
+	{
+		my $proj = $solution->AddProject($prg, 'exe', 'bin');
+		$proj->AddFile("src/interfaces/libpq/test/$prg.c"); # implicit source file
+		$proj->AddIncludeDir('src/interfaces/libpq');
+		# XXX: pipeline needs pgcommon and ws2, but uri-regress doesn't
+		$proj->AddReference($libpq, $libpgport, $libpgcommon);
+		$proj->AddLibrary('ws2_32.lib');
+	}
+
 	$mf = Project::read_file('src/bin/scripts/Makefile');
 	$mf =~ s{\\\r?\n}{}g;
 	$mf =~ m{PROGRAMS\s*=\s*(.*)$}m






view thread (11+ messages)  latest in thread

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: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected], [email protected]
  Subject: Re: convert libpq uri-regress tests to tap test
  In-Reply-To: <[email protected]>

* 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