From 3e1b7bf8d6103eab4461d34a656ea6858ef52009 Mon Sep 17 00:00:00 2001 From: Tres Seaver Date: Mon, 10 Aug 2020 15:21:08 -0400 Subject: [PATCH 1/4] tests: split out snippets builds Toward #191 --- .kokoro/presubmit/presubmit.cfg | 4 ++++ .kokoro/presubmit/snippets-2.7.cfg | 7 +++++++ .kokoro/presubmit/snippets-3.8.cfg | 7 +++++++ noxfile.py | 4 ++++ 4 files changed, 22 insertions(+) create mode 100644 .kokoro/presubmit/snippets-2.7.cfg create mode 100644 .kokoro/presubmit/snippets-3.8.cfg diff --git a/.kokoro/presubmit/presubmit.cfg b/.kokoro/presubmit/presubmit.cfg index b158096f0..127157957 100644 --- a/.kokoro/presubmit/presubmit.cfg +++ b/.kokoro/presubmit/presubmit.cfg @@ -5,3 +5,7 @@ env_vars: { key: "RUN_SYSTEM_TESTS" value: "false" } +env_vars: { + key: "RUN_SNIPPETS" + value: "false" +} diff --git a/.kokoro/presubmit/snippets-2.7.cfg b/.kokoro/presubmit/snippets-2.7.cfg new file mode 100644 index 000000000..3bd6134d2 --- /dev/null +++ b/.kokoro/presubmit/snippets-2.7.cfg @@ -0,0 +1,7 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Only run this nox session. +env_vars: { + key: "NOX_SESSION" + value: "snippets-2.7" +} diff --git a/.kokoro/presubmit/snippets-3.8.cfg b/.kokoro/presubmit/snippets-3.8.cfg new file mode 100644 index 000000000..840d9e716 --- /dev/null +++ b/.kokoro/presubmit/snippets-3.8.cfg @@ -0,0 +1,7 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Only run this nox session. +env_vars: { + key: "NOX_SESSION" + value: "snippets-3.8" +} diff --git a/noxfile.py b/noxfile.py index 4664278f1..c1eed5016 100644 --- a/noxfile.py +++ b/noxfile.py @@ -106,6 +106,10 @@ def system(session): def snippets(session): """Run the snippets test suite.""" + # Check the value of `RUN_SNIPPETS` env var. It defaults to true. + if os.environ.get("RUN_SNIPPETS", "true") == "false": + session.skip("RUN_SNIPPETS is set to false, skipping") + # Sanity check: Only run snippets tests if the environment variable is set. if not os.environ.get("GOOGLE_APPLICATION_CREDENTIALS", ""): session.skip("Credentials must be set via environment variable.") From 2338e1bb9fcc5f08c91e93950ac7cf6aad5f6067 Mon Sep 17 00:00:00 2001 From: Tim Swast Date: Fri, 16 Oct 2020 14:38:56 -0500 Subject: [PATCH 2/4] change name to match internal CL 337405571 --- .kokoro/presubmit/presubmit.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.kokoro/presubmit/presubmit.cfg b/.kokoro/presubmit/presubmit.cfg index 127157957..7a4f1faeb 100644 --- a/.kokoro/presubmit/presubmit.cfg +++ b/.kokoro/presubmit/presubmit.cfg @@ -6,6 +6,6 @@ env_vars: { value: "false" } env_vars: { - key: "RUN_SNIPPETS" + key: "RUN_SYSTEM_TESTS" value: "false" } From 82557ee40cf01249b257348a370a5b649bc14be4 Mon Sep 17 00:00:00 2001 From: Tim Swast Date: Fri, 16 Oct 2020 14:39:41 -0500 Subject: [PATCH 3/4] typo --- .kokoro/presubmit/presubmit.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.kokoro/presubmit/presubmit.cfg b/.kokoro/presubmit/presubmit.cfg index 7a4f1faeb..17d071cae 100644 --- a/.kokoro/presubmit/presubmit.cfg +++ b/.kokoro/presubmit/presubmit.cfg @@ -6,6 +6,6 @@ env_vars: { value: "false" } env_vars: { - key: "RUN_SYSTEM_TESTS" + key: "RUN_SNIPPETS_TESTS" value: "false" } From a54cda43afeea858f13d096aa223b8da4547e6b9 Mon Sep 17 00:00:00 2001 From: Tim Swast Date: Fri, 16 Oct 2020 14:40:29 -0500 Subject: [PATCH 4/4] match internal CL 337405571 --- noxfile.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/noxfile.py b/noxfile.py index 798d73849..441782583 100644 --- a/noxfile.py +++ b/noxfile.py @@ -112,9 +112,9 @@ def system(session): def snippets(session): """Run the snippets test suite.""" - # Check the value of `RUN_SNIPPETS` env var. It defaults to true. - if os.environ.get("RUN_SNIPPETS", "true") == "false": - session.skip("RUN_SNIPPETS is set to false, skipping") + # Check the value of `RUN_SNIPPETS_TESTS` env var. It defaults to true. + if os.environ.get("RUN_SNIPPETS_TESTS", "true") == "false": + session.skip("RUN_SNIPPETS_TESTS is set to false, skipping") # Sanity check: Only run snippets tests if the environment variable is set. if not os.environ.get("GOOGLE_APPLICATION_CREDENTIALS", ""):