aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYifan Hong <elsk@google.com>2022-05-03 15:00:44 -0700
committerYifan Hong <elsk@google.com>2022-05-03 15:00:44 -0700
commit71f3154d078b13a0ece8e0fa2cd5cf66591f3110 (patch)
treebf4210db997e907f4cf7d00de9949a3ed6c2223c
parenta72a6514dbb68859d85ae9f03cf2c42cafd48fd2 (diff)
downloadbazel_common_rules-71f3154d078b13a0ece8e0fa2cd5cf66591f3110.tar.gz
s/test_mapping/test_mappings/g
Test: TH Bug: 228560650 Change-Id: I87b43dca6e507832a35983c10b5f7020a05f731b
-rw-r--r--test_mappings/BUILD (renamed from test_mapping/BUILD)2
-rw-r--r--test_mappings/test_mappings.bzl (renamed from test_mapping/test_mapping.bzl)14
-rwxr-xr-xtest_mappings/test_mappings.sh (renamed from test_mapping/test_mapping.sh)2
3 files changed, 9 insertions, 9 deletions
diff --git a/test_mapping/BUILD b/test_mappings/BUILD
index 1f48815..24c5e7d 100644
--- a/test_mapping/BUILD
+++ b/test_mappings/BUILD
@@ -13,5 +13,5 @@
# limitations under the License.
exports_files([
- "test_mapping.sh",
+ "test_mappings.sh",
])
diff --git a/test_mapping/test_mapping.bzl b/test_mappings/test_mappings.bzl
index e523fc3..fca527e 100644
--- a/test_mapping/test_mapping.bzl
+++ b/test_mappings/test_mappings.bzl
@@ -14,7 +14,7 @@
load("//build/bazel_common_rules/exec:embedded_exec.bzl", "embedded_exec")
-def test_mapping_dist(
+def test_mappings_dist(
name,
dist_dir = None,
**kwargs):
@@ -25,21 +25,21 @@ def test_mapping_dist(
For example:
```
- test_mapping(
- name = "my_test_mapping",
+ test_mappings(
+ name = "my_test_mappings",
args = ["--dist_dir", "out/dist"],
)
```
```
# generate to <workspace_root>/out/dist
- $ bazel run my_test_mapping
+ $ bazel run my_test_mappings
# generate to <workspace_root>/path
- $ bazel run my_test_mapping -- --dist_dir=path
+ $ bazel run my_test_mappings -- --dist_dir=path
# generate to /tmp/path
- $ bazel run my_test_mapping -- --dist_dir=/tmp/path
+ $ bazel run my_test_mappings -- --dist_dir=/tmp/path
```
Args:
@@ -49,7 +49,7 @@ def test_mapping_dist(
native.sh_binary(
name = name + "_internal",
- srcs = ["//build/bazel_common_rules/test_mapping:test_mapping.sh"],
+ srcs = ["//build/bazel_common_rules/test_mappings:test_mappings.sh"],
data = ["//prebuilts/build-tools:linux-x86"],
args = ["--dist_dir", dist_dir] if dist_dir else None,
**kwargs
diff --git a/test_mapping/test_mapping.sh b/test_mappings/test_mappings.sh
index 672ac83..6d4cc57 100755
--- a/test_mapping/test_mapping.sh
+++ b/test_mappings/test_mappings.sh
@@ -59,7 +59,7 @@ if [[ ! "$DIST_DIR" == /* ]]; then
fi
mkdir -p ${DIST_DIR}
-OUTPUT_FILE=${DIST_DIR}/test_mapping.zip
+OUTPUT_FILE=${DIST_DIR}/test_mappings.zip
echo "Generating ${OUTPUT_FILE}"
trap 'rm -f "$TMPFILE"' EXIT