verify_archive_test is useful but it can't be passed typical test attributes like size, testonly, or even visibility.
Ie. the following fails with bazel test:
verify_archive_test(
name = "verify_product_shared_only_package_contents",
size = "small",
testonly = True,
must_contain_regex = [
".*\\.so",
],
target = ":pkg_tar_shared_only",
visibility = ["//visibility:public"],
)
def verify_archive_test(
Error: verify_archive_test() got unexpected keyword arguments: size, testonly, visibility