diff options
| author | Tom Lane | 2019-08-27 23:49:09 +0000 |
|---|---|---|
| committer | Tom Lane | 2019-08-27 23:49:09 +0000 |
| commit | b1907d6882205319822c7452ce6b5e71ee2867be (patch) | |
| tree | 03b089a5faa59fcdb57c18d948d90c113c1e019f /src/test/isolation | |
| parent | 458f01e254e0f0b1ccab8e4589aa8495781a933a (diff) | |
Set application_name per-test in isolation and ecpg tests.
Commit a4327296d taught pg_regress proper to do this, but
missed the opportunity to do likewise in the isolationtester
and ecpg variants of pg_regress. Seems like this might be
helpful for tracking down issues exposed by those tests.
Diffstat (limited to 'src/test/isolation')
| -rw-r--r-- | src/test/isolation/isolation_main.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/test/isolation/isolation_main.c b/src/test/isolation/isolation_main.c index 294bf30470a..b9e25337726 100644 --- a/src/test/isolation/isolation_main.c +++ b/src/test/isolation/isolation_main.c @@ -36,6 +36,7 @@ isolation_start_test(const char *testname, char expectfile[MAXPGPATH]; char psql_cmd[MAXPGPATH * 3]; size_t offset = 0; + char *appnameenv; /* need to do the path lookup here, check isolation_init() for details */ if (!looked_up_isolation_exec) @@ -97,6 +98,9 @@ isolation_start_test(const char *testname, exit(2); } + appnameenv = psprintf("PGAPPNAME=isolation/%s", testname); + putenv(appnameenv); + pid = spawn_process(psql_cmd); if (pid == INVALID_PID) @@ -106,6 +110,9 @@ isolation_start_test(const char *testname, exit(2); } + unsetenv("PGAPPNAME"); + free(appnameenv); + return pid; } |
