Skip to content

Commit

Permalink
Move cras_test_client to //cras/deprecated and document it
Browse files Browse the repository at this point in the history
BUG=b:322914985
TEST=CQ

Change-Id: Idb3cc824b2dbd51aaf8a21dcfa7402602543139b
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/adhd/+/5248555
Tested-by: chromeos-cop-builder@chromeos-cop.iam.gserviceaccount.com <chromeos-cop-builder@chromeos-cop.iam.gserviceaccount.com>
Auto-Submit: Li-Yu Yu <aaronyu@google.com>
Reviewed-by: Yu-Hsuan Hsu <yuhsuan@chromium.org>
Commit-Queue: Yu-Hsuan Hsu <yuhsuan@chromium.org>
  • Loading branch information
afq984 authored and Chromeos LUCI committed Jan 31, 2024
1 parent 41632c9 commit 3936bdb
Show file tree
Hide file tree
Showing 8 changed files with 43 additions and 23 deletions.
8 changes: 8 additions & 0 deletions cras/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,11 @@ generate_pc(
name = "libcras.pc",
src = "libcras.pc.in",
)

package_group(
name = "internal",
packages = [
"-//cras/include/...",
"//cras/...",
],
)
17 changes: 17 additions & 0 deletions cras/deprecated/cras_test_client/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Copyright 2024 The ChromiumOS Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

load("@rules_cc//cc:defs.bzl", "cc_binary")

cc_binary(
name = "cras_test_client",
srcs = ["cras_test_client.c"],
visibility = ["//dist:__pkg__"],
deps = [
"//cras/common:rust_common_cc",
"//cras/src/common:cras_types_internal",
"//cras/src/libcras:cras_client",
"//cras/src/server/rust:cc",
],
)
14 changes: 14 additions & 0 deletions cras/deprecated/cras_test_client/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# cras_test_client

Command line utility to interact with CRAS.

## Deprecation (go/cras_test_client_deprecation)

`cras_test_client` is deprecated in favor of `cras_tests`. It is preferred that
new code use `cras_tests` instead.

If you find a feature in `cras_test_client` that is missing in `cras_tests`,
please file an issue at our [public] or [internal] issue tracker.

[public]: https://issuetracker.google.com/issues?q=status:open%20componentid:960644
[internal]: https://issuetracker.google.com/issues?q=status:open%20componentid:167272
6 changes: 1 addition & 5 deletions cras/src/common/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -178,11 +178,7 @@ cc_library(
cc_library(
name = "cras_types_internal",
hdrs = ["cras_types_internal.h"],
visibility = [
"//cras/src/common:__pkg__",
"//cras/src/server:__pkg__",
"//cras/src/tools:__pkg__",
],
visibility = ["//cras:internal"],
deps = [
"//cras/include",
],
Expand Down
6 changes: 1 addition & 5 deletions cras/src/libcras/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,7 @@ cc_library(
"-lm",
"-lrt",
],
visibility = [
"//cras/benchmark:__pkg__",
"//cras/src/alsa_plugin:__pkg__",
"//cras/src/tools:__pkg__",
],
visibility = ["//cras:internal"],
deps = [
"//cras/include",
"//cras/src/common:cras_config",
Expand Down
11 changes: 0 additions & 11 deletions cras/src/tools/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,6 @@ package(
default_visibility = ["//dist:__pkg__"],
)

cc_binary(
name = "cras_test_client",
srcs = ["cras_test_client/cras_test_client.c"],
deps = [
"//cras/common:rust_common_cc",
"//cras/src/common:cras_types_internal",
"//cras/src/libcras:cras_client",
"//cras/src/server/rust:cc",
],
)

cc_binary(
name = "cras_monitor",
srcs = ["cras_monitor/cras_monitor.c"],
Expand Down
4 changes: 2 additions & 2 deletions dist/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ pkg_tar(
srcs = [
":alsa_lib",
":lib",
"//cras/src/tools:cras_test_client",
"//cras/deprecated/cras_test_client",
],
)

Expand All @@ -56,8 +56,8 @@ pkg_tar(
pkg_files(
name = "bin",
srcs = [
"//cras/deprecated/cras_test_client",
"//cras/src/server:cras",
"//cras/src/tools:cras_test_client",
],
attributes = EXECUTABLE_ATTRIBUTES,
prefix = "usr/bin",
Expand Down

0 comments on commit 3936bdb

Please sign in to comment.