From aa7e6920ec25929b7b0c929604cfdead9700a50b Mon Sep 17 00:00:00 2001
From: Sean Klein <smklein@google.com>
Date: Thu, 9 May 2019 11:34:08 -0700
Subject: [PATCH] [test][hwreg] Relocate unit tests to exist alongside source

Change-Id: Ia3851cab38e65b8d7be572aba9c5b89dc92c8167
---
 zircon/system/{utest/libhwreg => ulib/hwreg/test}/BUILD.gn | 7 +++++++
 .../{utest/libhwreg => ulib/hwreg/test}/bitfields-test.cpp | 0
 zircon/system/utest/BUILD.gn                               | 2 +-
 3 files changed, 8 insertions(+), 1 deletion(-)
 rename zircon/system/{utest/libhwreg => ulib/hwreg/test}/BUILD.gn (87%)
 rename zircon/system/{utest/libhwreg => ulib/hwreg/test}/bitfields-test.cpp (100%)

diff --git a/zircon/system/utest/libhwreg/BUILD.gn b/zircon/system/ulib/hwreg/test/BUILD.gn
similarity index 87%
rename from zircon/system/utest/libhwreg/BUILD.gn
rename to zircon/system/ulib/hwreg/test/BUILD.gn
index 2b20b26747d..be0fa02cc3e 100644
--- a/zircon/system/utest/libhwreg/BUILD.gn
+++ b/zircon/system/ulib/hwreg/test/BUILD.gn
@@ -2,6 +2,13 @@
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.
 
+group("test") {
+  testonly = true
+  deps = [
+    ":libhwreg",
+  ]
+}
+
 test("libhwreg") {
   sources = [
     "bitfields-test.cpp",
diff --git a/zircon/system/utest/libhwreg/bitfields-test.cpp b/zircon/system/ulib/hwreg/test/bitfields-test.cpp
similarity index 100%
rename from zircon/system/utest/libhwreg/bitfields-test.cpp
rename to zircon/system/ulib/hwreg/test/bitfields-test.cpp
diff --git a/zircon/system/utest/BUILD.gn b/zircon/system/utest/BUILD.gn
index 152777ef7e5..2e730bfbc8b 100644
--- a/zircon/system/utest/BUILD.gn
+++ b/zircon/system/utest/BUILD.gn
@@ -76,6 +76,7 @@ if (current_cpu != "") {
       "$zx/system/ulib/fvm/test",
       "$zx/system/ulib/fzl/test",
       "$zx/system/ulib/gpt/test",
+      "$zx/system/ulib/hwreg/test",
       "$zx/system/ulib/id_allocator/test",
       "$zx/system/ulib/launchpad/test",
       "$zx/system/ulib/libzbi/test",
@@ -148,7 +149,6 @@ if (current_cpu != "") {
       "int-types",
       "kcounter",
       "kernel-unittests",
-      "libhwreg",
       "log",
       "logger",
       "memfs",
-- 
GitLab