blob: a6af0edcc3f651b0a85e19b81fed8d7c76cb4a2c [file] [log] [blame]
Avi Kondareddyea029422018-11-16 18:33:00 -08001load(
2 "@io_bazel_rules_docker//container:container.bzl",
3 "container_image",
4 "container_push",
5)
Maria Ignaciobfd41822019-08-07 14:28:01 -07006load("@rules_pkg//:pkg.bzl", "pkg_tar")
Avi Kondareddyea029422018-11-16 18:33:00 -08007load("@debs//file:packages.bzl", "packages")
8load("//:debs.bzl", "get_dep_list")
9
Maria Ignaciobfd41822019-08-07 14:28:01 -070010pkg_tar(
11 name = "lcov_configs",
12 package_dir = "/lcov",
13 srcs = [
14 "lcov/lcov.css",
15 "lcov/emerald.png",
16 "lcov/ruby.png",
17 ],
18)
19
Avi Kondareddyea029422018-11-16 18:33:00 -080020# build container using kunit.sh and latest kunitconfig from gerrit
21container_image(
22 name = "kunit",
23 base = "@debian_base//image",
24 debs = [packages[x] for x in get_dep_list()],
25 directory = "/",
26 entrypoint = "/kunit.sh",
27 files = [
28 "kunit.sh",
29 "@kunitconfig_repo//:kunitconfig",
30 ],
Maria Ignaciobfd41822019-08-07 14:28:01 -070031 tars = ["lcov_configs"],
Avi Kondareddyea029422018-11-16 18:33:00 -080032 mode = "777",
33 repository = "kunit-presubmit/kunit",
34)
35
36container_push(
37 name = "push_kunit",
38 format = "Docker",
39 image = ":kunit",
40 registry = "gcr.io",
41 repository = "kunit-presubmit/kunit",
42 tag = "latest",
43)
44
45# build test container using latest kunit source
46container_image(
47 name = "kunit_test",
48 base = ":kunit",
49 directory = "/kunit/linux",
50 env = {"ARTIFACTS": "kunit/artifacts"},
51 repository = "kunit-presubmit/test",
52 tars = ["@kunit_repo//:files"],
53 workdir = "/kunit/linux",
54)
Darya Verzhbinsky9fe6c352019-08-08 16:14:27 -070055
56py_library(
57 name = "lcov_parser",
58 srcs = ["lcov_parser/lcov_parser.py"],
59)
60
61py_test(
62 name = "lcov_parser_test",
David Gow99576e92019-08-30 15:52:12 -070063 srcs = ["lcov_parser/lcov_parser_test.py"],
Darya Verzhbinsky9fe6c352019-08-08 16:14:27 -070064 python_version = "PY3",
65 deps = ["lcov_parser/lcov_parser.py"],
66)