1
0
mirror of https://github.com/postgres/postgres.git synced 2025-09-02 04:21:28 +03:00

Win32 regression test fixes:

For win32 in general, this makes it possible to run the regression tests
as an admin user by using the same restricted token method that's used
by pg_ctl and initdb.

For vc++, it adds building of pg_regress.exe, adds a resultmap, and
fixes how it runs the install.

Magnus Hagander
This commit is contained in:
Bruce Momjian
2007-02-08 15:28:58 +00:00
parent 51be14e928
commit 6fea31b693
5 changed files with 96 additions and 15 deletions

View File

@@ -87,7 +87,7 @@ sub GenerateFiles {
print O "#define HAVE_LIBZ 1\n" if ($self->{options}->{zlib});
print O "#define USE_SSL 1\n" if ($self->{options}->{openssl});
print O "#define ENABLE_NLS 1\n" if ($self->{options}->{nls});
print O "#define LOCALEDIR \"/usr/local/pgsql/share/locale\"\n" if ($self->{options}->{nls});
print O "#define LOCALEDIR \"/share/locale\"\n" if ($self->{options}->{nls});
if ($self->{options}->{xml}) {
print O "#define HAVE_LIBXML2\n";
print O "#define USE_LIBXML\n";
@@ -201,17 +201,17 @@ EOF
print "Generating pg_config_paths.h...\n";
open(O,'>', 'src\port\pg_config_paths.h') || confess "Could not open pg_config_paths.h";
print O <<EOF;
#define PGBINDIR "/usr/local/pgsql/bin"
#define PGSHAREDIR "/usr/local/pgsql/share"
#define SYSCONFDIR "/usr/local/pgsql/etc"
#define INCLUDEDIR "/usr/local/pgsql/include"
#define PKGINCLUDEDIR "/usr/local/pgsql/include"
#define INCLUDEDIRSERVER "/usr/local/pgsql/include/server"
#define LIBDIR "/usr/local/pgsql/lib"
#define PKGLIBDIR "/usr/local/pgsql/lib"
#define LOCALEDIR "/usr/local/pgsql/share/locale"
#define DOCDIR "/usr/local/pgsql/doc"
#define MANDIR "/usr/local/pgsql/man"
#define PGBINDIR "/bin"
#define PGSHAREDIR "/share"
#define SYSCONFDIR "/etc"
#define INCLUDEDIR "/include"
#define PKGINCLUDEDIR "/include"
#define INCLUDEDIRSERVER "/include/server"
#define LIBDIR "/lib"
#define PKGLIBDIR "/lib"
#define LOCALEDIR "/share/locale"
#define DOCDIR "/doc"
#define MANDIR "/man"
EOF
close(O);
}

View File

@@ -69,6 +69,7 @@ sub CopySetOfFiles {
open($D, "dir /b /s $spec |") || croak "Could not list $spec\n";
while (<$D>) {
chomp;
next if /regress/; # Skip temporary install in regression subdir
my $tgt = $target . basename($_);
print ".";
copy($_, $tgt) || croak "Could not copy $_: $!\n";

View File

@@ -265,11 +265,18 @@ foreach my $prg (split /\s+/,$1) {
}
# Regression DLLs
# Regression DLL and EXE
my $regress = $solution->AddProject('regress','dll','misc');
$regress->AddFile('src\test\regress\regress.c');
$regress->AddReference($postgres);
my $pgregress = $solution->AddProject('pg_regress','exe','misc');
$pgregress->AddFile('src\test\regress\pg_regress.c');
$pgregress->AddIncludeDir('src\port');
$pgregress->AddDefine('HOST_TUPLE="i686-pc-win32vc"');
$pgregress->AddDefine('FRONTEND');
$pgregress->AddReference($libpgport);
$solution->Save();
#####################