From 43cd3a6e00646cd0d6b447158f781256a144424e Mon Sep 17 00:00:00 2001 From: Sean Klein <smklein@google.com> Date: Mon, 13 May 2019 00:42:40 +0000 Subject: [PATCH] [test][fzl] Relocate unit tests to exist alongside source Change-Id: I3f320db87460ca6eb7535d46243077562d1a6b5f --- .../{utest/fzl => ulib/fzl/test}/BUILD.gn | 14 +++++++++++- .../{utest/fzl => ulib/fzl/test}/fdio.cpp | 0 .../libfzl => ulib/fzl/test}/fzl-test.cpp | 0 .../fzl/test}/memory_probe_tests.cpp | 0 .../fzl/test}/owned-vmo-mapper-tests.cpp | 0 .../fzl/test}/resizeable-vmo-mapper-tests.cpp | 0 .../fzl/test}/vmo-pool-tests.cpp | 0 .../libfzl => ulib/fzl/test}/vmo-probe.cpp | 0 .../libfzl => ulib/fzl/test}/vmo-probe.h | 0 .../fzl/test}/vmo-vmar-tests.cpp | 0 zircon/system/utest/BUILD.gn | 3 +-- zircon/system/utest/libfzl/BUILD.gn | 22 ------------------- 12 files changed, 14 insertions(+), 25 deletions(-) rename zircon/system/{utest/fzl => ulib/fzl/test}/BUILD.gn (74%) rename zircon/system/{utest/fzl => ulib/fzl/test}/fdio.cpp (100%) rename zircon/system/{utest/libfzl => ulib/fzl/test}/fzl-test.cpp (100%) rename zircon/system/{utest/fzl => ulib/fzl/test}/memory_probe_tests.cpp (100%) rename zircon/system/{utest/libfzl => ulib/fzl/test}/owned-vmo-mapper-tests.cpp (100%) rename zircon/system/{utest/libfzl => ulib/fzl/test}/resizeable-vmo-mapper-tests.cpp (100%) rename zircon/system/{utest/libfzl => ulib/fzl/test}/vmo-pool-tests.cpp (100%) rename zircon/system/{utest/libfzl => ulib/fzl/test}/vmo-probe.cpp (100%) rename zircon/system/{utest/libfzl => ulib/fzl/test}/vmo-probe.h (100%) rename zircon/system/{utest/libfzl => ulib/fzl/test}/vmo-vmar-tests.cpp (100%) delete mode 100644 zircon/system/utest/libfzl/BUILD.gn diff --git a/zircon/system/utest/fzl/BUILD.gn b/zircon/system/ulib/fzl/test/BUILD.gn similarity index 74% rename from zircon/system/utest/fzl/BUILD.gn rename to zircon/system/ulib/fzl/test/BUILD.gn index 7762795e185..3242b7706d2 100644 --- a/zircon/system/utest/fzl/BUILD.gn +++ b/zircon/system/ulib/fzl/test/BUILD.gn @@ -2,10 +2,23 @@ # 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 = [ + ":fzl", + ] +} + test("fzl") { sources = [ "fdio.cpp", + "fzl-test.cpp", "memory_probe_tests.cpp", + "owned-vmo-mapper-tests.cpp", + "resizeable-vmo-mapper-tests.cpp", + "vmo-pool-tests.cpp", + "vmo-probe.cpp", + "vmo-vmar-tests.cpp", ] deps = [ "$zx/system/fidl/fuchsia-io:c", @@ -18,7 +31,6 @@ test("fzl") { "$zx/system/ulib/fdio", "$zx/system/ulib/fzl", "$zx/system/ulib/memfs", - "$zx/system/ulib/sync", "$zx/system/ulib/unittest", "$zx/system/ulib/zircon", "$zx/system/ulib/zx", diff --git a/zircon/system/utest/fzl/fdio.cpp b/zircon/system/ulib/fzl/test/fdio.cpp similarity index 100% rename from zircon/system/utest/fzl/fdio.cpp rename to zircon/system/ulib/fzl/test/fdio.cpp diff --git a/zircon/system/utest/libfzl/fzl-test.cpp b/zircon/system/ulib/fzl/test/fzl-test.cpp similarity index 100% rename from zircon/system/utest/libfzl/fzl-test.cpp rename to zircon/system/ulib/fzl/test/fzl-test.cpp diff --git a/zircon/system/utest/fzl/memory_probe_tests.cpp b/zircon/system/ulib/fzl/test/memory_probe_tests.cpp similarity index 100% rename from zircon/system/utest/fzl/memory_probe_tests.cpp rename to zircon/system/ulib/fzl/test/memory_probe_tests.cpp diff --git a/zircon/system/utest/libfzl/owned-vmo-mapper-tests.cpp b/zircon/system/ulib/fzl/test/owned-vmo-mapper-tests.cpp similarity index 100% rename from zircon/system/utest/libfzl/owned-vmo-mapper-tests.cpp rename to zircon/system/ulib/fzl/test/owned-vmo-mapper-tests.cpp diff --git a/zircon/system/utest/libfzl/resizeable-vmo-mapper-tests.cpp b/zircon/system/ulib/fzl/test/resizeable-vmo-mapper-tests.cpp similarity index 100% rename from zircon/system/utest/libfzl/resizeable-vmo-mapper-tests.cpp rename to zircon/system/ulib/fzl/test/resizeable-vmo-mapper-tests.cpp diff --git a/zircon/system/utest/libfzl/vmo-pool-tests.cpp b/zircon/system/ulib/fzl/test/vmo-pool-tests.cpp similarity index 100% rename from zircon/system/utest/libfzl/vmo-pool-tests.cpp rename to zircon/system/ulib/fzl/test/vmo-pool-tests.cpp diff --git a/zircon/system/utest/libfzl/vmo-probe.cpp b/zircon/system/ulib/fzl/test/vmo-probe.cpp similarity index 100% rename from zircon/system/utest/libfzl/vmo-probe.cpp rename to zircon/system/ulib/fzl/test/vmo-probe.cpp diff --git a/zircon/system/utest/libfzl/vmo-probe.h b/zircon/system/ulib/fzl/test/vmo-probe.h similarity index 100% rename from zircon/system/utest/libfzl/vmo-probe.h rename to zircon/system/ulib/fzl/test/vmo-probe.h diff --git a/zircon/system/utest/libfzl/vmo-vmar-tests.cpp b/zircon/system/ulib/fzl/test/vmo-vmar-tests.cpp similarity index 100% rename from zircon/system/utest/libfzl/vmo-vmar-tests.cpp rename to zircon/system/ulib/fzl/test/vmo-vmar-tests.cpp diff --git a/zircon/system/utest/BUILD.gn b/zircon/system/utest/BUILD.gn index 7b560e2733c..8c4164d248b 100644 --- a/zircon/system/utest/BUILD.gn +++ b/zircon/system/utest/BUILD.gn @@ -64,6 +64,7 @@ if (current_cpu != "") { "$zx/system/ulib/driver-integration-test/test", "$zx/system/ulib/fbl/test", "$zx/system/ulib/fvm/test", + "$zx/system/ulib/fzl/test", "$zx/system/ulib/gpt/test", "$zx/system/ulib/id_allocator/test", "$zx/system/ulib/kvstore:kvstore-test", @@ -127,7 +128,6 @@ if (current_cpu != "") { "fs-vnode", "futex-ownership", "fvm", - "fzl", "getentropy", "goldfish", "handle-alias", @@ -139,7 +139,6 @@ if (current_cpu != "") { "kcounter", "kernel-unittests", "launchpad", - "libfzl", "libhwreg", "libzx", "log", diff --git a/zircon/system/utest/libfzl/BUILD.gn b/zircon/system/utest/libfzl/BUILD.gn deleted file mode 100644 index 6eec9d29350..00000000000 --- a/zircon/system/utest/libfzl/BUILD.gn +++ /dev/null @@ -1,22 +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. - -test("libfzl") { - sources = [ - "fzl-test.cpp", - "owned-vmo-mapper-tests.cpp", - "resizeable-vmo-mapper-tests.cpp", - "vmo-pool-tests.cpp", - "vmo-probe.cpp", - "vmo-vmar-tests.cpp", - ] - deps = [ - "$zx/system/ulib/fbl", - "$zx/system/ulib/fdio", - "$zx/system/ulib/fzl", - "$zx/system/ulib/unittest", - "$zx/system/ulib/zircon", - "$zx/system/ulib/zx", - ] -} -- GitLab