Skip to content

Commit

Permalink
[ci/bazel][2] bazelize all other ray_release tests (ray-project#35032)
Browse files Browse the repository at this point in the history
Bazelize all other ray-release tests

Signed-off-by: Cuong Nguyen <[email protected]>
Signed-off-by: e428265 <[email protected]>
  • Loading branch information
can-anyscale authored and arvind-chandra committed Aug 31, 2023
1 parent 5e1d280 commit 8599a77
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 0 deletions.
45 changes: 45 additions & 0 deletions release/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -435,6 +435,21 @@ py_test(
],
)

py_test(
name = "test_anyscale_job_manager",
size = "small",
srcs = ["ray_release/tests/test_anyscale_job_manager.py"],
exec_compatible_with = [":hermetic_python"],
tags = [
"release_unit",
"team:ci",
],
deps = [
":ray_release",
bk_require("pytest"),
],
)

py_test(
name = "test_anyscale_job_wrapper",
size = "small",
Expand Down Expand Up @@ -565,6 +580,21 @@ py_test(
],
)

py_test(
name = "test_result",
size = "small",
srcs = ["ray_release/tests/test_result.py"],
exec_compatible_with = [":hermetic_python"],
tags = [
"release_unit",
"team:ci",
],
deps = [
":ray_release",
bk_require("pytest"),
],
)

py_test(
name = "test_run_script",
size = "small",
Expand All @@ -585,6 +615,21 @@ py_test(
],
)

py_test(
name = "test_template",
size = "small",
srcs = ["ray_release/tests/test_template.py"],
exec_compatible_with = [":hermetic_python"],
tags = [
"release_unit",
"team:ci",
],
deps = [
":ray_release",
bk_require("pytest"),
],
)

py_test(
name = "test_wheels",
size = "small",
Expand Down
6 changes: 6 additions & 0 deletions release/ray_release/tests/test_anyscale_job_manager.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import pytest
import sys
import tempfile
import os

Expand All @@ -19,3 +21,7 @@ def test_get_ray_error_logs():
) = AnyscaleJobManager._find_job_driver_and_ray_error_logs(tmpdir)
assert ray_error_log == "".join(ERROR_LOG_PATTERNS + ["haha"])
assert job_driver_log == "w00t"


if __name__ == "__main__":
sys.exit(pytest.main(["-v", __file__]))
6 changes: 6 additions & 0 deletions release/ray_release/tests/test_result.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import pytest
import sys
import os
from unittest import mock
from ray_release.result import handle_exception, ExitCode, ResultStatus
Expand Down Expand Up @@ -34,3 +36,7 @@ def test_handle_exception():
ResultStatus.INFRA_ERROR,
None,
)


if __name__ == "__main__":
sys.exit(pytest.main(["-v", __file__]))

0 comments on commit 8599a77

Please sign in to comment.