blob: b16d39eb75c58204789846cf678e36a5ab12142f [file] [log] [blame]
Lorenz Brun547b33f2020-04-23 15:27:06 +02001load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
Serge Bazanski77cb6c52020-12-19 00:09:22 +01002load("//metropolis/test/ktest:ktest.bzl", "ktest")
Lorenz Brun1d801752020-04-02 09:24:51 +02003
4go_library(
5 name = "go_default_library",
6 srcs = [
7 "fsinfo.go",
8 "fsquota.go",
9 ],
Serge Bazanski77cb6c52020-12-19 00:09:22 +010010 importpath = "git.monogon.dev/source/nexantic.git/metropolis/node/common/fsquota",
Lorenz Brun1d801752020-04-02 09:24:51 +020011 visibility = ["//visibility:public"],
12 deps = [
Serge Bazanski77cb6c52020-12-19 00:09:22 +010013 "//metropolis/node/common/fsquota/fsxattrs:go_default_library",
14 "//metropolis/node/common/fsquota/quotactl:go_default_library",
Lorenz Brun1d801752020-04-02 09:24:51 +020015 "@org_golang_x_sys//unix:go_default_library",
16 ],
17)
Lorenz Brun547b33f2020-04-23 15:27:06 +020018
19go_test(
20 name = "go_default_test",
21 srcs = ["fsquota_test.go"],
22 embed = [":go_default_library"],
23 pure = "on",
24 deps = [
25 "@com_github_stretchr_testify//require:go_default_library",
26 "@org_golang_x_sys//unix:go_default_library",
27 ],
28)
29
30ktest(
31 tester = ":go_default_test",
32 deps = [
33 "//third_party/xfsprogs:mkfs.xfs",
34 ],
35 initramfs_extra = """
36file /mkfs.xfs $(location //third_party/xfsprogs:mkfs.xfs) 0755 0 0
37 """,
38 cmdline = "ramdisk_size=51200",
39)