Commit Graph

186 Commits

Author SHA1 Message Date
Alvaro Herrera cdedfe6af1 Cast NULL to a pointer type in the execl() call, to avoid a compiler warning on
some platforms and possibly a bug.  Per report from Stefan and subsequent
discussion.
2007-07-18 21:19:17 +00:00
Magnus Hagander a0de6e7b97 Specifying a dbname should override the default database, not add to it.
Fixes buildfarm failures on contribcheck.
2007-06-12 13:54:58 +00:00
Magnus Hagander 8c0d308818 Fix missing variable initialization. 2007-06-12 13:26:45 +00:00
Magnus Hagander 09922597c5 Rewrite ECPG regression test driver in C, by splitting the standard
regression driver into two parts and reusing half of it. Required to
run ECPG tests without a shell on MSVC builds.

Fix ECPG thread tests for MSVC build (incl output files).

Joachim Wieland and Magnus Hagander
2007-06-12 11:07:34 +00:00
Peter Eisentraut 7ce9b3683e Make some messages more consistent 2007-05-31 15:13:06 +00:00
Tom Lane 4a30da1e7f Add missing #define for mingw, per Magnus. 2007-02-08 19:48:28 +00:00
Bruce Momjian 6fea31b693 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
2007-02-08 15:28:58 +00:00
Peter Eisentraut 16059d39a0 Replace some strncpy() by strlcpy(). 2007-02-07 00:52:35 +00:00
Bruce Momjian 8b4ff8b6a1 Wording cleanup for error messages. Also change can't -> cannot.
Standard English uses "may", "can", and "might" in different ways:

        may - permission, "You may borrow my rake."

        can - ability, "I can lift that log."

        might - possibility, "It might rain today."

Unfortunately, in conversational English, their use is often mixed, as
in, "You may use this variable to do X", when in fact, "can" is a better
choice.  Similarly, "It may crash" is better stated, "It might crash".
2007-02-01 19:10:30 +00:00
Alvaro Herrera 67a4c24bc8 Fix pg_regress breakage for PL and contrib tests, by not requiring that
"input" and "output" dirs be necessarily present.
2007-01-19 21:21:13 +00:00
Alvaro Herrera 5b4a08896b Change the sed rules in the regression test for pg_regress hackery to create
the generated files, to help Visual C++ to run these tests.  The tests still
pass in VPATH and normal builds.

Patch from Magnus Hagander, editorialized by me.
2007-01-19 16:42:24 +00:00
Bruce Momjian 29dccf5fe0 Update CVS HEAD for 2007 copyright. Back branches are typically not
back-stamped for this.
2007-01-05 22:20:05 +00:00
Andrew Dunstan 226e9fffc8 Call setrlimit if possible in pg_regress to allow core file generation, and provide a switch for similar behaviour in pg_ctl. 2007-01-05 16:17:55 +00:00
Bruce Momjian f99a569a2e pgindent run for 8.2. 2006-10-04 00:30:14 +00:00
Tom Lane f375d5d6f9 Cause pg_regress to invoke the temporary postmaster as 'postgres' not
'postmaster', so as not to depend on the existence of the postmaster
symlink.  Also, implement postmaster-still-alive and postmaster-kill
operations for Windows, per Magnus.
2006-09-24 17:10:18 +00:00
Tom Lane 9b5e108ee9 Fix shared library creation to work properly on AIX. Albe Laurenz 2006-09-19 15:36:08 +00:00
Tom Lane fbc7f59bfe If test postmaster fails to start within 60 seconds, try to kill -9 it
so that it won't interfere with later trials.  Per recent buildfarm
experience.  Anyone know how to do this on Windows?
2006-08-13 20:39:07 +00:00
Bruce Momjian 9a4eaa9440 Remove extra argument to printf(). 2006-08-01 18:01:36 +00:00
Andrew Dunstan a3bae60813 have pg_regress fall back on testing with the canonical results file if an
alternative test is specified but none succeeds.
2006-08-01 14:56:29 +00:00
Bruce Momjian 1a271f0c71 Fix WIN32 wait() return value macros to be accurate, particularly
because they are used for testing the return value from system().
(WIN32 doesn't overlay the return code with other failure conditions
like Unix does, so they are just simple macros.)

Fix regression checks to properly handle diff failures on Win32 using
the new macros.
2006-07-30 01:45:21 +00:00
Tom Lane 8aab197840 Original coding of pg_regress.c made the results and log directories
with restrictive permissions, which was not the behavior of the shell
script and doesn't seem very desirable.  Use the umask setting instead.
2006-07-27 15:37:19 +00:00
Tom Lane d8b5c95ca8 Remove hard-wired lists of timezone abbreviations in favor of providing
configuration files that can be altered by a DBA.  The australian_timezones
GUC setting disappears, replaced by a timezone_abbreviations setting (set this
to 'Australia' to get the effect of australian_timezones).  The list of zone
names defined by default has undergone a bit of cleanup, too.  Documentation
still needs some work --- in particular, should we fix Table B-4, or just get
rid of it?  Joachim Wieland, with some editorializing by moi.
2006-07-25 03:51:23 +00:00
Andrew Dunstan 631ea61883 Use correct ifdef test for cygwin, namely __CYGWIN__ (note underscores). 2006-07-25 01:37:42 +00:00
Andrew Dunstan 20a733d0a0 Remove dubious and redundant (we think) setting of libdir in PATH for non temp-install case. 2006-07-24 01:50:22 +00:00
Andrew Dunstan b0dc1fbbc5 Add libdir to PATH for Cygwin as well as WIN32 - should fix buildfarm eel. 2006-07-22 14:05:20 +00:00
Tom Lane bc660c4237 Ah, I finally realize why Magnus wanted to add a --bindir option to
pg_regress: there's no other way to cope with testing a relocated
installation.  Seems better to call it --psqldir though, since the
only thing we need to find in that case is psql.  It'd be better if
we could use find_other_exec, but that's not happening unless we are
willing to install pg_regress alongside psql, which seems unlikely
to happen.
2006-07-21 00:24:04 +00:00
Tom Lane 11f6d2fcba As a stopgap to get the Windows buildfarm members running again, hot-wire
the check on diff's exit status to check for literally 0 or 1.  Someone
should look into why WIFEXITED/WEXITSTATUS don't work for this, but I've
spent more than enough time on it already.
2006-07-20 16:25:30 +00:00
Tom Lane 7da24bcbc1 Print out diff status code when we think there's a hard failure.
May help in debugging behavior on Windows.
2006-07-20 03:30:58 +00:00
Tom Lane c3104376f9 Suppress unused-variable compiler warning, per Andrew Dunstan. 2006-07-20 02:15:17 +00:00
Tom Lane 27a83103ea Fix pg_regress.c to report tests in a parallel group when they finish,
not when they're started.  This mimics a subtle point of the behavior
of the old shell script, and gives better feedback when watching the
tests.
2006-07-20 02:10:00 +00:00
Tom Lane 5652ea703b Make pg_regress.c get paths from pg_config_paths.h, instead of -D
switches passed from the Makefile.  This looks like it will fix
problem with virtual vs real paths under msys.
2006-07-20 01:16:57 +00:00
Tom Lane 60cfe25e68 Adjust spawn_process() to avoid unnecessary overhead processes: we can
just exec instead of creating a subprocess.  This reduces process usage
from four processes per parallel test to two.  I have no idea whether
a comparable optimization is possible or useful in the Windows port.
2006-07-19 17:02:59 +00:00
Tom Lane 5b8b137b16 Adjust pg_regress to print out the exact string given to system() when
'make install' or 'initdb' fails.  Also minor simplification of fgets()
usage --- fgets guarantees a trailing null anyway.
2006-07-19 16:23:17 +00:00
Tom Lane fe2c4e414a kill() is declared in <signal.h> per Single Unix Spec. 2006-07-19 05:21:57 +00:00
Tom Lane 1c5531b108 Tweak command quoting for Windows (I'd forgotten about SYSTEMQUOTE). 2006-07-19 04:50:57 +00:00
Tom Lane a38c85bd5d Rewrite pg_regress as a C program instead of a shell script.
This allows it to be used on Windows without installing mingw
(though you do still need 'diff'), and opens the door to future
improvements such as message localization.
Magnus Hagander and Tom Lane.
2006-07-19 02:37:00 +00:00