• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (C) 2024 The Dagger Authors.
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
15# Starlark tests for jarjar
16
17load("//tools/jarjar:jarjar.bzl", "jarjar_library")
18
19# Test target used for validating rule.
20jarjar_library(
21    name = "test_target",
22    testonly = 1,
23    jars = [
24        ":test-library1.jar",
25        ":test-library2.jar",
26    ],
27    merge_meta_inf_files = ["utilities/libs.dep"],
28)
29
30# Test that validates jarjar with merged META-INF files.
31sh_test(
32    name = "validate_test_target",
33    srcs = [":jarjar_validator.sh"],
34    args = [
35        "$(location :test_target.jar)",
36        "utilities/libs.dep",
37        "$(location :expected_libs.dep)",
38    ],
39    data = [
40        ":expected_libs.dep",
41        ":test_target.jar",
42    ],
43)
44