Inroduce `timeout` parameter into `xnnpack_unit_test`

PiperOrigin-RevId: 346369664
diff --git a/BUILD.bazel b/BUILD.bazel
index 0b7e8f0..21be676 100644
--- a/BUILD.bazel
+++ b/BUILD.bazel
@@ -6799,6 +6799,7 @@
 
 xnnpack_unit_test(
     name = "deconvolution_nhwc_test",
+    timeout = "moderate",
     srcs = [
         "test/deconvolution-nhwc.cc",
         "test/deconvolution-operator-tester.h",
diff --git a/build_defs.bzl b/build_defs.bzl
index b6bec17..7af39c2 100644
--- a/build_defs.bzl
+++ b/build_defs.bzl
@@ -289,7 +289,7 @@
         }),
     )
 
-def xnnpack_unit_test(name, srcs, copts = [], mingw_copts = [], msys_copts = [], deps = [], tags = [], automatic = True):
+def xnnpack_unit_test(name, srcs, copts = [], mingw_copts = [], msys_copts = [], deps = [], tags = [], automatic = True,  timeout = "short"):
     """Unit test binary based on Google Test.
 
     Args:
@@ -303,6 +303,9 @@
       deps: The list of additional libraries to be linked. Google Test library
             (with main() function) is always added as a dependency and does not
             need to be explicitly specified.
+      tags: List of arbitrary text tags.
+      automatic: Whether to create the test or testable binary.
+      timeout: How long the test is expected to run before returning.
     """
 
     if automatic:
@@ -335,6 +338,7 @@
                 "//conditions:default": [],
             }),
             tags = tags,
+            timeout = timeout,
         )
     else:
         native.cc_binary(