Create filgroup targets for test binaries.

This helps with discoverability of sharable test binaries.

Change-Id: I5d61027f8cca84d98da3e8f97d3714a3b5c7f77f
diff --git a/tests/cocotb/BUILD b/tests/cocotb/BUILD
index 8489fb4..f27a000 100644
--- a/tests/cocotb/BUILD
+++ b/tests/cocotb/BUILD
@@ -16,6 +16,7 @@
 load("//rules:kelvin_v2.bzl", "kelvin_v2_binary")
 load("//rules:utils.bzl", "template_rule")
 load("@kelvin_hw//third_party/python:requirements.bzl", "requirement")
+load("@rules_pkg//:pkg.bzl", "pkg_zip")
 
 package(default_visibility = ["//visibility:public"])
 
@@ -182,10 +183,7 @@
 RVV_TEST_BINARY_TARGETS = [
         "//tests/cocotb/rvv:rvv_load.elf",
         "//tests/cocotb/rvv:rvv_add.elf",
-        "//tests/cocotb/rvv:vstart_store.elf"] + [
-        "//tests/cocotb/rvv/arithmetics:rvv_{}_{}_m1.elf".format(TEST_OP, DTYPE)
-            for DTYPE in ["int8", "int16", "int32", "uint8", "uint16", "uint32"]
-            for TEST_OP in ["add", "sub", "mul", "div", "redsum", "redmin", "redmax"]
+        "//tests/cocotb/rvv:vstart_store.elf",
         ]
 
 verilator_cocotb_test(
@@ -303,27 +301,7 @@
         "@bazel_tools//tools/python/runfiles",
     ],
     data = [
-        '//tests/cocotb/rvv/load_store:load8_indexed_m1.elf',
-        '//tests/cocotb/rvv/load_store:load8_segment2_unit_m1.elf',
-        '//tests/cocotb/rvv/load_store:load16_segment2_unit_m1.elf',
-        '//tests/cocotb/rvv/load_store:load32_segment2_unit_m1.elf',
-        '//tests/cocotb/rvv/load_store:load8_segment2_unit_m2.elf',
-        '//tests/cocotb/rvv/load_store:load16_segment2_unit_m2.elf',
-        '//tests/cocotb/rvv/load_store:load32_segment2_unit_m2.elf',
-        '//tests/cocotb/rvv/load_store:load8_segment2_stride6_m1.elf',
-        '//tests/cocotb/rvv/load_store:load16_segment2_stride6_m1.elf',
-        '//tests/cocotb/rvv/load_store:load8_stride2_m1.elf',
-        '//tests/cocotb/rvv/load_store:load8_stride2_m1_partial.elf',
-        '//tests/cocotb/rvv/load_store:load8_stride2_mf4.elf',
-        '//tests/cocotb/rvv/load_store:load_store8_unit_m2.elf',
-        '//tests/cocotb/rvv/load_store:load_store16_unit_m2.elf',
-        '//tests/cocotb/rvv/load_store:load_store32_unit_m2.elf',
-        '//tests/cocotb/rvv/load_store:load16_stride4_m1.elf',
-        '//tests/cocotb/rvv/load_store:load16_stride4_m1_partial.elf',
-        '//tests/cocotb/rvv/load_store:load16_stride4_mf2.elf',
-        '//tests/cocotb/rvv/load_store:load32_stride8_m1.elf',
-        '//tests/cocotb/rvv/load_store:load32_stride8_m1_partial.elf',
-        '//tests/cocotb/rvv/load_store:store8_indexed_m1.elf',
+        "//tests/cocotb/rvv/load_store:rvv_load_store_tests",
     ],
     size = "large",
 )
@@ -340,7 +318,14 @@
         "@bazel_tools//tools/python/runfiles",
         requirement("tqdm"),
     ],
-    data = RVV_TEST_BINARY_TARGETS,
+    data = [ "//tests/cocotb/rvv/arithmetics:rvv_arith_tests" ],
     size = "large",
 )
 
+pkg_zip(
+    name = "rvv_test_binaries",
+    srcs = [
+        "//tests/cocotb/rvv/arithmetics:rvv_arith_tests",
+        "//tests/cocotb/rvv/load_store:rvv_load_store_tests",
+    ],
+)
\ No newline at end of file
diff --git a/tests/cocotb/rvv/arithmetics/BUILD b/tests/cocotb/rvv/arithmetics/BUILD
index 38d8ed7..5d2b813 100644
--- a/tests/cocotb/rvv/arithmetics/BUILD
+++ b/tests/cocotb/rvv/arithmetics/BUILD
@@ -75,3 +75,11 @@
         for (op, _, _, dtype, _) in MATH_OP_TYPE_PAIRS + REDUCTION_OP_TYPE_PAIRS
     }
 )
+
+filegroup(
+    name = "rvv_arith_tests",
+    srcs = [
+        ":rvv_{}_{}_m1.elf".format(op, dtype)
+        for (op, _, _, dtype, _) in MATH_OP_TYPE_PAIRS + REDUCTION_OP_TYPE_PAIRS
+    ],
+)
diff --git a/tests/cocotb/rvv/load_store/BUILD b/tests/cocotb/rvv/load_store/BUILD
index 2664908..aa9dd02 100644
--- a/tests/cocotb/rvv/load_store/BUILD
+++ b/tests/cocotb/rvv/load_store/BUILD
@@ -85,3 +85,30 @@
         },
     },
 )
+
+filegroup(
+    name = "rvv_load_store_tests",
+    srcs = [
+        ":load8_indexed_m1.elf",
+        ":load8_segment2_unit_m1.elf",
+        ":load16_segment2_unit_m1.elf",
+        ":load32_segment2_unit_m1.elf",
+        ":load8_segment2_unit_m2.elf",
+        ":load16_segment2_unit_m2.elf",
+        ":load32_segment2_unit_m2.elf",
+        ":load8_segment2_stride6_m1.elf",
+        ":load16_segment2_stride6_m1.elf",
+        ":load8_stride2_m1.elf",
+        ":load8_stride2_m1_partial.elf",
+        ":load8_stride2_mf4.elf",
+        ":load_store8_unit_m2.elf",
+        ":load_store16_unit_m2.elf",
+        ":load_store32_unit_m2.elf",
+        ":load16_stride4_m1.elf",
+        ":load16_stride4_m1_partial.elf",
+        ":load16_stride4_mf2.elf",
+        ":load32_stride8_m1.elf",
+        ":load32_stride8_m1_partial.elf",
+        ":store8_indexed_m1.elf",
+    ],
+)
\ No newline at end of file