Skip to content
This repository has been archived by the owner on Sep 5, 2023. It is now read-only.

Commit

Permalink
chore(py_library): add split_system_tests
Browse files Browse the repository at this point in the history
Source-Author: Takashi Matsuo <tmatsuo@google.com>
Source-Date: Fri Jul 31 16:17:13 2020 -0700
Source-Repo: googleapis/synthtool
Source-Sha: bfcdbe0da977b2de6c1c0471bb6dc2f1e13bf669
Source-Link: googleapis/synthtool@bfcdbe0
  • Loading branch information
yoshi-automation committed Dec 2, 2020
1 parent d5d6d02 commit db9a8db
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
8 changes: 7 additions & 1 deletion .kokoro/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,10 @@ python3.6 -m pip uninstall --yes --quiet nox-automation
python3.6 -m pip install --upgrade --quiet nox
python3.6 -m nox --version

python3.6 -m nox
# If NOX_SESSION is set, it only runs the specified session,
# otherwise run all the sessions.
if [[ -n "${NOX_SESSION:-}" ]]; then
python3.6 -m nox -s "${NOX_SESSION:-}"
else
python3.6 -m nox
fi
4 changes: 4 additions & 0 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,10 @@ def system(session):
"""Run the system test suite."""
system_test_path = os.path.join("tests", "system.py")
system_test_folder_path = os.path.join("tests", "system")

# Check the value of `RUN_SYSTEM_TESTS` env var. It defaults to true.
if os.environ.get("RUN_SYSTEM_TESTS", "true") == "false":
session.skip("RUN_SYSTEM_TESTS is set to false, skipping")
# Sanity check: Only run tests if the environment variable is set.
if not os.environ.get("GOOGLE_APPLICATION_CREDENTIALS", ""):
session.skip("Credentials must be set via environment variable")
Expand Down
4 changes: 2 additions & 2 deletions synth.metadata
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@
"git": {
"name": "synthtool",
"remote": "https://github.com/googleapis/synthtool.git",
"sha": "39b527a39f5cd56d4882b3874fc08eed4756cebe"
"sha": "bfcdbe0da977b2de6c1c0471bb6dc2f1e13bf669"
}
},
{
"git": {
"name": "synthtool",
"remote": "https://github.com/googleapis/synthtool.git",
"sha": "39b527a39f5cd56d4882b3874fc08eed4756cebe"
"sha": "bfcdbe0da977b2de6c1c0471bb6dc2f1e13bf669"
}
}
],
Expand Down

0 comments on commit db9a8db

Please sign in to comment.