[biotime] Merge test into bin directory
Bug: 52743
Change-Id: I188538751b47ab98e32ce295f5f1da8931d81f21
Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/390550
Testability-Review: Suraj Malhotra <surajmalhotra@google.com>
Commit-Queue: Suraj Malhotra <surajmalhotra@google.com>
Reviewed-by: P.Y. Laligand <pylaligand@google.com>
diff --git a/build/unification/images/BUILD.gn b/build/unification/images/BUILD.gn
index 5c97a2c..85da77e 100644
--- a/build/unification/images/BUILD.gn
+++ b/build/unification/images/BUILD.gn
@@ -636,7 +636,7 @@
"//zircon/system/ulib/uart/test:uart-unittests-manifest",
"//zircon/system/ulib/unittest/test:unittest-manifest",
"//zircon/system/ulib/zbi-bootfs/test:zbi-bootfs-test-manifest",
- "//zircon/system/utest/biotime:biotime-test-manifest",
+ "//src/devices/block/bin/biotime:biotime-test-manifest",
"//zircon/system/utest/core:c11-condvar-manifest",
"//zircon/system/utest/core:c11-mutex-manifest",
"//zircon/system/utest/core:c11-thread-manifest",
@@ -839,7 +839,7 @@
"//zircon/system/ulib/uart/test:uart-unittests-manifest",
"//zircon/system/ulib/unittest/test:unittest-manifest",
"//zircon/system/ulib/zbi-bootfs/test:zbi-bootfs-test-manifest",
- "//zircon/system/utest/biotime:biotime-test-manifest",
+ "//src/devices/block/bin/biotime:biotime-test-manifest",
"//zircon/system/utest/core:c11-condvar-manifest",
"//zircon/system/utest/core:c11-mutex-manifest",
"//zircon/system/utest/core:c11-thread-manifest",
diff --git a/src/devices/block/bin/biotime/BUILD.gn b/src/devices/block/bin/biotime/BUILD.gn
index 7306cff..b21ba5c 100644
--- a/src/devices/block/bin/biotime/BUILD.gn
+++ b/src/devices/block/bin/biotime/BUILD.gn
@@ -2,6 +2,7 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+import("//build/test.gni")
import("//build/unification/images/migrated_manifest.gni")
executable("biotime") {
@@ -27,3 +28,23 @@
migrated_manifest("biotime-manifest") {
deps = [ ":biotime" ]
}
+
+test("biotime-test") {
+ # 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" ]
+ sources = [ "biotime-test.cc" ]
+ output_name = "biotime-test"
+ deps = [
+ "//zircon/public/lib/fbl",
+ "//zircon/public/lib/fdio",
+ "//zircon/public/lib/zx",
+ "//zircon/public/lib/zxtest",
+ "//zircon/system/ulib/ramdevice-client",
+ ]
+}
+
+migrated_manifest("biotime-test-manifest") {
+ deps = [ ":biotime-test" ]
+}
diff --git a/zircon/system/utest/biotime/biotime-test.cc b/src/devices/block/bin/biotime/biotime-test.cc
similarity index 100%
rename from zircon/system/utest/biotime/biotime-test.cc
rename to src/devices/block/bin/biotime/biotime-test.cc
diff --git a/zircon/system/utest/biotime/BUILD.gn b/zircon/system/utest/biotime/BUILD.gn
deleted file mode 100644
index 703f9ab..0000000
--- a/zircon/system/utest/biotime/BUILD.gn
+++ /dev/null
@@ -1,36 +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("biotime-test") {
- # 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" ]
- sources = [ "biotime-test.cc" ]
- output_name = "biotime-test"
- deps = [
- "//zircon/public/lib/fbl",
- "//zircon/public/lib/fdio",
- "//zircon/public/lib/zx",
- "//zircon/public/lib/zxtest",
- "//zircon/system/ulib/ramdevice-client",
- ]
-}
-
-migrated_manifest("biotime-test-manifest") {
- deps = [ ":biotime-test" ]
-}