Skip to content

Commit 685d1c3

Browse files
chore(python): fix prerelease session [autoapprove] (#546)
Source-Link: googleapis/synthtool@1b9ad76 Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:9db98b055a7f8bd82351238ccaacfd3cda58cdf73012ab58b8da146368330021 Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent 645b6d2 commit 685d1c3

File tree

2 files changed

+20
-17
lines changed

2 files changed

+20
-17
lines changed

.github/.OwlBot.lock.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@
1313
# limitations under the License.
1414
docker:
1515
image: gcr.io/cloud-devrel-public-resources/owlbot-python:latest
16-
digest: sha256:e7bb19d47c13839fe8c147e50e02e8b6cf5da8edd1af8b82208cd6f66cc2829c
17-
# created: 2022-07-05T18:31:20.838186805Z
16+
digest: sha256:9db98b055a7f8bd82351238ccaacfd3cda58cdf73012ab58b8da146368330021
17+
# created: 2022-07-25T16:02:49.174178716Z

noxfile.py

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,8 @@ def prerelease_deps(session):
424424

425425
# Install all dependencies
426426
session.install("-e", ".[all, tests, tracing]")
427-
session.install(*UNIT_TEST_STANDARD_DEPENDENCIES)
427+
unit_deps_all = UNIT_TEST_STANDARD_DEPENDENCIES + UNIT_TEST_EXTERNAL_DEPENDENCIES
428+
session.install(*unit_deps_all)
428429
system_deps_all = (
429430
SYSTEM_TEST_STANDARD_DEPENDENCIES
430431
+ SYSTEM_TEST_EXTERNAL_DEPENDENCIES
@@ -453,12 +454,6 @@ def prerelease_deps(session):
453454

454455
session.install(*constraints_deps)
455456

456-
if os.path.exists("samples/snippets/requirements.txt"):
457-
session.install("-r", "samples/snippets/requirements.txt")
458-
459-
if os.path.exists("samples/snippets/requirements-test.txt"):
460-
session.install("-r", "samples/snippets/requirements-test.txt")
461-
462457
prerel_deps = [
463458
"protobuf",
464459
# dependency of grpc
@@ -495,11 +490,19 @@ def prerelease_deps(session):
495490
system_test_folder_path = os.path.join("tests", "system")
496491

497492
# Only run system tests if found.
498-
if os.path.exists(system_test_path) or os.path.exists(system_test_folder_path):
499-
session.run("py.test", "tests/system")
500-
501-
snippets_test_path = os.path.join("samples", "snippets")
502-
503-
# Only run samples tests if found.
504-
if os.path.exists(snippets_test_path):
505-
session.run("py.test", "samples/snippets")
493+
if os.path.exists(system_test_path):
494+
session.run(
495+
"py.test",
496+
"--verbose",
497+
f"--junitxml=system_{session.python}_sponge_log.xml",
498+
system_test_path,
499+
*session.posargs,
500+
)
501+
if os.path.exists(system_test_folder_path):
502+
session.run(
503+
"py.test",
504+
"--verbose",
505+
f"--junitxml=system_{session.python}_sponge_log.xml",
506+
system_test_folder_path,
507+
*session.posargs,
508+
)

0 commit comments

Comments
 (0)