Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
lalten authored Nov 14, 2024
1 parent b4b756b commit caa4960
Show file tree
Hide file tree
Showing 9 changed files with 1,665 additions and 1 deletion.
11 changes: 11 additions & 0 deletions modules/lcov/2.2/MODULE.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
module(name = "lcov", version = "2.2", bazel_compatibility = [">=7.2.1"])

bazel_dep(name = "rules_perl", version = "0.2.4")
bazel_dep(name = "rules_cpan", version = "1.1.0")

cpan = use_extension("@rules_cpan//cpan:extensions.bzl", "cpan")
cpan.install(
name = "cpan_deps",
lock = "//:cpanfile.snapshot.lock.json",
)
use_repo(cpan, "cpan_deps")
51 changes: 51 additions & 0 deletions modules/lcov/2.2/overlay/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
load("@rules_perl//perl:perl.bzl", "perl_binary", "perl_library")

package(default_visibility = ["//visibility:public"])

exports_files(["**/*"])

perl_library(
name = "liblcov",
srcs = glob(["lib/**/*"]),
deps = ["@cpan_deps"],
)

[
perl_binary(
name = bin,
srcs = ["bin/" + bin],
deps = [":liblcov"],
)
for bin in [
"fix.pl",
"gendesc",
"genhtml",
"geninfo",
"genpng",
"get_changes.sh",
"get_version.sh",
"lcov",
"perl2lcov",
"py2lcov",
"xml2lcov",
]
]

genrule(
name = "gen_integration_test_sh",
outs = ["integration_test.sh"],
cmd = """cat <<'EOF' >$@
#!/bin/bash
set -euxo pipefail
genhtml="$(rootpath @lcov//:genhtml)"
test "$$("$$genhtml" 2>&1 --version)" == "genhtml: LCOV version 2.2-1"
""",
srcs = ["@lcov//:genhtml"],
executable = True
)

sh_test(
name = "integration_test",
srcs = ["integration_test.sh"],
data = ["@lcov//:genhtml"],
)
1 change: 1 addition & 0 deletions modules/lcov/2.2/overlay/MODULE.bazel
10 changes: 10 additions & 0 deletions modules/lcov/2.2/overlay/cpanfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
requires 'Capture::Tiny';
requires 'DateTime';
requires 'Devel::Cover';
requires 'Digest::MD5';
requires 'File::Spec';
requires 'JSON::PP';
requires 'Memory::Process';
requires 'Module::Load::Conditional';
requires 'Scalar::Util';
requires 'Time::HiRes';
Loading

0 comments on commit caa4960

Please sign in to comment.