diff options
author | Peter Eisentraut <peter_e@gmx.net> | 2016-09-30 12:00:00 -0400 |
---|---|---|
committer | Peter Eisentraut <peter_e@gmx.net> | 2016-09-30 21:32:33 -0400 |
commit | a4327296df7366ecc657b706a9b5e87aa921311a (patch) | |
tree | 11bb255a8e75972151ceef194544e1044287c134 /src/test/perl/TestLib.pm | |
parent | f002ed2b8e45286fe73a36e119cba2016ea0de19 (diff) |
Set log_line_prefix and application name in test drivers
Before pg_regress runs psql, set the application name to the test name.
Similarly, set the application name to the test file name in the TAP
tests. Also, set a default log_line_prefix that show the application
name, as well as the PID and a time stamp.
That way, the server log output can be correlated to the test input
files, making debugging a bit easier.
Diffstat (limited to 'src/test/perl/TestLib.pm')
-rw-r--r-- | src/test/perl/TestLib.pm | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/test/perl/TestLib.pm b/src/test/perl/TestLib.pm index 31e7acd4dae..d22957ceb0e 100644 --- a/src/test/perl/TestLib.pm +++ b/src/test/perl/TestLib.pm @@ -62,6 +62,8 @@ BEGIN delete $ENV{PGPORT}; delete $ENV{PGHOST}; + $ENV{PGAPPNAME} = $0; + # Must be set early $windows_os = $Config{osname} eq 'MSWin32' || $Config{osname} eq 'msys'; } |