Add support for string buffers to ScopedPipe

Change-Id: Ia116eaf6c9905a10c8b3d0a79a08fc010821c7c3
Signed-off-by: James Kuszmaul <james.kuszmaul@bluerivertech.com>
diff --git a/aos/util/BUILD b/aos/util/BUILD
index a57ec79..0314069 100644
--- a/aos/util/BUILD
+++ b/aos/util/BUILD
@@ -223,16 +223,6 @@
     ],
 )
 
-cc_library(
-    name = "scoped_pipe",
-    srcs = ["scoped_pipe.cc"],
-    hdrs = ["scoped_pipe.h"],
-    target_compatible_with = ["@platforms//os:linux"],
-    deps = [
-        "@com_github_google_glog//:glog",
-    ],
-)
-
 cc_test(
     name = "file_test",
     size = "small",
@@ -246,6 +236,27 @@
     ],
 )
 
+cc_library(
+    name = "scoped_pipe",
+    srcs = ["scoped_pipe.cc"],
+    hdrs = ["scoped_pipe.h"],
+    target_compatible_with = ["@platforms//os:linux"],
+    deps = [
+        "@com_github_google_glog//:glog",
+        "@com_google_absl//absl/types:span",
+    ],
+)
+
+cc_test(
+    name = "scoped_pipe_test",
+    srcs = ["scoped_pipe_test.cc"],
+    target_compatible_with = ["@platforms//os:linux"],
+    deps = [
+        ":scoped_pipe",
+        "//aos/testing:googletest",
+    ],
+)
+
 py_library(
     name = "python_init",
     srcs = ["__init__.py"],