mirror of https://github.com/zulip/zulip.git
test_script: Use alphabetically first matches in find_js_test_files.
Otherwise the behavior depends on the filesystem order. Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
parent
4a04cda956
commit
d4c8b01530
|
@ -105,12 +105,10 @@ def add_provision_check_override_param(parser: ArgumentParser) -> None:
|
|||
def find_js_test_files(test_dir: str, files: Iterable[str]) -> List[str]:
|
||||
test_files = []
|
||||
for file in files:
|
||||
for file_name in os.listdir(test_dir):
|
||||
if file_name.startswith(file):
|
||||
file = file_name
|
||||
break
|
||||
if not os.path.exists(file):
|
||||
file = os.path.join(test_dir, file)
|
||||
file = min(
|
||||
(file_name for file_name in os.listdir(test_dir) if file_name.startswith(file)),
|
||||
default=os.path.join(test_dir, file),
|
||||
)
|
||||
test_files.append(os.path.abspath(file))
|
||||
|
||||
if not test_files:
|
||||
|
|
Loading…
Reference in New Issue