mirror of
https://github.com/postgres/postgres.git
synced 2025-06-22 02:52:08 +03:00
backpatch "Set application_name per-test in isolation and ecpg tests."
We started to backpatch test infrastructure improvements more aggressively to make it easier to backpatch test. A proposed isolationtester improvement has a dependency onb1907d688
, backpatchb1907d688
to make it easier to subsequently backpatch the new proposed isolationtester change. Discussion: https://postgr.es/m/861977.1639421872@sss.pgh.pa.us Backpatch: 10-12, the commit already is in 13-HEAD
This commit is contained in:
@ -95,6 +95,7 @@ ecpg_start_test(const char *testname,
|
||||
expectfile_source[MAXPGPATH];
|
||||
char cmd[MAXPGPATH * 3];
|
||||
char *testname_dash;
|
||||
char *appnameenv;
|
||||
|
||||
snprintf(inprg, sizeof(inprg), "%s/%s", inputdir, testname);
|
||||
|
||||
@ -144,6 +145,9 @@ ecpg_start_test(const char *testname,
|
||||
outfile_stdout,
|
||||
outfile_stderr);
|
||||
|
||||
appnameenv = psprintf("PGAPPNAME=ecpg/%s", testname_dash);
|
||||
putenv(appnameenv);
|
||||
|
||||
pid = spawn_process(cmd);
|
||||
|
||||
if (pid == INVALID_PID)
|
||||
@ -153,6 +157,10 @@ ecpg_start_test(const char *testname,
|
||||
exit(2);
|
||||
}
|
||||
|
||||
unsetenv("PGAPPNAME");
|
||||
free(appnameenv);
|
||||
|
||||
free(testname_dash);
|
||||
free(outfile_stdout);
|
||||
free(outfile_stderr);
|
||||
free(outfile_source);
|
||||
|
Reference in New Issue
Block a user