mirror of
https://github.com/neondatabase/neon.git
synced 2026-01-16 01:42:55 +00:00
Change the workdir to test_output_dir
This commit is contained in:
@@ -15,7 +15,11 @@ from fixtures.pg_version import PgVersion
|
||||
@pytest.mark.timeout(7200)
|
||||
@pytest.mark.remote_cluster
|
||||
def test_cloud_regress(
|
||||
remote_pg: RemotePostgres, pg_version: PgVersion, pg_distrib_dir: Path, base_dir: Path
|
||||
remote_pg: RemotePostgres,
|
||||
pg_version: PgVersion,
|
||||
pg_distrib_dir: Path,
|
||||
base_dir: Path,
|
||||
test_output_dir: Path,
|
||||
):
|
||||
"""
|
||||
Run the regression tests
|
||||
@@ -36,8 +40,11 @@ def test_cloud_regress(
|
||||
"RETURNS int AS 'regress.so' LANGUAGE C STRICT STABLE PARALLEL SAFE;"
|
||||
)
|
||||
conn.rollback()
|
||||
regress_bin = pg_distrib_dir / f"{pg_version.v_prefixed}/lib/postgresql/pgxs/src/test/regress/pg_regress"
|
||||
runpath = base_dir / f"vendor/postgres-{pg_version.v_prefixed}/src/test/regress"
|
||||
regress_bin = (
|
||||
pg_distrib_dir
|
||||
/ f"{pg_version.v_prefixed}/lib/postgresql/pgxs/src/test/regress/pg_regress"
|
||||
)
|
||||
test_path = base_dir / f"vendor/postgres-{pg_version.v_prefixed}/src/test/regress"
|
||||
|
||||
env_vars = {
|
||||
"PGHOST": remote_pg.default_options["host"],
|
||||
@@ -52,11 +59,11 @@ def test_cloud_regress(
|
||||
}
|
||||
regress_cmd = [
|
||||
str(regress_bin),
|
||||
"--inputdir=.",
|
||||
f"--inputdir={test_path}",
|
||||
f"--bindir={pg_distrib_dir}/{pg_version.v_prefixed}/bin",
|
||||
"--dlpath=/usr/local/lib",
|
||||
"--max-concurrent-tests=20",
|
||||
"--schedule=./parallel_schedule",
|
||||
f"--schedule={test_path}/parallel_schedule",
|
||||
"--max-connections=5",
|
||||
]
|
||||
remote_pg.pg_bin.run(regress_cmd, env=env_vars, cwd=runpath)
|
||||
remote_pg.pg_bin.run(regress_cmd, env=env_vars, cwd=test_output_dir)
|
||||
|
||||
Reference in New Issue
Block a user