Skip to content

Commit

Permalink
build: Add remaining dejagnu test suites.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaqx0r committed Feb 6, 2024
1 parent 4253f75 commit 0f8d447
Show file tree
Hide file tree
Showing 8 changed files with 117 additions and 2 deletions.
2 changes: 2 additions & 0 deletions input/iptables-save/t/BUILD
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
package(default_visibility = ["//:__subpackages__"])

cc_binary(
name = "scan",
testonly = True,
Expand Down
16 changes: 16 additions & 0 deletions testsuite/fg-convert.dg/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
load("//testsuite:dejagnu.bzl", "dejagnu_test")

dejagnu_test(
name = "fg-convert",
srcs = glob(["**/*.exp"]),
data = glob(
[
"**/*.in",
"**/*.golden",
"include*.d/**",
],
exclude_directories = 0,
),
tool_exec = "//input/filtergen/t:convert",
deps = ["//testsuite/lib:fg-convert-dg"],
)
14 changes: 14 additions & 0 deletions testsuite/fg-emit.dg/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
load("//testsuite:dejagnu.bzl", "dejagnu_test")

dejagnu_test(
name = "fg-emit",
srcs = glob(["**/*.exp"]),
data = glob(
[
"**/*.in",
"**/*.golden",
],
),
tool_exec = "//input/filtergen/t:emit",
deps = ["//testsuite/lib:fg-emit-dg"],
)
13 changes: 13 additions & 0 deletions testsuite/fg-parse.dg/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
load("//testsuite:dejagnu.bzl", "dejagnu_test")

dejagnu_test(
name = "fg-parse",
srcs = glob(["**/*.exp"]),
data = glob(
[
"**/*.in",
],
) + ["include.conf"],
tool_exec = "//input/filtergen/t:parse",
deps = ["//testsuite/lib:fg-parse-dg"],
)
15 changes: 13 additions & 2 deletions testsuite/filtergen/BUILD
Original file line number Diff line number Diff line change
@@ -1,4 +1,15 @@
filegroup(
load("//testsuite:dejagnu.bzl", "dejagnu_test")

dejagnu_test(
name = "filtergen",
srcs = glob(["*.filter"]),
srcs = glob(["**/*.exp"]),
data = glob(
[
"**/*.in",
"include*.d/**",
],
exclude_directories = 0,
),
tool_exec = "//:filtergen",
deps = ["//testsuite/lib:filtergen-dg"],
)
13 changes: 13 additions & 0 deletions testsuite/ipts-parse.dg/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
load("//testsuite:dejagnu.bzl", "dejagnu_test")

dejagnu_test(
name = "ipts-parse",
srcs = glob(["**/*.exp"]),
data = glob(
[
"**/*.in",
],
),
tool_exec = "//input/iptables-save/t:parse",
deps = ["//testsuite/lib:ipts-parse-dg"],
)
15 changes: 15 additions & 0 deletions testsuite/ipts-scan.dg/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
load("//testsuite:dejagnu.bzl", "dejagnu_test")

dejagnu_test(
name = "ipts-scan",
srcs = glob(["**/*.exp"]),
data = glob(
[
"**/*.in",
"include*.d/**",
],
exclude_directories = 0,
),
tool_exec = "//input/iptables-save/t:scan",
deps = ["//testsuite/lib:ipts-scan-dg"],
)
31 changes: 31 additions & 0 deletions testsuite/lib/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,34 @@ filegroup(
name = "fg-scan-dg",
srcs = ["fg-scan-dg.exp"],
)

filegroup(
name = "fg-parse-dg",
srcs = ["fg-parse-dg.exp"],
)

filegroup(
name = "fg-emit-dg",
srcs = [
"compare.exp",
"fg-emit-dg.exp",
],
)

filegroup(
name = "fg-convert-dg",
srcs = [
"compare.exp",
"fg-convert-dg.exp",
],
)

filegroup(
name = "ipts-scan-dg",
srcs = ["ipts-scan-dg.exp"],
)

filegroup(
name = "ipts-parse-dg",
srcs = ["ipts-parse-dg.exp"],
)

0 comments on commit 0f8d447

Please sign in to comment.