Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nfjff-0007Os-Li for pgsql-hackers@arkaria.postgresql.org; Sat, 16 Apr 2022 14:45:07 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nfjfc-0004cd-Ms for pgsql-hackers@arkaria.postgresql.org; Sat, 16 Apr 2022 14:45:04 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nfjfc-0004cT-8O for pgsql-hackers@lists.postgresql.org; Sat, 16 Apr 2022 14:45:04 +0000 Received: from mail-il1-x129.google.com ([2607:f8b0:4864:20::129]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1nfjfW-0004hN-Jt for pgsql-hackers@postgresql.org; Sat, 16 Apr 2022 14:45:03 +0000 Received: by mail-il1-x129.google.com with SMTP id y11so788874ilp.4 for ; Sat, 16 Apr 2022 07:44:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telsasoft-com.20210112.gappssmtp.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=JGEZ8q0kuIZUwBIyxZM5jaAHNtc+5eK+7pfANANmzRo=; b=UZlLnxlmyX62oFyUeB8M/uqKGl5QIyJoQMyn/aA2uZ/rzvFqAsnHLK+MUdzWy3hvDK /3KMIDi/cGdA0wdqho8yrH0v85Qnsqwd7lp/+oMg1Vf9z+s6P/NDsVYKbVeZApImG68a ilYMYHP9ni72GC1zFJGEvyW3Ww6ll7KJPNtOdQodsokfNe99zR01XfxqRHW5PnjVhrsn M+nk3ndDk1RsUtv3nGXPw/pUYZzdx++ttgdd4fPFOj4XcnjZ659O66RtE5t1Pq8mnC78 DLpomfUYLiCO6+teZctldxBR+l9TeWzyjr/gKmubXdyyosmzzMvGtSWOY3KRJNNHz6xK F9HQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=JGEZ8q0kuIZUwBIyxZM5jaAHNtc+5eK+7pfANANmzRo=; b=wGjwNuyTLb2Y7sFVDrgTuPMcxMMlqgtDBVpsaDZgY1d+uKdTrlQHm8JA1RAv5hjRPB /Lgj1N+KCjB/233CHFFAlH7l2+/6BBVvqgbgowlpkW4J2EtgEC8YFWYzGr6mShZCStd1 uSLOXFCXXVa8sEeEy+vMku+RqzDxqcFbRNk0mNV/qTdq1f53NB/pyN0mS/G31d4Sc81G YaVnbaRXrRxe38snjI3Cc+zfBRtuDGvDYAsD1qWkSfU/JHXLkB80zoGgVwH5qw7O2MrO O00Z2z3/NowQCkY1fBYMjlvsHI6lGUyP8AmlkErRHhuDLRCor3YOEagM6/h5LxhWusxk r6LQ== X-Gm-Message-State: AOAM533tgyptSqfn2SwnT4uD9BLlxWNixA4s94EDh5LBwAb8y48Np9gH VvkVUwlngdKpNLNcSIsWODzyMg== X-Google-Smtp-Source: ABdhPJyXXI1x4hOGz8zScyGuxzhCihpys3dzjrdEjYrY3l/JUUCY2iUzzZr+X+MP+ttH819nXvVVvA== X-Received: by 2002:a92:9405:0:b0:2bf:6a01:6ad1 with SMTP id c5-20020a929405000000b002bf6a016ad1mr1457797ili.197.1650120296292; Sat, 16 Apr 2022 07:44:56 -0700 (PDT) Received: from pryzbyj.telsasoft (charmander.telsasoft.com. [50.244.222.1]) by smtp.gmail.com with ESMTPSA id a2-20020a5d9ec2000000b00645ab33390dsm4770410ioe.9.2022.04.16.07.44.55 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 16 Apr 2022 07:44:55 -0700 (PDT) Received: by pryzbyj.telsasoft (Postfix, from userid 1000) id DBE52800F3C; Sat, 16 Apr 2022 09:44:54 -0500 (CDT) Date: Sat, 16 Apr 2022 09:44:54 -0500 From: Justin Pryzby To: Andres Freund Cc: Tom Lane , Andrew Dunstan , Peter Eisentraut , pgsql-hackers@postgresql.org Subject: Re: convert libpq uri-regress tests to tap test Message-ID: <20220416144454.GX26620@telsasoft.com> References: <1261838.1645657117@sss.pgh.pa.us> <4f4c04c2-f23c-6668-1b24-224fc6478bfd@enterprisedb.com> <1276236.1645667561@sss.pgh.pa.us> <20220224144311.4rcax7tslk7jum3f@alap3.anarazel.de> <1346756.1645715848@sss.pgh.pa.us> <20220224164623.m3vdtr7ojilhaxgz@alap3.anarazel.de> <20220225175647.bvordgiauekrbkyj@alap3.anarazel.de> <20220226015229.c4ofvhbsd3ej6weo@alap3.anarazel.de> <20220227014626.vi7g7km554gmoape@alap3.anarazel.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220227014626.vi7g7km554gmoape@alap3.anarazel.de> User-Agent: Mutt/1.9.4 (2018-02-28) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk 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 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