[fallback-rtc] Move test to location of driver

Change-Id: I1fc92b3addadac7026f70661e4dff568dce566ab
Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/390548
Reviewed-by: P.Y. Laligand <pylaligand@google.com>
Testability-Review: Suraj Malhotra <surajmalhotra@google.com>
Commit-Queue: Suraj Malhotra <surajmalhotra@google.com>
diff --git a/build/unification/images/BUILD.gn b/build/unification/images/BUILD.gn
index 675a5db..5c97a2c 100644
--- a/build/unification/images/BUILD.gn
+++ b/build/unification/images/BUILD.gn
@@ -679,7 +679,7 @@
     "//zircon/system/utest/devfs:devfs-manifest",
     "//zircon/system/utest/dlfcn:dlfcn-manifest",
     "//zircon/system/utest/evil:evil-manifest",
-    "//zircon/system/utest/fallback-rtc:fallback-rtc-manifest",
+    "//src/devices/rtc/drivers/fallback:fallback-rtc-manifest",
     "//zircon/system/utest/fidl:fidl-handle-policy-test-app-manifest",
     "//zircon/system/utest/fidl:fidl-manifest",
     "//zircon/system/utest/fs:fs-manifest",
@@ -882,7 +882,7 @@
     "//zircon/system/utest/devfs:devfs-manifest",
     "//zircon/system/utest/dlfcn:dlfcn-manifest",
     "//zircon/system/utest/evil:evil-manifest",
-    "//zircon/system/utest/fallback-rtc:fallback-rtc-manifest",
+    "//src/devices/rtc/drivers/fallback:fallback-rtc-manifest",
     "//zircon/system/utest/fidl:fidl-manifest",
     "//zircon/system/utest/fs:fs-manifest",
     "//zircon/system/utest/fs-bench:fs-bench-manifest",
diff --git a/src/devices/rtc/drivers/fallback/BUILD.gn b/src/devices/rtc/drivers/fallback/BUILD.gn
index 87ee658..a05a190 100644
--- a/src/devices/rtc/drivers/fallback/BUILD.gn
+++ b/src/devices/rtc/drivers/fallback/BUILD.gn
@@ -3,6 +3,7 @@
 # found in the LICENSE file.
 
 import("//build/config/fuchsia/rules.gni")
+import("//build/test.gni")
 import("//build/unification/images/migrated_manifest.gni")
 
 driver_module("fallback") {
@@ -25,3 +26,27 @@
 migrated_manifest("fallback-manifest") {
   deps = [ ":fallback" ]
 }
+
+test("fallback-rtc") {
+  # Dependent manifests unfortunately cannot be marked as `testonly`.
+  # TODO(44278): Remove when converting this file to proper GN build idioms.
+  testonly = false
+  configs += [ "//build/unification/config:zircon-migrated" ]
+  output_name = "fallback-rtc"
+  test_group = "ddk"
+  sources = [ "fallback-rtc-test.cc" ]
+  deps = [
+    "//sdk/fidl/fuchsia.hardware.rtc:fuchsia.hardware.rtc_c",
+    "//src/lib/ddk",
+    "//zircon/public/lib/fdio",
+    "//zircon/public/lib/zx",
+    "//zircon/public/lib/zxtest",
+    "//zircon/system/ulib/devmgr-integration-test",
+    "//zircon/system/ulib/driver-integration-test",
+    "//zircon/system/ulib/rtc",
+  ]
+}
+
+migrated_manifest("fallback-rtc-manifest") {
+  deps = [ ":fallback-rtc" ]
+}
diff --git a/zircon/system/utest/fallback-rtc/fallback-rtc-test.cc b/src/devices/rtc/drivers/fallback/fallback-rtc-test.cc
similarity index 100%
rename from zircon/system/utest/fallback-rtc/fallback-rtc-test.cc
rename to src/devices/rtc/drivers/fallback/fallback-rtc-test.cc
diff --git a/zircon/system/utest/fallback-rtc/BUILD.gn b/zircon/system/utest/fallback-rtc/BUILD.gn
deleted file mode 100644
index eba2ea8..0000000
--- a/zircon/system/utest/fallback-rtc/BUILD.gn
+++ /dev/null
@@ -1,40 +0,0 @@
-# Copyright 2019 The Fuchsia Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-##########################################
-# Though under //zircon, this build file #
-# is meant to be used in the Fuchsia GN  #
-# build.                                 #
-# See fxb/36139.                         #
-##########################################
-
-assert(!defined(zx) || zx != "/",
-       "This file can only be used in the Fuchsia GN build.")
-
-import("//build/test.gni")
-import("//build/unification/images/migrated_manifest.gni")
-
-test("fallback-rtc") {
-  # Dependent manifests unfortunately cannot be marked as `testonly`.
-  # TODO(44278): Remove when converting this file to proper GN build idioms.
-  testonly = false
-  configs += [ "//build/unification/config:zircon-migrated" ]
-  output_name = "fallback-rtc"
-  test_group = "ddk"
-  sources = [ "fallback-rtc-test.cc" ]
-  deps = [
-    "//sdk/fidl/fuchsia.hardware.rtc:fuchsia.hardware.rtc_c",
-    "//src/lib/ddk",
-    "//zircon/public/lib/fdio",
-    "//zircon/public/lib/zx",
-    "//zircon/public/lib/zxtest",
-    "//zircon/system/ulib/devmgr-integration-test",
-    "//zircon/system/ulib/driver-integration-test",
-    "//zircon/system/ulib/rtc",
-  ]
-}
-
-migrated_manifest("fallback-rtc-manifest") {
-  deps = [ ":fallback-rtc" ]
-}