Skip to content

Commit 7cad765

Browse files
gcf-owl-bot[bot]surbhigarg92
authored andcommitted
1 parent 099ae10 commit 7cad765

File tree

1 file changed

+20
-2
lines changed

1 file changed

+20
-2
lines changed

‎noxfile.py‎

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -294,8 +294,18 @@ def install_systemtest_dependencies(session, *constraints):
294294

295295

296296
@nox.session(python=SYSTEM_TEST_PYTHON_VERSIONS)
297-
@nox.parametrize("database_dialect", ["GOOGLE_STANDARD_SQL", "POSTGRESQL"])
298-
def system(session, database_dialect):
297+
@nox.parametrize(
298+
"protobuf_implementation,database_dialect",
299+
[
300+
("python", "GOOGLE_STANDARD_SQL"),
301+
("python", "POSTGRESQL"),
302+
("upb", "GOOGLE_STANDARD_SQL"),
303+
("upb", "POSTGRESQL"),
304+
("cpp", "GOOGLE_STANDARD_SQL"),
305+
("cpp", "POSTGRESQL"),
306+
],
307+
)
308+
def system(session, protobuf_implementation, database_dialect):
299309
"""Run the system test suite."""
300310
constraints_path = str(
301311
CURRENT_DIRECTORY / "testing" / f"constraints-{session.python}.txt"
@@ -329,6 +339,12 @@ def system(session, database_dialect):
329339

330340
install_systemtest_dependencies(session, "-c", constraints_path)
331341

342+
# TODO(https://github.com/googleapis/synthtool/issues/1976):
343+
# Remove the 'cpp' implementation once support for Protobuf 3.x is dropped.
344+
# The 'cpp' implementation requires Protobuf<4.
345+
if protobuf_implementation == "cpp":
346+
session.install("protobuf<4")
347+
332348
# Run py.test against the system tests.
333349
if system_test_exists:
334350
session.run(
@@ -338,6 +354,7 @@ def system(session, database_dialect):
338354
system_test_path,
339355
*session.posargs,
340356
env={
357+
"PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION": protobuf_implementation,
341358
"SPANNER_DATABASE_DIALECT": database_dialect,
342359
"SKIP_BACKUP_TESTS": "true",
343360
},
@@ -350,6 +367,7 @@ def system(session, database_dialect):
350367
system_test_folder_path,
351368
*session.posargs,
352369
env={
370+
"PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION": protobuf_implementation,
353371
"SPANNER_DATABASE_DIALECT": database_dialect,
354372
"SKIP_BACKUP_TESTS": "true",
355373
},

0 commit comments

Comments
 (0)