From cd81fb2155f8ec995b9b99e46d5e3c7b11c4f340 Mon Sep 17 00:00:00 2001 From: Krista Pratico Date: Mon, 4 Jan 2021 14:13:14 -0800 Subject: [PATCH 1/2] add ignore list for samples --- scripts/devops_tasks/test_run_samples.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/devops_tasks/test_run_samples.py b/scripts/devops_tasks/test_run_samples.py index 1bdaddab638a..7dc53193c826 100644 --- a/scripts/devops_tasks/test_run_samples.py +++ b/scripts/devops_tasks/test_run_samples.py @@ -20,6 +20,10 @@ root_dir = os.path.abspath(os.path.join(os.path.abspath(__file__), "..", "..", "..")) +IGNORED_SAMPLES = { + "azure-eventgrid": [] +} + def run_samples(targeted_package): logging.info("running samples for {}".format(targeted_package)) @@ -27,10 +31,11 @@ def run_samples(targeted_package): samples_errors = [] sample_paths = [] samples_dir_path = os.path.abspath(os.path.join(targeted_package, "samples")) + package_name = os.path.basename(targeted_package) for path, subdirs, files in os.walk(samples_dir_path): for name in files: - if fnmatch(name, "*.py"): + if fnmatch(name, "*.py") and name not in IGNORED_SAMPLES.get(package_name, []): sample_paths.append(os.path.abspath(os.path.join(path, name))) if not sample_paths: From fc52f0a38e70cddd992eb98824f3cb40eb2f5410 Mon Sep 17 00:00:00 2001 From: Krista Pratico Date: Wed, 6 Jan 2021 12:46:13 -0800 Subject: [PATCH 2/2] add sample to ignore for eventgrid --- scripts/devops_tasks/test_run_samples.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/devops_tasks/test_run_samples.py b/scripts/devops_tasks/test_run_samples.py index 7dc53193c826..28f749c9d8ba 100644 --- a/scripts/devops_tasks/test_run_samples.py +++ b/scripts/devops_tasks/test_run_samples.py @@ -21,7 +21,7 @@ root_dir = os.path.abspath(os.path.join(os.path.abspath(__file__), "..", "..", "..")) IGNORED_SAMPLES = { - "azure-eventgrid": [] + "azure-eventgrid": ["__init__.py"] }