Always copy normalized files after a regress run (#6254)

Our python based tests didn't always copy the normalized files after the
regress run. I had the problem where running the following command would
result in non-normalized files in the expected directory after running
our PG upgrade tests locally:

```
cp src/test/regress/{results,expected}/upgrade_list_citus_objects.out
```

This PR fixes that by always running `copy_modified` even if the tests
fail. The same was already being done for our perl based tests at the
end of the `pg_regress_multi.pl` file.
pull/6270/head
Jelte Fennema 2022-08-30 09:15:29 +02:00 committed by GitHub
parent 13fe89f018
commit 5c95604154
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 2 deletions

View File

@ -137,7 +137,9 @@ def create_citus_extension(pg_path, node_ports):
def run_pg_regress(pg_path, pg_srcdir, port, schedule): def run_pg_regress(pg_path, pg_srcdir, port, schedule):
should_exit = True should_exit = True
try:
_run_pg_regress(pg_path, pg_srcdir, port, schedule, should_exit) _run_pg_regress(pg_path, pg_srcdir, port, schedule, should_exit)
finally:
subprocess.run("bin/copy_modified", check=True) subprocess.run("bin/copy_modified", check=True)