blob: 5fa7037c8becf4d8b14a888b0412b436f7464adf [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(
Lorenz Brund13c1c62022-03-30 19:58:58 +02005 name = "fsquota",
Lorenz Brun531e2c22021-11-17 20:00:05 +01006 srcs = ["fsquota.go"],
Serge Bazanski31370b02021-01-07 16:31:14 +01007 importpath = "source.monogon.dev/metropolis/pkg/fsquota",
Serge Bazanski0be9be82021-01-07 15:23:44 +01008 visibility = ["//metropolis:__subpackages__"],
Lorenz Brun1d801752020-04-02 09:24:51 +02009 deps = [
Lorenz Brund13c1c62022-03-30 19:58:58 +020010 "//metropolis/pkg/fsquota/fsxattrs",
11 "//metropolis/pkg/fsquota/quotactl",
12 "@org_golang_x_sys//unix",
Lorenz Brun1d801752020-04-02 09:24:51 +020013 ],
14)
Lorenz Brun547b33f2020-04-23 15:27:06 +020015
16go_test(
Lorenz Brund13c1c62022-03-30 19:58:58 +020017 name = "fsquota_test",
Lorenz Brun547b33f2020-04-23 15:27:06 +020018 srcs = ["fsquota_test.go"],
Lorenz Brund13c1c62022-03-30 19:58:58 +020019 embed = [":fsquota"],
Lorenz Brun547b33f2020-04-23 15:27:06 +020020 pure = "on",
21 deps = [
Lorenz Brund13c1c62022-03-30 19:58:58 +020022 "@com_github_stretchr_testify//require",
23 "@org_golang_x_sys//unix",
Lorenz Brun547b33f2020-04-23 15:27:06 +020024 ],
25)
26
27ktest(
Serge Bazanskif12bedf2021-01-15 16:58:50 +010028 cmdline = "ramdisk_size=51200",
Lorenz Brunddd6caf2021-03-04 17:16:04 +010029 files_cc = {
30 "@xfsprogs//:mkfs": "/mkfs.xfs",
31 },
Lorenz Brund13c1c62022-03-30 19:58:58 +020032 tester = ":fsquota_test",
Lorenz Brun547b33f2020-04-23 15:27:06 +020033)