Skip to content

Commit

Permalink
[serve] Separate BUILD files for tests and compress using `py_test_…
Browse files Browse the repository at this point in the history
…module_list` (ray-project#39971)

Previously we had one huge `BUILD` file including listing all test targets individually.

This splits it into a separate `BUILD` file for tests that uses `py_test_module_list` where possible to compress the test target definitions.

I also identified a few more pure unit tests and moved them over to the `tests/unit/` directory.
  • Loading branch information
edoakes authored Oct 2, 2023
1 parent 0f0622b commit ad1e06b
Show file tree
Hide file tree
Showing 28 changed files with 230 additions and 1,178 deletions.
6 changes: 3 additions & 3 deletions .buildkite/pipeline.build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
--test_env=DOCKER_CERT_PATH=/certs/client
--test_env=DOCKER_TLS_CERTDIR=/certs
--test_tag_filters=-post_wheel_build,-gpu,xcommit
python/ray/serve/...
python/ray/serve/tests/...

- label: ":python: Minimal install Python {{matrix}}"
conditions: ["RAY_CI_PYTHON_AFFECTED"]
Expand Down Expand Up @@ -90,9 +90,9 @@
- ./ci/env/install-serve.sh
- ./ci/env/env_info.sh
- bazel test --test_output=streamed --config=ci --test_env=RAY_DEFAULT=1 $(./ci/run/bazel_export_options)
python/ray/serve/test_deployment_graph
python/ray/serve/tests/test_deployment_graph
- bazel test --test_output=streamed --config=ci --test_env=RAY_DEFAULT=1 $(./ci/run/bazel_export_options)
python/ray/serve/test_api
python/ray/serve/tests/test_api

- label: ":python: civ1 tests"
conditions: ["RAY_CI_PYTHON_AFFECTED"]
Expand Down
1 change: 0 additions & 1 deletion bazel/python.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ def py_test_module_list(files, size, deps, extra_srcs=[], name_suffix="", **kwar

def py_test_run_all_subdirectory(include, exclude, extra_srcs, **kwargs):
for file in native.glob(include = include, exclude = exclude, allow_empty=False):
print(file)
basename = paths.split_extension(file)[0]
if basename == file:
basename = basename + "_test"
Expand Down
16 changes: 8 additions & 8 deletions ci/ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -215,13 +215,14 @@ test_python() {
python/ray/serve/...
python/ray/tests/...
python/ray/train:test_windows
-python/ray/serve:test_cross_language # Ray java not built on Windows yet.
-python/ray/serve:test_gcs_failure # Fork not supported in windows
-python/ray/serve:test_standalone_2 # Multinode not supported on Windows
-python/ray/serve:test_gradio
-python/ray/serve:test_gradio_visualization
-python/ray/serve:test_air_integrations_gpu
-python/ray/serve:test_fastapi
-python/ray/serve/tests:test_cross_language # Ray java not built on Windows yet.
-python/ray/serve/tests:test_gcs_failure # Fork not supported in windows
-python/ray/serve/tests:test_standalone_2 # Multinode not supported on Windows
-python/ray/serve/tests:test_gradio
-python/ray/serve/tests:test_gradio_visualization
-python/ray/serve/tests:test_air_integrations_gpu
-python/ray/serve/tests:test_fastapi
-python/ray/serve/tests:test_get_deployment # address violation
-python/ray/tests:test_actor_advanced # crashes in shutdown
-python/ray/tests:test_autoscaler # We don't support Autoscaler on Windows
-python/ray/tests:test_autoscaler_aws
Expand All @@ -230,7 +231,6 @@ test_python() {
-python/ray/tests:test_command_runner # We don't support Autoscaler on Windows
-python/ray/tests:test_gcp_tpu_command_runner # We don't support Autoscaler on Windows
-python/ray/tests:test_gcs_fault_tolerance # flaky
-python/ray/serve:test_get_deployment # address violation
-python/ray/tests:test_global_gc
-python/ray/tests:test_job
-python/ray/tests:test_memstat
Expand Down
Loading

0 comments on commit ad1e06b

Please sign in to comment.