Re: [HACKERS] Supporting src/test/modules in MSVC builds
Michael Paquier wrote: And currawong is satisfied with this patch and the new buildfarm code, test modules being run as testmodules-install-check-C: http://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=currawongdt=2015-04-18%2014%3A51%3A14 So this closes the loop for this thread. Yay! Thanks, Michael and Andrew. -- Álvaro Herrerahttp://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
[HACKERS] Supporting src/test/modules in MSVC builds
Hi all, As mentioned previously (cab7npqscphafxs2rzeb-fbccjqiknqxjhloztkggim1mf5x...@mail.gmail.com), attached are patches to add support for src/test/modules in MSVC builds, modules whose tests are not supported since they have been moved from contrib/: - 0001 adds support for the build portion. - 0002 adds support for the installation. I arrived at the conclusion that those modules should be installed by default, because contribcheck relies on the fact that tests should be run on a server already running, and modulescheck should do the same IMO. - 0003 adds a new target modulescheck in vcregress. Patches 0001 and 0003 are based on some previous work from Alvaro, that I modified slightly after testing them. Note that this split is done to test each step on the build farm for safety. Regards, -- Michael From 1b58eba30d0347a7718a0db18ac6ae2c02888aaf Mon Sep 17 00:00:00 2001 From: Michael Paquier mich...@otacoo.com Date: Wed, 15 Apr 2015 22:14:33 -0700 Subject: [PATCH 1/3] Include modules of src/test/modules in build commit_ts, being only a module used for test purposes, is simply ignored in the process. --- src/tools/msvc/Mkvcbuild.pm | 33 +++-- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/src/tools/msvc/Mkvcbuild.pm b/src/tools/msvc/Mkvcbuild.pm index e4dbebf..986f3b3 100644 --- a/src/tools/msvc/Mkvcbuild.pm +++ b/src/tools/msvc/Mkvcbuild.pm @@ -28,7 +28,7 @@ my $libpgcommon; my $postgres; my $libpq; -# Set of variables for contrib modules +# Set of variables for modules in contrib/ and src/test/modules/ my $contrib_defines = { 'refint' = 'REFINT_VERBOSE' }; my @contrib_uselibpq = ('dblink', 'oid2name', 'postgres_fdw', 'vacuumlo'); @@ -50,7 +50,7 @@ my $contrib_extraincludes = my $contrib_extrasource = { 'cube' = [ 'contrib\cube\cubescan.l', 'contrib\cube\cubeparse.y' ], 'seg' = [ 'contrib\seg\segscan.l', 'contrib\seg\segparse.y' ], }; -my @contrib_excludes = ('pgcrypto', 'intagg', 'sepgsql'); +my @contrib_excludes = ('pgcrypto', 'commit_ts', 'intagg', 'sepgsql'); # Set of variables for frontend modules my $frontend_defines = { 'initdb' = 'FRONTEND' }; @@ -564,15 +564,18 @@ sub mkvcbuild my $mf = Project::read_file('contrib/pgcrypto/Makefile'); GenerateContribSqlFiles('pgcrypto', $mf); - opendir($D, 'contrib') || croak Could not opendir on contrib!\n; - while (my $d = readdir($D)) + foreach my $subdir ('contrib', 'src/test/modules') { - next if ($d =~ /^\./); - next unless (-f contrib/$d/Makefile); - next if (grep { /^$d$/ } @contrib_excludes); - AddContrib($d); + opendir($D, $subdir) || croak Could not opendir on $subdir!\n; + while (my $d = readdir($D)) + { + next if ($d =~ /^\./); + next unless (-f $subdir/$d/Makefile); + next if (grep { /^$d$/ } @contrib_excludes); + AddContrib($subdir, $d); + } + closedir($D); } - closedir($D); $mf = Project::read_file('src\backend\utils\mb\conversion_procs\Makefile'); @@ -689,14 +692,15 @@ sub AddSimpleFrontend # Add a simple contrib project sub AddContrib { + my $subdir = shift; my $n = shift; - my $mf = Project::read_file('contrib\\' . $n . '\Makefile'); + my $mf = Project::read_file($subdir/$n/Makefile); if ($mf =~ /^MODULE_big\s*=\s*(.*)$/mg) { my $dn = $1; my $proj = - $solution-AddProject($dn, 'dll', 'contrib', 'contrib\\' . $n); + $solution-AddProject($dn, 'dll', 'contrib', $subdir/$n); $proj-AddReference($postgres); AdjustContribProj($proj); } @@ -705,8 +709,9 @@ sub AddContrib foreach my $mod (split /\s+/, $1) { my $proj = - $solution-AddProject($mod, 'dll', 'contrib', 'contrib\\' . $n); - $proj-AddFile('contrib\\' . $n . '\\' . $mod . '.c'); + $solution-AddProject($mod, 'dll', 'contrib', $subdir/$n); + my $filename = $mod . '.c'; + $proj-AddFile($subdir . '\\' . $n . '\\' . $mod . '.c'); $proj-AddReference($postgres); AdjustContribProj($proj); } @@ -714,7 +719,7 @@ sub AddContrib elsif ($mf =~ /^PROGRAM\s*=\s*(.*)$/mg) { my $proj = - $solution-AddProject($1, 'exe', 'contrib', 'contrib\\' . $n); + $solution-AddProject($1, 'exe', 'contrib', $subdir/$n); AdjustContribProj($proj); } else -- 2.3.5 From e901543c2fa728646dca13a66979a6f0619dd87f Mon Sep 17 00:00:00 2001 From: Michael Paquier mich...@otacoo.com Date: Wed, 15 Apr 2015 23:13:14 -0700 Subject: [PATCH 2/3] Support installation of test modules in MSVC Note that those modules are needed in the installation because like contribcheck, modulescheck does not create a cluster from scratch on where to run the tests. It seems also good to include them to be able to perform those tests using a central installation path. --- src/tools/msvc/Install.pm | 151 +- 1 file changed, 81 insertions(+), 70 deletions(-) diff --git a/src/tools/msvc/Install.pm b/src/tools/msvc/Install.pm index 93a6724..c82743d 100644 --- a/src/tools/msvc/Install.pm +++ b/src/tools/msvc/Install.pm @@
Re: [HACKERS] Supporting src/test/modules in MSVC builds
On 04/16/2015 02:46 AM, Michael Paquier wrote: Hi all, As mentioned previously (cab7npqscphafxs2rzeb-fbccjqiknqxjhloztkggim1mf5x...@mail.gmail.com), attached are patches to add support for src/test/modules in MSVC builds, modules whose tests are not supported since they have been moved from contrib/: - 0001 adds support for the build portion. - 0002 adds support for the installation. I arrived at the conclusion that those modules should be installed by default, because contribcheck relies on the fact that tests should be run on a server already running, and modulescheck should do the same IMO. - 0003 adds a new target modulescheck in vcregress. Patches 0001 and 0003 are based on some previous work from Alvaro, that I modified slightly after testing them. Note that this split is done to test each step on the build farm for safety. Regards, Thanks for doing this. It looks good, and if you've tested it I'm satisfied. I suggest that we apply patches 1 and 2 immediately. AUIU they don't require any changes to the buildfarm, as the MSVC build process will automatically build and install it with these changes. Then if all goes well we can apply the third patch and I'll fix the buildfarm client for the forthcoming release to run the tests on MSVC builds. Nothing will break in the meantime - the tests just won't get run until the new client version is deployed. cheers andrew -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
Re: [HACKERS] Supporting src/test/modules in MSVC builds
Andrew Dunstan wrote: Thanks for doing this. Yes, much appreciated. It looks good, and if you've tested it I'm satisfied. I suggest that we apply patches 1 and 2 immediately. AUIU they don't require any changes to the buildfarm, as the MSVC build process will automatically build and install it with these changes. Okay, I just pushed patches 1 and 2. Then if all goes well we can apply the third patch and I'll fix the buildfarm client for the forthcoming release to run the tests on MSVC builds. Nothing will break in the meantime - the tests just won't get run until the new client version is deployed. Will wait for a day or so to see what the Win buildfarm members say. -- Álvaro Herrerahttp://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
Re: [HACKERS] Supporting src/test/modules in MSVC builds
Andrew Dunstan wrote: On 04/16/2015 07:42 PM, Michael Paquier wrote: Then if all goes well we can apply the third patch and I'll fix the buildfarm client for the forthcoming release to run the tests on MSVC builds. Nothing will break in the meantime - the tests just won't get run until the new client version is deployed. Will wait for a day or so to see what the Win buildfarm members say. currawong and mastodon seem satisfied. Yeah. I think we can push the third one - I am just about ready to release the new buildfarm client. Pushed. -- Álvaro Herrerahttp://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
Re: [HACKERS] Supporting src/test/modules in MSVC builds
On Fri, Apr 17, 2015 at 4:47 AM, Alvaro Herrera wrote: Andrew Dunstan wrote: It looks good, and if you've tested it I'm satisfied. I suggest that we apply patches 1 and 2 immediately. AUIU they don't require any changes to the buildfarm, as the MSVC build process will automatically build and install it with these changes. Okay, I just pushed patches 1 and 2. Cool, thanks. Then if all goes well we can apply the third patch and I'll fix the buildfarm client for the forthcoming release to run the tests on MSVC builds. Nothing will break in the meantime - the tests just won't get run until the new client version is deployed. Will wait for a day or so to see what the Win buildfarm members say. currawong and mastodon seem satisfied. -- Michael -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers
Re: [HACKERS] Supporting src/test/modules in MSVC builds
On 04/16/2015 07:42 PM, Michael Paquier wrote: Then if all goes well we can apply the third patch and I'll fix the buildfarm client for the forthcoming release to run the tests on MSVC builds. Nothing will break in the meantime - the tests just won't get run until the new client version is deployed. Will wait for a day or so to see what the Win buildfarm members say. currawong and mastodon seem satisfied. Yeah. I think we can push the third one - I am just about ready to release the new buildfarm client. -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers