Skip to content

Commit 8a0e7d8

Browse files
chore(python): fix prerelease session [autoapprove] (googleapis#613)
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 a7a7699 commit 8a0e7d8

2 files changed

Lines changed: 20 additions & 17 deletions

File tree

.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
@@ -372,7 +372,8 @@ def prerelease_deps(session):
372372

373373
# Install all dependencies
374374
session.install("-e", ".[all, tests, tracing]")
375-
session.install(*UNIT_TEST_STANDARD_DEPENDENCIES)
375+
unit_deps_all = UNIT_TEST_STANDARD_DEPENDENCIES + UNIT_TEST_EXTERNAL_DEPENDENCIES
376+
session.install(*unit_deps_all)
376377
system_deps_all = (
377378
SYSTEM_TEST_STANDARD_DEPENDENCIES
378379
+ SYSTEM_TEST_EXTERNAL_DEPENDENCIES
@@ -401,12 +402,6 @@ def prerelease_deps(session):
401402

402403
session.install(*constraints_deps)
403404

404-
if os.path.exists("samples/snippets/requirements.txt"):
405-
session.install("-r", "samples/snippets/requirements.txt")
406-
407-
if os.path.exists("samples/snippets/requirements-test.txt"):
408-
session.install("-r", "samples/snippets/requirements-test.txt")
409-
410405
prerel_deps = [
411406
"protobuf",
412407
# dependency of grpc
@@ -443,11 +438,19 @@ def prerelease_deps(session):
443438
system_test_folder_path = os.path.join("tests", "system")
444439

445440
# Only run system tests if found.
446-
if os.path.exists(system_test_path) or os.path.exists(system_test_folder_path):
447-
session.run("py.test", "tests/system")
448-
449-
snippets_test_path = os.path.join("samples", "snippets")
450-
451-
# Only run samples tests if found.
452-
if os.path.exists(snippets_test_path):
453-
session.run("py.test", "samples/snippets")
441+
if os.path.exists(system_test_path):
442+
session.run(
443+
"py.test",
444+
"--verbose",
445+
f"--junitxml=system_{session.python}_sponge_log.xml",
446+
system_test_path,
447+
*session.posargs,
448+
)
449+
if os.path.exists(system_test_folder_path):
450+
session.run(
451+
"py.test",
452+
"--verbose",
453+
f"--junitxml=system_{session.python}_sponge_log.xml",
454+
system_test_folder_path,
455+
*session.posargs,
456+
)

0 commit comments

Comments
 (0)