Skip to content

Commit

Permalink
support filter flag from env
Browse files Browse the repository at this point in the history
  • Loading branch information
zpoint committed Jan 5, 2025
1 parent 98f1cb1 commit abe2525
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions .buildkite/generate_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,8 +244,7 @@ def _convert_quick_tests_core(test_files: List[str], filter_flag: List[str]):
@click.option(
'--filter-flag',
type=str,
help='Filter to include only a subset of pytest marks, e.g., managed_jobs',
default='all')
help='Filter to include only a subset of pytest marks, e.g., managed_jobs')
def main(filter_flag):
test_files = os.listdir('tests/smoke_tests')
release_files = []
Expand All @@ -259,11 +258,12 @@ def main(filter_flag):
else:
release_files.append(test_file_path)

if filter_flag == 'all':
filter_flag = []
else:
filter_flag = filter_flag or os.getenv('FILTER_FLAG')
if filter_flag:
filter_flag = filter_flag.split(',')
print(f'Filter flag: {filter_flag}')
print(f'Filter flag: {filter_flag}')
else:
filter_flag = []

_convert_release(release_files, filter_flag)
_convert_quick_tests_core(quick_tests_core_files, filter_flag)
Expand Down

0 comments on commit abe2525

Please sign in to comment.