mirror of
https://github.com/wassname/ray.git
synced 2026-07-03 12:53:52 +08:00
20 lines
586 B
Python
20 lines
586 B
Python
import os
|
|
import pytest
|
|
from pathlib import Path
|
|
import sys
|
|
|
|
if __name__ == "__main__":
|
|
curr_dir = Path(__file__).parent
|
|
test_paths = curr_dir.rglob("test_*.py")
|
|
sorted_path = sorted(map(lambda path: str(path.absolute()), test_paths))
|
|
serve_tests_files = list(sorted_path)
|
|
|
|
print("Testing the following files")
|
|
for test_file in serve_tests_files:
|
|
print("->", test_file.split("/")[-1])
|
|
|
|
print("Setting RAY_SERVE_INTENTIONALLY_CRASH=1")
|
|
os.environ["RAY_SERVE_INTENTIONALLY_CRASH"] = "1"
|
|
|
|
sys.exit(pytest.main(["-v", "-s"] + serve_tests_files))
|