Skip to content
This repository was archived by the owner on Jun 8, 2026. It is now read-only.

Commit ae49fde

Browse files
committed
splitting tests
1 parent 85c3460 commit ae49fde

4 files changed

Lines changed: 25 additions & 6 deletions

File tree

.kokoro/build.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@ fi
5555

5656
# If NOX_SESSION is set, it only runs the specified session,
5757
# otherwise run all the sessions.
58+
if [[ -n "${SPANNER_DATABASE_DIALECT:-}" ]]; then
59+
export SPANNER_DATABASE_DIALECT = ${SPANNER_DATABASE_DIALECT:-}
5860
if [[ -n "${NOX_SESSION:-}" ]]; then
5961
python3 -m nox -s ${NOX_SESSION:-}
6062
else
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Format: //devtools/kokoro/config/proto/build.proto
2+
3+
# Only run this nox session.
4+
env_vars: {
5+
key: "NOX_SESSION"
6+
value: "system-3.8"
7+
}
8+
9+
# Run for google standard sql
10+
env_vars: {
11+
key: "SPANNER_DATABASE_DIALECT"
12+
value: "GOOGLE_STANDARD_SQL"
13+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,10 @@
44
env_vars: {
55
key: "NOX_SESSION"
66
value: "system-3.8"
7+
}
8+
9+
# Run for postgres
10+
env_vars: {
11+
key: "SPANNER_DATABASE_DIALECT"
12+
value: "POSTGRESQL"
713
}

noxfile.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -238,15 +238,17 @@ def install_systemtest_dependencies(session, *constraints):
238238

239239

240240
@nox.session(python=SYSTEM_TEST_PYTHON_VERSIONS)
241-
@nox.parametrize("database_dialect", ["GOOGLE_STANDARD_SQL", "POSTGRESQL"])
242-
def system(session, database_dialect):
241+
def system(session):
243242
"""Run the system test suite."""
244243
constraints_path = str(
245244
CURRENT_DIRECTORY / "testing" / f"constraints-{session.python}.txt"
246245
)
247246
system_test_path = os.path.join("tests", "system.py")
248247
system_test_folder_path = os.path.join("tests", "system")
249248

249+
# If POSTGRESQL tests and Emulator, skip the tests
250+
if os.environ.get("SPANNER_EMULATOR_HOST") and os.environ.get("SPANNER_DATABASE_DIALECT") == "POSTGRESQL":
251+
session.skip("Postgresql is not supported by Emulator yet.")
250252
# Check the value of `RUN_SYSTEM_TESTS` env var. It defaults to true.
251253
if os.environ.get("RUN_SYSTEM_TESTS", "true") == "false":
252254
session.skip("RUN_SYSTEM_TESTS is set to false, skipping")
@@ -270,10 +272,6 @@ def system(session, database_dialect):
270272

271273
install_systemtest_dependencies(session, "-c", constraints_path)
272274

273-
# If POSTGRESQL tests and Emulator, skip the tests
274-
if os.environ.get("SPANNER_EMULATOR_HOST") and database_dialect == "POSTGRESQL":
275-
session.skip("Postgresql is not supported by Emulator yet.")
276-
277275
# Run py.test against the system tests.
278276
if system_test_exists:
279277
session.run(

0 commit comments

Comments
 (0)