[zircon][unittest] Provide default main function in unittest library

This removes an inordinate number of boilerplate copies of the standard
main function for a test.  In the case of the core tests it (mostly)
obviates the need to compile each source file separately for standalone
and all-in-one incarnations, which the new build will take advantage of.

Bug: BLD-325
Test: CQ
Change-Id: I5e90852caf628300f85d0105a3195914f9528716
diff --git a/zircon/system/core/bootsvc/integration-test.cpp b/zircon/system/core/bootsvc/integration-test.cpp
index 344cbbb..456aab1 100644
--- a/zircon/system/core/bootsvc/integration-test.cpp
+++ b/zircon/system/core/bootsvc/integration-test.cpp
@@ -186,8 +186,3 @@
 RUN_TEST(TestStartupHandles)
 RUN_TEST(TestVdsosPresent)
 END_TEST_CASE(bootsvc_integration_tests)
-
-int main(int argc, char** argv) {
-    return unittest_run_all_tests(argc, argv) ? 0 : -1;
-}
-
diff --git a/zircon/system/core/devmgr/devmgr/test-main.cpp b/zircon/system/core/devmgr/devmgr/test-main.cpp
deleted file mode 100644
index de911d5..0000000
--- a/zircon/system/core/devmgr/devmgr/test-main.cpp
+++ /dev/null
@@ -1,9 +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.
-
-#include <unittest/unittest.h>
-
-int main(int argc, char** argv) {
-    return unittest_run_all_tests(argc, argv) ? 0 : 1;
-}
diff --git a/zircon/system/core/devmgr/rules.mk b/zircon/system/core/devmgr/rules.mk
index 97e2ada..5864a96 100644
--- a/zircon/system/core/devmgr/rules.mk
+++ b/zircon/system/core/devmgr/rules.mk
@@ -84,7 +84,6 @@
     $(LOCAL_DIR)/devmgr/device.cpp \
     $(LOCAL_DIR)/devmgr/driver.cpp \
     $(LOCAL_DIR)/devmgr/fidl.cpp \
-    $(LOCAL_DIR)/devmgr/test-main.cpp \
     $(LOCAL_DIR)/shared/env.cpp \
 
 MODULE_FIDL_LIBS := \
diff --git a/zircon/system/core/virtcon/textcon-test.cpp b/zircon/system/core/virtcon/textcon-test.cpp
index 93a30dc..db76ba97 100644
--- a/zircon/system/core/virtcon/textcon-test.cpp
+++ b/zircon/system/core/virtcon/textcon-test.cpp
@@ -747,9 +747,3 @@
 END_TEST_CASE(gfxconsole_textbuf_tests)
 
 }
-
-#ifndef BUILD_COMBINED_TESTS
-int main(int argc, char** argv) {
-    return unittest_run_all_tests(argc, argv) ? 0 : -1;
-}
-#endif
diff --git a/zircon/system/dev/block/fvm/rules.mk b/zircon/system/dev/block/fvm/rules.mk
index c7964e3..172fa60 100644
--- a/zircon/system/dev/block/fvm/rules.mk
+++ b/zircon/system/dev/block/fvm/rules.mk
@@ -60,7 +60,6 @@
 
 MODULE_SRCS := $(SHARED_SRCS) \
     $(TEST_DIR)/slice-extent-test.cpp \
-    $(TEST_DIR)/main.cpp \
 
 MODULE_STATIC_LIBS := \
     $(SHARED_STATIC_LIBS) \
diff --git a/zircon/system/dev/block/fvm/test/main.cpp b/zircon/system/dev/block/fvm/test/main.cpp
deleted file mode 100644
index 6a8bbb7..0000000
--- a/zircon/system/dev/block/fvm/test/main.cpp
+++ /dev/null
@@ -1,10 +0,0 @@
-// Copyright 2018 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.
-
-#include <fbl/alloc_checker.h>
-#include <unittest/unittest.h>
-
-int main(int argc, char** argv) {
-    return unittest_run_all_tests(argc, argv) ? 0 : -1;
-}
diff --git a/zircon/system/dev/block/usb-mass-storage/rules.mk b/zircon/system/dev/block/usb-mass-storage/rules.mk
index b1fe02d..7648324 100644
--- a/zircon/system/dev/block/usb-mass-storage/rules.mk
+++ b/zircon/system/dev/block/usb-mass-storage/rules.mk
@@ -39,7 +39,6 @@
 MODULE_SRCS := \
     $(LOCAL_DIR)/block.cpp \
     $(LOCAL_DIR)/tests/block.cpp \
-    $(LOCAL_DIR)/tests/main.c \
 
 MODULE_STATIC_LIBS := system/ulib/ddk \
     system/ulib/ddktl \
@@ -77,7 +76,6 @@
     $(LOCAL_DIR)/usb-mass-storage.cpp \
     $(LOCAL_DIR)/block.cpp \
     $(LOCAL_DIR)/tests/usb-mass-storage.cpp \
-    $(LOCAL_DIR)/tests/main.c \
 
 MODULE_STATIC_LIBS := system/ulib/ddk \
     system/ulib/ddktl \
diff --git a/zircon/system/dev/block/usb-mass-storage/tests/main.c b/zircon/system/dev/block/usb-mass-storage/tests/main.c
deleted file mode 100644
index faff464..0000000
--- a/zircon/system/dev/block/usb-mass-storage/tests/main.c
+++ /dev/null
@@ -1,9 +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.
-
-#include <unittest/unittest.h>
-
-int main(int argc, char** argv) {
-    return unittest_run_all_tests(argc, argv) ? 0 : -1;
-}
diff --git a/zircon/system/dev/bus/virtio/rules.mk b/zircon/system/dev/bus/virtio/rules.mk
index 60626b6..d381016 100644
--- a/zircon/system/dev/bus/virtio/rules.mk
+++ b/zircon/system/dev/bus/virtio/rules.mk
@@ -66,7 +66,6 @@
     $(LOCAL_DIR)/scsilib.cpp \
     $(LOCAL_DIR)/ring.cpp \
     $(LOCAL_DIR)/scsi_test.cpp \
-    $(LOCAL_DIR)/test_main.cpp \
 
 MODULE_STATIC_LIBS := \
     system/dev/lib/fake_ddk \
diff --git a/zircon/system/dev/bus/virtio/test_main.cpp b/zircon/system/dev/bus/virtio/test_main.cpp
deleted file mode 100644
index faff464..0000000
--- a/zircon/system/dev/bus/virtio/test_main.cpp
+++ /dev/null
@@ -1,9 +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.
-
-#include <unittest/unittest.h>
-
-int main(int argc, char** argv) {
-    return unittest_run_all_tests(argc, argv) ? 0 : -1;
-}
diff --git a/zircon/system/dev/lib/usb/rules.mk b/zircon/system/dev/lib/usb/rules.mk
index c6e9ffb..eef66d3 100644
--- a/zircon/system/dev/lib/usb/rules.mk
+++ b/zircon/system/dev/lib/usb/rules.mk
@@ -32,7 +32,6 @@
 
 MODULE_SRCS := \
     $(LOCAL_DIR)/tests/usb-wrapper-tests.cpp \
-    $(LOCAL_DIR)/tests/main.c \
     $(LOCAL_DIR)/usb.c \
     $(LOCAL_DIR)/usb-wrapper.cpp \
 
diff --git a/zircon/system/dev/lib/usb/tests/main.c b/zircon/system/dev/lib/usb/tests/main.c
deleted file mode 100644
index ed1a365..0000000
--- a/zircon/system/dev/lib/usb/tests/main.c
+++ /dev/null
@@ -1,9 +0,0 @@
-// Copyright 2017 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.
-
-#include <unittest/unittest.h>
-
-int main(int argc, char** argv) {
-    return unittest_run_all_tests(argc, argv) ? 0 : -1;
-}
diff --git a/zircon/system/dev/nand/nand/rules.mk b/zircon/system/dev/nand/nand/rules.mk
index 55a274e..88ae02e 100644
--- a/zircon/system/dev/nand/nand/rules.mk
+++ b/zircon/system/dev/nand/nand/rules.mk
@@ -50,7 +50,6 @@
 
 MODULE_SRCS := \
     $(LOCAL_DIR)/nand.cpp \
-    $(TEST_DIR)/main.cpp\
     $(TEST_DIR)/nand-test.cpp\
 
 MODULE_COMPILEFLAGS := \
diff --git a/zircon/system/dev/nand/nand/test/main.cpp b/zircon/system/dev/nand/nand/test/main.cpp
deleted file mode 100644
index faff464..0000000
--- a/zircon/system/dev/nand/nand/test/main.cpp
+++ /dev/null
@@ -1,9 +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.
-
-#include <unittest/unittest.h>
-
-int main(int argc, char** argv) {
-    return unittest_run_all_tests(argc, argv) ? 0 : -1;
-}
diff --git a/zircon/system/dev/nand/nandpart/rules.mk b/zircon/system/dev/nand/nandpart/rules.mk
index 148316c..18965ee 100644
--- a/zircon/system/dev/nand/nandpart/rules.mk
+++ b/zircon/system/dev/nand/nandpart/rules.mk
@@ -54,7 +54,6 @@
     $(LOCAL_DIR)/aml-bad-block.cpp \
     $(LOCAL_DIR)/bad-block.cpp \
     $(LOCAL_DIR)/nandpart-utils.cpp \
-    $(TEST_DIR)/main.cpp\
     $(TEST_DIR)/aml-bad-block-test.cpp\
     $(TEST_DIR)/nandpart-utils-test.cpp\
 
diff --git a/zircon/system/dev/nand/nandpart/test/main.cpp b/zircon/system/dev/nand/nandpart/test/main.cpp
deleted file mode 100644
index 7e15b95..0000000
--- a/zircon/system/dev/nand/nandpart/test/main.cpp
+++ /dev/null
@@ -1,9 +0,0 @@
-// Copyright 2018 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.
-
-#include <unittest/unittest.h>
-
-int main(int argc, char** argv) {
-    return unittest_run_all_tests(argc, argv) ? 0 : -1;
-}
diff --git a/zircon/system/dev/nand/ram-nand/rules.mk b/zircon/system/dev/nand/ram-nand/rules.mk
index 5ad0d4e..b289b29 100644
--- a/zircon/system/dev/nand/ram-nand/rules.mk
+++ b/zircon/system/dev/nand/ram-nand/rules.mk
@@ -46,7 +46,6 @@
 
 MODULE_SRCS += \
     $(LOCAL_DIR)/ram-nand.cpp \
-    $(TEST_DIR)/main.cpp \
     $(TEST_DIR)/ram-nand.cpp \
     $(TEST_DIR)/ram-nand-ctl.cpp \
 
diff --git a/zircon/system/dev/nand/ram-nand/test/main.cpp b/zircon/system/dev/nand/ram-nand/test/main.cpp
deleted file mode 100644
index 7e15b95..0000000
--- a/zircon/system/dev/nand/ram-nand/test/main.cpp
+++ /dev/null
@@ -1,9 +0,0 @@
-// Copyright 2018 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.
-
-#include <unittest/unittest.h>
-
-int main(int argc, char** argv) {
-    return unittest_run_all_tests(argc, argv) ? 0 : -1;
-}
diff --git a/zircon/system/dev/nand/skip-block/rules.mk b/zircon/system/dev/nand/skip-block/rules.mk
index bf604ea..71b7284 100644
--- a/zircon/system/dev/nand/skip-block/rules.mk
+++ b/zircon/system/dev/nand/skip-block/rules.mk
@@ -51,7 +51,6 @@
 MODULE_SRCS := \
     $(LOCAL_DIR)/logical-to-physical-map.cpp \
     $(TEST_DIR)/logical-to-physical-map-test.cpp \
-    $(TEST_DIR)/main.cpp \
 
 MODULE_COMPILEFLAGS := \
     -I$(LOCAL_DIR) \
diff --git a/zircon/system/dev/nand/skip-block/test/main.cpp b/zircon/system/dev/nand/skip-block/test/main.cpp
deleted file mode 100644
index 7e15b95..0000000
--- a/zircon/system/dev/nand/skip-block/test/main.cpp
+++ /dev/null
@@ -1,9 +0,0 @@
-// Copyright 2018 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.
-
-#include <unittest/unittest.h>
-
-int main(int argc, char** argv) {
-    return unittest_run_all_tests(argc, argv) ? 0 : -1;
-}
diff --git a/zircon/system/dev/test/operation/main.cpp b/zircon/system/dev/test/operation/main.cpp
deleted file mode 100644
index 8af51d4..0000000
--- a/zircon/system/dev/test/operation/main.cpp
+++ /dev/null
@@ -1,10 +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.
-#include <lib/operation/operation.h>
-
-#include <unittest/unittest.h>
-
-int main(int argc, char** argv) {
-    return unittest_run_all_tests(argc, argv) ? 0 : -1;
-}
diff --git a/zircon/system/dev/test/operation/rules.mk b/zircon/system/dev/test/operation/rules.mk
index 6c94629..6782b40 100644
--- a/zircon/system/dev/test/operation/rules.mk
+++ b/zircon/system/dev/test/operation/rules.mk
@@ -15,7 +15,6 @@
     $(LOCAL_DIR)/operation-list-test.cpp \
     $(LOCAL_DIR)/operation-pool-test.cpp \
     $(LOCAL_DIR)/operation-queue-test.cpp \
-    $(LOCAL_DIR)/main.cpp \
 
 MODULE_STATIC_LIBS := \
     system/dev/lib/fake_ddk \
diff --git a/zircon/system/dev/test/usb/main.cpp b/zircon/system/dev/test/usb/main.cpp
deleted file mode 100644
index faff464..0000000
--- a/zircon/system/dev/test/usb/main.cpp
+++ /dev/null
@@ -1,9 +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.
-
-#include <unittest/unittest.h>
-
-int main(int argc, char** argv) {
-    return unittest_run_all_tests(argc, argv) ? 0 : -1;
-}
diff --git a/zircon/system/dev/test/usb/rules.mk b/zircon/system/dev/test/usb/rules.mk
index 47d3780..9fdc5fa 100644
--- a/zircon/system/dev/test/usb/rules.mk
+++ b/zircon/system/dev/test/usb/rules.mk
@@ -11,7 +11,6 @@
 MODULE_NAME := usb-unittest
 
 MODULE_SRCS += \
-    $(LOCAL_DIR)/main.cpp \
     $(LOCAL_DIR)/usb-request-list-test.cpp \
     $(LOCAL_DIR)/usb-request-pool-test.cpp \
     $(LOCAL_DIR)/usb-request-queue-test.cpp \
diff --git a/zircon/system/uapp/disk-pave/rules.mk b/zircon/system/uapp/disk-pave/rules.mk
index 2e19b15..1f39845 100644
--- a/zircon/system/uapp/disk-pave/rules.mk
+++ b/zircon/system/uapp/disk-pave/rules.mk
@@ -69,7 +69,6 @@
 MODULE_SRCS := \
     $(LOCAL_DIR)/device-partitioner.cpp \
     $(LOCAL_DIR)/pave-utils.cpp \
-    $(TEST_DIR)/main.cpp\
     $(TEST_DIR)/device-partitioner-test.cpp\
 
 MODULE_COMPILEFLAGS := \
diff --git a/zircon/system/uapp/disk-pave/test/main.cpp b/zircon/system/uapp/disk-pave/test/main.cpp
deleted file mode 100644
index 7e15b95..0000000
--- a/zircon/system/uapp/disk-pave/test/main.cpp
+++ /dev/null
@@ -1,9 +0,0 @@
-// Copyright 2018 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.
-
-#include <unittest/unittest.h>
-
-int main(int argc, char** argv) {
-    return unittest_run_all_tests(argc, argv) ? 0 : -1;
-}
diff --git a/zircon/system/ulib/blobfs/rules.mk b/zircon/system/ulib/blobfs/rules.mk
index aba5a4c2..d4f1638 100644
--- a/zircon/system/ulib/blobfs/rules.mk
+++ b/zircon/system/ulib/blobfs/rules.mk
@@ -111,7 +111,6 @@
     $(TEST_DIR)/extent-reserver-test.cpp \
     $(TEST_DIR)/get-allocated-regions-test.cpp \
     $(TEST_DIR)/journal-test.cpp \
-    $(TEST_DIR)/main.cpp \
     $(TEST_DIR)/node-populator-test.cpp \
     $(TEST_DIR)/node-reserver-test.cpp \
     $(TEST_DIR)/utils.cpp \
diff --git a/zircon/system/ulib/blobfs/test/main.cpp b/zircon/system/ulib/blobfs/test/main.cpp
deleted file mode 100644
index 7e15b95..0000000
--- a/zircon/system/ulib/blobfs/test/main.cpp
+++ /dev/null
@@ -1,9 +0,0 @@
-// Copyright 2018 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.
-
-#include <unittest/unittest.h>
-
-int main(int argc, char** argv) {
-    return unittest_run_all_tests(argc, argv) ? 0 : -1;
-}
diff --git a/zircon/system/ulib/bootfs/parser-test.cpp b/zircon/system/ulib/bootfs/parser-test.cpp
index 77aaad4..68ebff7 100644
--- a/zircon/system/ulib/bootfs/parser-test.cpp
+++ b/zircon/system/ulib/bootfs/parser-test.cpp
@@ -220,8 +220,3 @@
 RUN_TEST(TestInitCantMap)
 RUN_TEST(TestParseSuccess)
 END_TEST_CASE(bootfs_tests)
-
-int main(int argc, char** argv) {
-    return unittest_run_all_tests(argc, argv) ? 0 : -1;
-}
-
diff --git a/zircon/system/ulib/ddk/rules.mk b/zircon/system/ulib/ddk/rules.mk
index 4507727..9078ed5 100644
--- a/zircon/system/ulib/ddk/rules.mk
+++ b/zircon/system/ulib/ddk/rules.mk
@@ -34,7 +34,6 @@
 
 MODULE_SRCS += \
     $(LOCAL_DIR)/phys-iter.c \
-    $(TEST_DIR)/main.cpp \
     $(TEST_DIR)/phys-iter-test.cpp \
 
 MODULE_STATIC_LIBS := \
diff --git a/zircon/system/ulib/ddk/test/main.cpp b/zircon/system/ulib/ddk/test/main.cpp
deleted file mode 100644
index faff464..0000000
--- a/zircon/system/ulib/ddk/test/main.cpp
+++ /dev/null
@@ -1,9 +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.
-
-#include <unittest/unittest.h>
-
-int main(int argc, char** argv) {
-    return unittest_run_all_tests(argc, argv) ? 0 : -1;
-}
diff --git a/zircon/system/ulib/driver-integration-test/test/main.cpp b/zircon/system/ulib/driver-integration-test/test/main.cpp
index 3021db9..9668e74 100644
--- a/zircon/system/ulib/driver-integration-test/test/main.cpp
+++ b/zircon/system/ulib/driver-integration-test/test/main.cpp
@@ -65,7 +65,3 @@
 BEGIN_TEST_CASE(driver_integration_tests)
 RUN_TEST(enumeration_test)
 END_TEST_CASE(driver_integration_tests);
-
-int main(int argc, char** argv) {
-    return unittest_run_all_tests(argc, argv) ? 0 : -1;
-}
diff --git a/zircon/system/ulib/kvstore/kvstore-test.c b/zircon/system/ulib/kvstore/kvstore-test.c
index 0325d3e..dd7f8e9 100644
--- a/zircon/system/ulib/kvstore/kvstore-test.c
+++ b/zircon/system/ulib/kvstore/kvstore-test.c
@@ -189,7 +189,3 @@
 RUN_TEST(kvs_get_put)
 RUN_TEST(kvs_wire_format)
 END_TEST_CASE(kvstore_tests)
-
-int main(int argc, char** argv) {
-    return unittest_run_all_tests(argc, argv) ? 0 : -1;
-}
diff --git a/zircon/system/ulib/pretty/test.c b/zircon/system/ulib/pretty/test.c
index b5514ea..4c88011 100644
--- a/zircon/system/ulib/pretty/test.c
+++ b/zircon/system/ulib/pretty/test.c
@@ -257,7 +257,3 @@
 RUN_TEST(hexdump_very_ex_test)
 RUN_TEST(hexdump8_very_ex_test)
 END_TEST_CASE(pretty_tests)
-
-int main(int argc, char** argv) {
-    return unittest_run_all_tests(argc, argv) ? 0 : -1;
-}
diff --git a/zircon/system/ulib/simplehid/test/simplehid-test.cpp b/zircon/system/ulib/simplehid/test/simplehid-test.cpp
index e39991b..8dfd2ad 100644
--- a/zircon/system/ulib/simplehid/test/simplehid-test.cpp
+++ b/zircon/system/ulib/simplehid/test/simplehid-test.cpp
@@ -106,10 +106,6 @@
 
 }  // namespace simplehid
 
-int main(int argc, char** argv) {
-    return unittest_run_all_tests(argc, argv) ? 0 : 1;
-}
-
 BEGIN_TEST_CASE(SimpleHidTests)
 RUN_TEST_SMALL(simplehid::TestNoReports)
 RUN_TEST_SMALL(simplehid::TestReports)
diff --git a/zircon/system/ulib/tftp/tftp-test.cpp b/zircon/system/ulib/tftp/tftp-test.cpp
index d036722..95453d2 100644
--- a/zircon/system/ulib/tftp/tftp-test.cpp
+++ b/zircon/system/ulib/tftp/tftp-test.cpp
@@ -2066,7 +2066,3 @@
 RUN_TEST(test_tftp_recv_busy_from_wrq)
 RUN_TEST(test_tftp_recv_other_err)
 END_TEST_CASE(tftp_recv_err)
-
-int main(int argc, char* argv[]) {
-    return unittest_run_all_tests(argc, argv) ? 0 : -1;
-}
diff --git a/zircon/system/ulib/trace-vthread/event_vthread_tests.cpp b/zircon/system/ulib/trace-vthread/event_vthread_tests.cpp
index 106d6b1..bc83903 100644
--- a/zircon/system/ulib/trace-vthread/event_vthread_tests.cpp
+++ b/zircon/system/ulib/trace-vthread/event_vthread_tests.cpp
@@ -224,7 +224,3 @@
 RUN_TEST(TestVthreadFlowStep)
 RUN_TEST(TestVthreadFlowEnd)
 END_TEST_CASE(event_thread_tests)
-
-int main(int argc, char** argv) {
-    return unittest_run_all_tests(argc, argv) ? 0 : -1;
-}
diff --git a/zircon/system/ulib/unittest/README.md b/zircon/system/ulib/unittest/README.md
index caba78d..1d6f31f 100644
--- a/zircon/system/ulib/unittest/README.md
+++ b/zircon/system/ulib/unittest/README.md
@@ -31,6 +31,9 @@
 Unittest has a set of options that it recognizes.
 All tests are expected to call `unittest_run_all_tests()`,
 which will ensure all tests get these options.
+The library supplies a default `main()` function that does this.
+So if a test has no interest in the arguments itself and needs no
+other special global initialization, it need not define its own `main` at all.
 
 However, tests can also have their own options. Since Unittest does not
 use any kind of general argv parsing library, and each test as well as
diff --git a/zircon/system/ulib/unittest/rules.mk b/zircon/system/ulib/unittest/rules.mk
index 27f3ee1..da6739a 100644
--- a/zircon/system/ulib/unittest/rules.mk
+++ b/zircon/system/ulib/unittest/rules.mk
@@ -14,6 +14,7 @@
     $(LOCAL_DIR)/crash-handler.cpp \
     $(LOCAL_DIR)/crash-list.cpp \
     $(LOCAL_DIR)/unittest.cpp \
+    $(LOCAL_DIR)/unittest-main.cpp \
     $(LOCAL_DIR)/watchdog.cpp \
 
 MODULE_SO_NAME := unittest
@@ -36,6 +37,7 @@
 MODULE_SRCS += \
     $(LOCAL_DIR)/all-tests.cpp \
     $(LOCAL_DIR)/unittest.cpp \
+    $(LOCAL_DIR)/unittest-main.cpp \
     $(LOCAL_DIR)/watchdog.cpp \
 
 MODULE_HOST_LIBS := system/ulib/pretty
diff --git a/zircon/system/ulib/unittest/unittest-main.cpp b/zircon/system/ulib/unittest/unittest-main.cpp
new file mode 100644
index 0000000..be566e0
--- /dev/null
+++ b/zircon/system/ulib/unittest/unittest-main.cpp
@@ -0,0 +1,17 @@
+// 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.
+
+#include <unittest/unittest.h>
+
+// The library provides a default main function so test programs don't need a
+// boilerplate main.  The main function is not special to the linker, so it can
+// come from a library like any other.  Naturally, if the main program provides
+// its own main function, the library's function will be ignored.
+
+// TODO(BLD-353): It shouldn't be necessary for this to be weak.
+// But the legacy Fuchsia GN build's "SDK import" logic turns a "source"
+// library into a source_set() rather than an actual static library.
+__WEAK int main(int argc, char** argv) {
+    return unittest_run_all_tests(argc, argv) ? 0 : -1;
+}
diff --git a/zircon/system/utest/abigen/abigen.c b/zircon/system/utest/abigen/abigen.c
index a82384a..d5c5530 100644
--- a/zircon/system/utest/abigen/abigen.c
+++ b/zircon/system/utest/abigen/abigen.c
@@ -33,8 +33,3 @@
 RUN_TEST(wrapper_test);
 RUN_TEST(syscall_test);
 END_TEST_CASE(launchpad_tests)
-
-int main(int argc, char **argv) {
-    bool success = unittest_run_all_tests(argc, argv);
-    return success ? 0 : -1;
-}
diff --git a/zircon/system/utest/async-loop/main.c b/zircon/system/utest/async-loop/main.c
deleted file mode 100644
index 7e15b95..0000000
--- a/zircon/system/utest/async-loop/main.c
+++ /dev/null
@@ -1,9 +0,0 @@
-// Copyright 2018 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.
-
-#include <unittest/unittest.h>
-
-int main(int argc, char** argv) {
-    return unittest_run_all_tests(argc, argv) ? 0 : -1;
-}
diff --git a/zircon/system/utest/async-loop/rules.mk b/zircon/system/utest/async-loop/rules.mk
index c02f144f..308114a 100644
--- a/zircon/system/utest/async-loop/rules.mk
+++ b/zircon/system/utest/async-loop/rules.mk
@@ -10,7 +10,6 @@
 
 MODULE_SRCS += \
     $(LOCAL_DIR)/loop_tests.cpp \
-    $(LOCAL_DIR)/main.c \
 
 MODULE_NAME := async-loop-test
 
diff --git a/zircon/system/utest/async-testutils/main.c b/zircon/system/utest/async-testutils/main.c
deleted file mode 100644
index 7e15b95..0000000
--- a/zircon/system/utest/async-testutils/main.c
+++ /dev/null
@@ -1,9 +0,0 @@
-// Copyright 2018 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.
-
-#include <unittest/unittest.h>
-
-int main(int argc, char** argv) {
-    return unittest_run_all_tests(argc, argv) ? 0 : -1;
-}
diff --git a/zircon/system/utest/async-testutils/rules.mk b/zircon/system/utest/async-testutils/rules.mk
index a5c58f4..37a3cc0b 100644
--- a/zircon/system/utest/async-testutils/rules.mk
+++ b/zircon/system/utest/async-testutils/rules.mk
@@ -10,7 +10,6 @@
 
 MODULE_SRCS += \
 	$(LOCAL_DIR)/test_loop_tests.cpp \
-	$(LOCAL_DIR)/main.c
 
 MODULE_NAME := async-testutils-test
 
diff --git a/zircon/system/utest/async/main.c b/zircon/system/utest/async/main.c
deleted file mode 100644
index ed1a365..0000000
--- a/zircon/system/utest/async/main.c
+++ /dev/null
@@ -1,9 +0,0 @@
-// Copyright 2017 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.
-
-#include <unittest/unittest.h>
-
-int main(int argc, char** argv) {
-    return unittest_run_all_tests(argc, argv) ? 0 : -1;
-}
diff --git a/zircon/system/utest/async/rules.mk b/zircon/system/utest/async/rules.mk
index b94ee4a..7df4339 100644
--- a/zircon/system/utest/async/rules.mk
+++ b/zircon/system/utest/async/rules.mk
@@ -11,7 +11,6 @@
 MODULE_SRCS += \
     $(LOCAL_DIR)/default_tests.cpp \
     $(LOCAL_DIR)/exception_tests.cpp \
-    $(LOCAL_DIR)/main.c \
     $(LOCAL_DIR)/receiver_tests.cpp \
     $(LOCAL_DIR)/time_tests.cpp \
     $(LOCAL_DIR)/task_tests.cpp \
diff --git a/zircon/system/utest/banjo-compiler/main.cpp b/zircon/system/utest/banjo-compiler/main.cpp
deleted file mode 100644
index 7e15b95..0000000
--- a/zircon/system/utest/banjo-compiler/main.cpp
+++ /dev/null
@@ -1,9 +0,0 @@
-// Copyright 2018 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.
-
-#include <unittest/unittest.h>
-
-int main(int argc, char** argv) {
-    return unittest_run_all_tests(argc, argv) ? 0 : -1;
-}
diff --git a/zircon/system/utest/banjo-compiler/rules.mk b/zircon/system/utest/banjo-compiler/rules.mk
index 7537134..ba9e3bf 100644
--- a/zircon/system/utest/banjo-compiler/rules.mk
+++ b/zircon/system/utest/banjo-compiler/rules.mk
@@ -61,7 +61,6 @@
 
 
 MODULE_SRCS := \
-    $(LOCAL_DIR)/main.cpp \
     $(LOCAL_DIR)/dup_attributes_tests.cpp \
     $(LOCAL_DIR)/flat_ast_tests.cpp \
     $(LOCAL_DIR)/formatter_unittests.cpp \
diff --git a/zircon/system/utest/biotime/biotime-test.cpp b/zircon/system/utest/biotime/biotime-test.cpp
index ec0b17b..9b553aa 100644
--- a/zircon/system/utest/biotime/biotime-test.cpp
+++ b/zircon/system/utest/biotime/biotime-test.cpp
@@ -75,8 +75,3 @@
 END_TEST_CASE(biotime_tests)
 
 }
-
-int main(int argc, char** argv) {
-    bool success = unittest_run_all_tests(argc, argv);
-    return success ? 0 : -1;
-}
diff --git a/zircon/system/utest/bitmap/main.c b/zircon/system/utest/bitmap/main.c
deleted file mode 100644
index 9bc8d0e..0000000
--- a/zircon/system/utest/bitmap/main.c
+++ /dev/null
@@ -1,9 +0,0 @@
-// Copyright 2016 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.
-
-#include <unittest/unittest.h>
-
-int main(int argc, char** argv) {
-    return unittest_run_all_tests(argc, argv) ? 0 : -1;
-}
diff --git a/zircon/system/utest/bitmap/rules.mk b/zircon/system/utest/bitmap/rules.mk
index 564e2d3..a5db8eb 100644
--- a/zircon/system/utest/bitmap/rules.mk
+++ b/zircon/system/utest/bitmap/rules.mk
@@ -9,7 +9,6 @@
 MODULE_TYPE := usertest
 
 MODULE_SRCS += \
-    $(LOCAL_DIR)/main.c \
     $(LOCAL_DIR)/raw-bitmap-tests.cpp \
     $(LOCAL_DIR)/rle-bitmap-tests.cpp \
 
diff --git a/zircon/system/utest/chromeos-disk-setup/chromeos-disk-setup.cpp b/zircon/system/utest/chromeos-disk-setup/chromeos-disk-setup.cpp
index f5af44b..be4cdac 100644
--- a/zircon/system/utest/chromeos-disk-setup/chromeos-disk-setup.cpp
+++ b/zircon/system/utest/chromeos-disk-setup/chromeos-disk-setup.cpp
@@ -592,7 +592,3 @@
 RUN_TEST(TestDiskTooSmall)
 RUN_TEST(TestIsCrosDevice)
 END_TEST_CASE(disk_wizard_tests)
-
-int main(int argc, char** argv) {
-    return unittest_run_all_tests(argc, argv) ? 0 : -1;
-}
diff --git a/zircon/system/utest/cleanup/cleanup.c b/zircon/system/utest/cleanup/cleanup.c
index e83c39d..ae5393a 100644
--- a/zircon/system/utest/cleanup/cleanup.c
+++ b/zircon/system/utest/cleanup/cleanup.c
@@ -87,7 +87,3 @@
 BEGIN_TEST_CASE(cleanup_tests)
 RUN_TEST(cleanup_test)
 END_TEST_CASE(cleanup_tests)
-
-int main(int argc, char** argv) {
-    return unittest_run_all_tests(argc, argv) ? 0 : -1;
-}
diff --git a/zircon/system/utest/cobalt-client/rules.mk b/zircon/system/utest/cobalt-client/rules.mk
index 2fda251..b90052b 100644
--- a/zircon/system/utest/cobalt-client/rules.mk
+++ b/zircon/system/utest/cobalt-client/rules.mk
@@ -15,7 +15,6 @@
     $(LOCAL_DIR)/counter_test.cpp \
     $(LOCAL_DIR)/histogram_test.cpp \
     $(LOCAL_DIR)/metric_options_test.cpp \
-    $(LOCAL_DIR)/test_main.cpp \
     $(LOCAL_DIR)/timer_test.cpp \
     $(LOCAL_DIR)/types_internal_test.cpp \
 
diff --git a/zircon/system/utest/cobalt-client/test_main.cpp b/zircon/system/utest/cobalt-client/test_main.cpp
deleted file mode 100644
index 9dc457b..0000000
--- a/zircon/system/utest/cobalt-client/test_main.cpp
+++ /dev/null
@@ -1,9 +0,0 @@
-// Copyright 2018 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.
-
-#include <unittest/unittest.h>
-
-int main(int argc, char** argv) {
-    return unittest_run_all_tests(argc, argv) ? 0 : 1;
-}
diff --git a/zircon/system/utest/compiler/integer.cpp b/zircon/system/utest/compiler/integer.cpp
index 6e33c48..7a8509b 100644
--- a/zircon/system/utest/compiler/integer.cpp
+++ b/zircon/system/utest/compiler/integer.cpp
@@ -64,7 +64,3 @@
 RUN_TEST_ENABLE_CRASH_HANDLER(signed_underflow_test)
 RUN_TEST_ENABLE_CRASH_HANDLER(divide_by_zero_test)
 END_TEST_CASE(integer_tests)
-
-int main(int argc, char** argv) {
-    return unittest_run_all_tests(argc, argv) ? 0 : -1;
-}
diff --git a/zircon/system/utest/core/bad-syscall/bad-syscall.c b/zircon/system/utest/core/bad-syscall/bad-syscall.c
index bd7f682..9fdf245 100644
--- a/zircon/system/utest/core/bad-syscall/bad-syscall.c
+++ b/zircon/system/utest/core/bad-syscall/bad-syscall.c
@@ -52,9 +52,3 @@
 RUN_TEST(bad_access_test)
 RUN_TEST(bad_syscall_num_test)
 END_TEST_CASE(bad_syscall_tests)
-
-#ifndef BUILD_COMBINED_TESTS
-int main(int argc, char** argv) {
-    return unittest_run_all_tests(argc, argv) ? 0 : -1;
-}
-#endif
diff --git a/zircon/system/utest/core/c11-condvar/condvar.c b/zircon/system/utest/core/c11-condvar/condvar.c
index a8e1641..fb6524e 100644
--- a/zircon/system/utest/core/c11-condvar/condvar.c
+++ b/zircon/system/utest/core/c11-condvar/condvar.c
@@ -118,9 +118,3 @@
 RUN_TEST(cnd_test)
 RUN_TEST(cnd_timedwait_timeout_test)
 END_TEST_CASE(cnd_tests)
-
-#ifndef BUILD_COMBINED_TESTS
-int main(int argc, char** argv) {
-    return unittest_run_all_tests(argc, argv) ? 0 : -1;
-}
-#endif
diff --git a/zircon/system/utest/core/c11-mutex/mutex.c b/zircon/system/utest/core/c11-mutex/mutex.c
index a616cd7..e15f1f9 100644
--- a/zircon/system/utest/core/c11-mutex/mutex.c
+++ b/zircon/system/utest/core/c11-mutex/mutex.c
@@ -242,9 +242,3 @@
 RUN_TEST(test_static_initializer)
 RUN_TEST(test_timeout_elapsed)
 END_TEST_CASE(mtx_tests)
-
-#ifndef BUILD_COMBINED_TESTS
-int main(int argc, char** argv) {
-    return unittest_run_all_tests(argc, argv) ? 0 : -1;
-}
-#endif
diff --git a/zircon/system/utest/core/c11-thread/thread.c b/zircon/system/utest/core/c11-thread/thread.c
index bb30bbb..e260527 100644
--- a/zircon/system/utest/core/c11-thread/thread.c
+++ b/zircon/system/utest/core/c11-thread/thread.c
@@ -118,9 +118,3 @@
 RUN_TEST(long_name_succeeds)
 RUN_TEST(detach_self_test)
 END_TEST_CASE(c11_thread_tests)
-
-#ifndef BUILD_COMBINED_TESTS
-int main(int argc, char** argv) {
-    return unittest_run_all_tests(argc, argv) ? 0 : -1;
-}
-#endif
diff --git a/zircon/system/utest/core/channel/channel.c b/zircon/system/utest/core/channel/channel.c
index 8fbbd12..e74818a 100644
--- a/zircon/system/utest/core/channel/channel.c
+++ b/zircon/system/utest/core/channel/channel.c
@@ -1067,9 +1067,3 @@
 RUN_TEST(channel_write_different_sizes)
 RUN_TEST(channel_write_takes_all_handles)
 END_TEST_CASE(channel_tests)
-
-#ifndef BUILD_COMBINED_TESTS
-int main(int argc, char** argv) {
-    return unittest_run_all_tests(argc, argv) ? 0 : -1;
-}
-#endif
diff --git a/zircon/system/utest/core/clock/clock.c b/zircon/system/utest/core/clock/clock.c
index 56a0d9c..8f8ce33 100644
--- a/zircon/system/utest/core/clock/clock.c
+++ b/zircon/system/utest/core/clock/clock.c
@@ -35,9 +35,3 @@
 BEGIN_TEST_CASE(clock_tests)
 RUN_TEST(clock_monotonic_test)
 END_TEST_CASE(clock_tests)
-
-#ifndef BUILD_COMBINED_TESTS
-int main(int argc, char** argv) {
-    return unittest_run_all_tests(argc, argv) ? 0 : -1;
-}
-#endif
diff --git a/zircon/system/utest/core/cookies/cookies.c b/zircon/system/utest/core/cookies/cookies.c
index 05f77a0..b2c9a5b 100644
--- a/zircon/system/utest/core/cookies/cookies.c
+++ b/zircon/system/utest/core/cookies/cookies.c
@@ -99,9 +99,3 @@
 RUN_TEST(test_cookie_actions);
 RUN_TEST(test_cookie_eventpair);
 END_TEST_CASE(cookie_tests)
-
-#ifndef BUILD_COMBINED_TESTS
-int main(int argc, char** argv) {
-    return unittest_run_all_tests(argc, argv) ? 0 : -1;
-}
-#endif
diff --git a/zircon/system/utest/core/echo/echo.c b/zircon/system/utest/core/echo/echo.c
index 2da036f..5dbab1d 100644
--- a/zircon/system/utest/core/echo/echo.c
+++ b/zircon/system/utest/core/echo/echo.c
@@ -146,10 +146,3 @@
 BEGIN_TEST_CASE(echo_tests)
 RUN_TEST(echo_test)
 END_TEST_CASE(echo_tests)
-
-
-#ifndef BUILD_COMBINED_TESTS
-int main(int argc, char** argv) {
-    return unittest_run_all_tests(argc, argv) ? 0 : -1;
-}
-#endif
diff --git a/zircon/system/utest/core/elf-tls/tls.cpp b/zircon/system/utest/core/elf-tls/tls.cpp
index fc75f17..c1ffd1c 100644
--- a/zircon/system/utest/core/elf-tls/tls.cpp
+++ b/zircon/system/utest/core/elf-tls/tls.cpp
@@ -174,9 +174,3 @@
 BEGIN_TEST_CASE(elf_tls_tests)
 RUN_TEST(ExecutableTlsTest)
 END_TEST_CASE(elf_tls_tests)
-
-#ifndef BUILD_COMBINED_TESTS
-int main(int argc, char** argv) {
-    return unittest_run_all_tests(argc, argv) ? 0 : -1;
-}
-#endif
diff --git a/zircon/system/utest/core/event-pair/event-pair.c b/zircon/system/utest/core/event-pair/event-pair.c
index ad6187a..8816a0c 100644
--- a/zircon/system/utest/core/event-pair/event-pair.c
+++ b/zircon/system/utest/core/event-pair/event-pair.c
@@ -135,9 +135,3 @@
 RUN_TEST(signal_peer_test)
 RUN_TEST(signal_peer_closed_test)
 END_TEST_CASE(eventpair_tests)
-
-#ifndef BUILD_COMBINED_TESTS
-int main(int argc, char** argv) {
-    return unittest_run_all_tests(argc, argv) ? 0 : -1;
-}
-#endif
diff --git a/zircon/system/utest/core/fifo/fifo.c b/zircon/system/utest/core/fifo/fifo.c
index ef76514..6d42959 100644
--- a/zircon/system/utest/core/fifo/fifo.c
+++ b/zircon/system/utest/core/fifo/fifo.c
@@ -166,9 +166,3 @@
 RUN_TEST(peer_closed_test)
 RUN_TEST(options_test)
 END_TEST_CASE(fifo_tests)
-
-#ifndef BUILD_COMBINED_TESTS
-int main(int argc, char** argv) {
-    return unittest_run_all_tests(argc, argv) ? 0 : -1;
-}
-#endif
diff --git a/zircon/system/utest/core/futex/futex.cpp b/zircon/system/utest/core/futex/futex.cpp
index b24e25f..eff10d2 100644
--- a/zircon/system/utest/core/futex/futex.cpp
+++ b/zircon/system/utest/core/futex/futex.cpp
@@ -560,10 +560,3 @@
 RUN_TEST(TestFutexMisaligned);
 RUN_TEST(TestEventSignaling);
 END_TEST_CASE(futex_tests)
-
-#ifndef BUILD_COMBINED_TESTS
-int main(int argc, char** argv) {
-    bool success = unittest_run_all_tests(argc, argv);
-    return success ? 0 : -1;
-}
-#endif
diff --git a/zircon/system/utest/core/handle-close/handle-close.c b/zircon/system/utest/core/handle-close/handle-close.c
index 4f0523e..5a9d9c8 100644
--- a/zircon/system/utest/core/handle-close/handle-close.c
+++ b/zircon/system/utest/core/handle-close/handle-close.c
@@ -102,9 +102,3 @@
 RUN_TEST(handle_close_many_invalid_test)
 RUN_TEST(handle_close_many_duplicate_test)
 END_TEST_CASE(handle_close_tests)
-
-#ifndef BUILD_COMBINED_TESTS
-int main(int argc, char** argv) {
-    return unittest_run_all_tests(argc, argv) ? 0 : -1;
-}
-#endif
diff --git a/zircon/system/utest/core/handle-info/handle-info.c b/zircon/system/utest/core/handle-info/handle-info.c
index dc57613..bff5b42 100644
--- a/zircon/system/utest/core/handle-info/handle-info.c
+++ b/zircon/system/utest/core/handle-info/handle-info.c
@@ -169,9 +169,3 @@
 RUN_TEST(handle_related_koid_test)
 RUN_TEST(handle_rights_test)
 END_TEST_CASE(handle_info_tests)
-
-#ifndef BUILD_COMBINED_TESTS
-int main(int argc, char** argv) {
-    return unittest_run_all_tests(argc, argv) ? 0 : -1;
-}
-#endif
diff --git a/zircon/system/utest/core/handle-transfer/handle-transfer.c b/zircon/system/utest/core/handle-transfer/handle-transfer.c
index 2ebed95..4d17b5b 100644
--- a/zircon/system/utest/core/handle-transfer/handle-transfer.c
+++ b/zircon/system/utest/core/handle-transfer/handle-transfer.c
@@ -144,9 +144,3 @@
 RUN_TEST(handle_transfer_test)
 RUN_TEST(handle_transfer_cancel_wait_test)
 END_TEST_CASE(handle_transfer_tests)
-
-#ifndef BUILD_COMBINED_TESTS
-int main(int argc, char** argv) {
-    return unittest_run_all_tests(argc, argv) ? 0 : -1;
-}
-#endif
diff --git a/zircon/system/utest/core/handle-wait/handle-wait.c b/zircon/system/utest/core/handle-wait/handle-wait.c
index 91d6750..218e078 100644
--- a/zircon/system/utest/core/handle-wait/handle-wait.c
+++ b/zircon/system/utest/core/handle-wait/handle-wait.c
@@ -286,10 +286,3 @@
 BEGIN_TEST_CASE(handle_wait_tests)
 RUN_TEST(handle_wait_test);
 END_TEST_CASE(handle_wait_tests)
-
-#ifndef BUILD_COMBINED_TESTS
-int main(int argc, char** argv) {
-    bool success = unittest_run_all_tests(argc, argv);
-    return success ? 0 : -1;
-}
-#endif
diff --git a/zircon/system/utest/core/job/jobs.cpp b/zircon/system/utest/core/job/jobs.cpp
index a464b2b..73121e9 100644
--- a/zircon/system/utest/core/job/jobs.cpp
+++ b/zircon/system/utest/core/job/jobs.cpp
@@ -445,10 +445,3 @@
 RUN_TEST(info_task_stats_fails)
 RUN_TEST(max_height_smoke)
 END_TEST_CASE(job_tests)
-
-#ifndef BUILD_COMBINED_TESTS
-int main(int argc, char** argv) {
-    bool success = unittest_run_all_tests(argc, argv);
-    return success ? 0 : -1;
-}
-#endif
diff --git a/zircon/system/utest/core/memory-mapping/memory-mapping.cpp b/zircon/system/utest/core/memory-mapping/memory-mapping.cpp
index a2e1f0b..cd4a93bf 100644
--- a/zircon/system/utest/core/memory-mapping/memory-mapping.cpp
+++ b/zircon/system/utest/core/memory-mapping/memory-mapping.cpp
@@ -269,10 +269,3 @@
 RUN_TEST(mmap_flags_test);
 RUN_TEST_ENABLE_CRASH_HANDLER(mprotect_test);
 END_TEST_CASE(memory_mapping_tests)
-
-#ifndef BUILD_COMBINED_TESTS
-int main(int argc, char** argv) {
-    bool success = unittest_run_all_tests(argc, argv);
-    return success ? 0 : -1;
-}
-#endif
diff --git a/zircon/system/utest/core/object-child/object-child.cpp b/zircon/system/utest/core/object-child/object-child.cpp
index 5ce966d..e574270a 100644
--- a/zircon/system/utest/core/object-child/object-child.cpp
+++ b/zircon/system/utest/core/object-child/object-child.cpp
@@ -29,9 +29,3 @@
 BEGIN_TEST_CASE(object_get_child_tests)
 RUN_TEST(handle_invalid);
 END_TEST_CASE(object_get_child_tests)
-
-#ifndef BUILD_COMBINED_TESTS
-int main(int argc, char** argv) {
-    return unittest_run_all_tests(argc, argv) ? 0 : -1;
-}
-#endif
diff --git a/zircon/system/utest/core/object-info/object-info.cpp b/zircon/system/utest/core/object-info/object-info.cpp
index 31d96674..85309ce 100644
--- a/zircon/system/utest/core/object-info/object-info.cpp
+++ b/zircon/system/utest/core/object-info/object-info.cpp
@@ -1081,9 +1081,3 @@
 RUN_TEST(handle_stats_control);
 
 END_TEST_CASE(object_info_tests)
-
-#ifndef BUILD_COMBINED_TESTS
-int main(int argc, char** argv) {
-    return unittest_run_all_tests(argc, argv) ? 0 : -1;
-}
-#endif
diff --git a/zircon/system/utest/core/pager/pager.cpp b/zircon/system/utest/core/pager/pager.cpp
index a44ec7f..24ffbd7 100644
--- a/zircon/system/utest/core/pager/pager.cpp
+++ b/zircon/system/utest/core/pager/pager.cpp
@@ -1797,12 +1797,3 @@
 END_TEST_CASE(api_violations)
 
 } // namespace pager_tests
-
-#ifndef BUILD_COMBINED_TESTS
-int main(int argc, char** argv) {
-    if (!unittest_run_all_tests(argc, argv)) {
-        return -1;
-    }
-    return 0;
-}
-#endif
diff --git a/zircon/system/utest/core/port/ports.cpp b/zircon/system/utest/core/port/ports.cpp
index 370ccb3..cf169d3 100644
--- a/zircon/system/utest/core/port/ports.cpp
+++ b/zircon/system/utest/core/port/ports.cpp
@@ -701,9 +701,3 @@
 RUN_TEST(threads_event_repeat)
 RUN_TEST_LARGE(cancel_stress)
 END_TEST_CASE(port_tests)
-
-#ifndef BUILD_COMBINED_TESTS
-int main(int argc, char** argv) {
-    return unittest_run_all_tests(argc, argv) ? 0 : -1;
-}
-#endif
diff --git a/zircon/system/utest/core/process/process.cpp b/zircon/system/utest/core/process/process.cpp
index 78ee0f7..f3f92c4 100644
--- a/zircon/system/utest/core/process/process.cpp
+++ b/zircon/system/utest/core/process/process.cpp
@@ -682,10 +682,3 @@
 RUN_TEST(suspend_twice_before_creating_threads);
 RUN_TEST(suspend_with_dying_thread);
 END_TEST_CASE(process_tests)
-
-#ifndef BUILD_COMBINED_TESTS
-int main(int argc, char** argv) {
-    bool success = unittest_run_all_tests(argc, argv);
-    return success ? 0 : -1;
-}
-#endif
diff --git a/zircon/system/utest/core/pthread-barrier/barrier.c b/zircon/system/utest/core/pthread-barrier/barrier.c
index e0f9af2..19a63ab 100644
--- a/zircon/system/utest/core/pthread-barrier/barrier.c
+++ b/zircon/system/utest/core/pthread-barrier/barrier.c
@@ -68,9 +68,3 @@
 BEGIN_TEST_CASE(pthread_barrier_tests)
 RUN_TEST(test_barrier)
 END_TEST_CASE(pthread_barrier_tests)
-
-#ifndef BUILD_COMBINED_TESTS
-int main(int argc, char** argv) {
-    return unittest_run_all_tests(argc, argv) ? 0 : -1;
-}
-#endif
diff --git a/zircon/system/utest/core/pthread-tls/tls-test.c b/zircon/system/utest/core/pthread-tls/tls-test.c
index 98c2957..8dd8a8a 100644
--- a/zircon/system/utest/core/pthread-tls/tls-test.c
+++ b/zircon/system/utest/core/pthread-tls/tls-test.c
@@ -75,9 +75,3 @@
 BEGIN_TEST_CASE(tls_tests)
 RUN_TEST(tls_test)
 END_TEST_CASE(tls_tests)
-
-#ifndef BUILD_COMBINED_TESTS
-int main(int argc, char** argv) {
-    return unittest_run_all_tests(argc, argv) ? 0 : -1;
-}
-#endif
diff --git a/zircon/system/utest/core/pthread/pthread.cpp b/zircon/system/utest/core/pthread/pthread.cpp
index 73703f8..00e6865 100644
--- a/zircon/system/utest/core/pthread/pthread.cpp
+++ b/zircon/system/utest/core/pthread/pthread.cpp
@@ -370,9 +370,3 @@
 RUN_TEST(pthread_getstack_main_thread)
 RUN_TEST(pthread_getstack_other_thread)
 END_TEST_CASE(pthread_tests)
-
-#ifndef BUILD_COMBINED_TESTS
-int main(int argc, char** argv) {
-    return unittest_run_all_tests(argc, argv) ? 0 : -1;
-}
-#endif
diff --git a/zircon/system/utest/core/socket/socket.cpp b/zircon/system/utest/core/socket/socket.cpp
index 4033a83..8c6b3ae 100644
--- a/zircon/system/utest/core/socket/socket.cpp
+++ b/zircon/system/utest/core/socket/socket.cpp
@@ -1405,9 +1405,3 @@
 RUN_TEST(socket_share_consumes_on_failure)
 RUN_TEST(socket_signals2)
 END_TEST_CASE(socket_tests)
-
-#ifndef BUILD_COMBINED_TESTS
-int main(int argc, char** argv) {
-    return unittest_run_all_tests(argc, argv) ? 0 : -1;
-}
-#endif
diff --git a/zircon/system/utest/core/stack/stack-test.c b/zircon/system/utest/core/stack/stack-test.c
index d960d0485..d975dc6 100644
--- a/zircon/system/utest/core/stack/stack-test.c
+++ b/zircon/system/utest/core/stack/stack-test.c
@@ -124,9 +124,3 @@
 RUN_TEST(main_thread_stack_tests)
 RUN_TEST(other_thread_stack_tests)
 END_TEST_CASE(stack_tests)
-
-#ifndef BUILD_COMBINED_TESTS
-int main(int argc, char** argv) {
-    return unittest_run_all_tests(argc, argv) ? 0 : -1;
-}
-#endif
diff --git a/zircon/system/utest/core/sync-completion/main.c b/zircon/system/utest/core/sync-completion/main.c
index ca7ffe1..cafcb19 100644
--- a/zircon/system/utest/core/sync-completion/main.c
+++ b/zircon/system/utest/core/sync-completion/main.c
@@ -82,9 +82,3 @@
 RUN_TEST(test_completions)
 RUN_TEST(test_timeout)
 END_TEST_CASE(sync_completion_tests)
-
-#ifndef BUILD_COMBINED_TESTS
-int main(int argc, char** argv) {
-    return unittest_run_all_tests(argc, argv) ? 0 : -1;
-}
-#endif
diff --git a/zircon/system/utest/core/sync-condition/condition.cpp b/zircon/system/utest/core/sync-condition/condition.cpp
index 73b9ff7..af536a6 100644
--- a/zircon/system/utest/core/sync-condition/condition.cpp
+++ b/zircon/system/utest/core/sync-condition/condition.cpp
@@ -44,10 +44,3 @@
 RUN_TEST(Condition::condition_test);
 RUN_TEST(Condition::condition_timeout_test);
 END_TEST_CASE(sync_condition_tests)
-
-#ifndef BUILD_COMBINED_TESTS
-int main(int argc, char** argv) {
-    bool success = unittest_run_all_tests(argc, argv);
-    return success ? 0 : -1;
-}
-#endif
diff --git a/zircon/system/utest/core/sync-mutex/mutex.c b/zircon/system/utest/core/sync-mutex/mutex.c
index 357dd10..b6c95ac 100644
--- a/zircon/system/utest/core/sync-mutex/mutex.c
+++ b/zircon/system/utest/core/sync-mutex/mutex.c
@@ -209,9 +209,3 @@
 RUN_TEST(test_try_mutexes)
 RUN_TEST(test_timeout_elapsed)
 END_TEST_CASE(sync_mutex_tests)
-
-#ifndef BUILD_COMBINED_TESTS
-int main(int argc, char** argv) {
-    return unittest_run_all_tests(argc, argv) ? 0 : -1;
-}
-#endif
diff --git a/zircon/system/utest/core/threads/threads.cpp b/zircon/system/utest/core/threads/threads.cpp
index 9761789..55edabce 100644
--- a/zircon/system/utest/core/threads/threads.cpp
+++ b/zircon/system/utest/core/threads/threads.cpp
@@ -1678,9 +1678,3 @@
 // RUN_TEST(TestDebugRegistersValidation);
 
 END_TEST_CASE(threads_tests)
-
-#ifndef BUILD_COMBINED_TESTS
-int main(int argc, char** argv) {
-    return unittest_run_all_tests(argc, argv) ? 0 : -1;
-}
-#endif
diff --git a/zircon/system/utest/core/time/ticks.c b/zircon/system/utest/core/time/ticks.c
index 92eb3e7..095c34d 100644
--- a/zircon/system/utest/core/time/ticks.c
+++ b/zircon/system/utest/core/time/ticks.c
@@ -28,9 +28,3 @@
 BEGIN_TEST_CASE(ticks_tests)
 RUN_TEST(elapsed_time_using_ticks)
 END_TEST_CASE(ticks_tests)
-
-#ifndef BUILD_COMBINED_TESTS
-int main(int argc, char** argv) {
-    return unittest_run_all_tests(argc, argv) ? 0 : -1;
-}
-#endif
diff --git a/zircon/system/utest/core/vmar/vmar.cpp b/zircon/system/utest/core/vmar/vmar.cpp
index 0eb3ea6b..0246298 100644
--- a/zircon/system/utest/core/vmar/vmar.cpp
+++ b/zircon/system/utest/core/vmar/vmar.cpp
@@ -2025,10 +2025,3 @@
 RUN_TEST(partial_unmap_and_write);
 RUN_TEST(partial_unmap_with_vmar_offset);
 END_TEST_CASE(vmar_tests)
-
-#ifndef BUILD_COMBINED_TESTS
-int main(int argc, char** argv) {
-    bool success = unittest_run_all_tests(argc, argv);
-    return success ? 0 : -1;
-}
-#endif
diff --git a/zircon/system/utest/core/vmo-signal/vmo-signal.c b/zircon/system/utest/core/vmo-signal/vmo-signal.c
index 99b73fb..552a197 100644
--- a/zircon/system/utest/core/vmo-signal/vmo-signal.c
+++ b/zircon/system/utest/core/vmo-signal/vmo-signal.c
@@ -130,9 +130,3 @@
 RUN_TEST(vmo_child_signal_clone_test)
 RUN_TEST(vmo_child_signal_map_test)
 END_TEST_CASE(vmo_signal_tests)
-
-#ifndef BUILD_COMBINED_TESTS
-int main(int argc, char** argv) {
-    return unittest_run_all_tests(argc, argv) ? 0 : -1;
-}
-#endif
diff --git a/zircon/system/utest/cprng/cprng.c b/zircon/system/utest/cprng/cprng.c
index 97e8870..605e967 100644
--- a/zircon/system/utest/cprng/cprng.c
+++ b/zircon/system/utest/cprng/cprng.c
@@ -47,7 +47,3 @@
 RUN_TEST(cprng_test_add_entropy_buf_too_large)
 RUN_TEST(cprng_test_add_entropy_bad_buf)
 END_TEST_CASE(cprng_tests)
-
-int main(int argc, char** argv) {
-    return unittest_run_all_tests(argc, argv) ? 0 : -1;
-}
diff --git a/zircon/system/utest/crypto/main.c b/zircon/system/utest/crypto/main.c
deleted file mode 100644
index ed1a365..0000000
--- a/zircon/system/utest/crypto/main.c
+++ /dev/null
@@ -1,9 +0,0 @@
-// Copyright 2017 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.
-
-#include <unittest/unittest.h>
-
-int main(int argc, char** argv) {
-    return unittest_run_all_tests(argc, argv) ? 0 : -1;
-}
diff --git a/zircon/system/utest/crypto/rules.mk b/zircon/system/utest/crypto/rules.mk
index 417256c..ccbddc1 100644
--- a/zircon/system/utest/crypto/rules.mk
+++ b/zircon/system/utest/crypto/rules.mk
@@ -9,7 +9,6 @@
 MODULE_TYPE := usertest
 
 MODULE_SRCS := \
-    $(LOCAL_DIR)/main.c \
     $(LOCAL_DIR)/utils.cpp \
 
 MODULE_SRCS += \
diff --git a/zircon/system/utest/ctor/ctor.cpp b/zircon/system/utest/ctor/ctor.cpp
index b006d34..a1a8b01 100644
--- a/zircon/system/utest/ctor/ctor.cpp
+++ b/zircon/system/utest/ctor/ctor.cpp
@@ -70,7 +70,3 @@
 RUN_TEST(check_dso_ctor)
 RUN_TEST(check_thread_local_ctor_dtor)
 END_TEST_CASE(ctors)
-
-int main(int argc, char** argv) {
-    return unittest_run_all_tests(argc, argv) ? 0 : -1;
-}
diff --git a/zircon/system/utest/devfs/main.c b/zircon/system/utest/devfs/main.c
deleted file mode 100644
index ed1a365..0000000
--- a/zircon/system/utest/devfs/main.c
+++ /dev/null
@@ -1,9 +0,0 @@
-// Copyright 2017 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.
-
-#include <unittest/unittest.h>
-
-int main(int argc, char** argv) {
-    return unittest_run_all_tests(argc, argv) ? 0 : -1;
-}
diff --git a/zircon/system/utest/devfs/rules.mk b/zircon/system/utest/devfs/rules.mk
index 773b313..5a107ea 100644
--- a/zircon/system/utest/devfs/rules.mk
+++ b/zircon/system/utest/devfs/rules.mk
@@ -13,7 +13,6 @@
 MODULE_SRCS += \
     $(LOCAL_DIR)/fdio-tests.cpp \
     $(LOCAL_DIR)/fidl-tests.cpp \
-    $(LOCAL_DIR)/main.c \
 
 MODULE_NAME := devfs-test
 
diff --git a/zircon/system/utest/digest/main.c b/zircon/system/utest/digest/main.c
deleted file mode 100644
index ed1a365..0000000
--- a/zircon/system/utest/digest/main.c
+++ /dev/null
@@ -1,9 +0,0 @@
-// Copyright 2017 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.
-
-#include <unittest/unittest.h>
-
-int main(int argc, char** argv) {
-    return unittest_run_all_tests(argc, argv) ? 0 : -1;
-}
diff --git a/zircon/system/utest/digest/rules.mk b/zircon/system/utest/digest/rules.mk
index c1cc725..f3795877 100644
--- a/zircon/system/utest/digest/rules.mk
+++ b/zircon/system/utest/digest/rules.mk
@@ -11,7 +11,6 @@
 MODULE_SRCS += \
     $(LOCAL_DIR)/digest.cpp \
     $(LOCAL_DIR)/merkle-tree.cpp \
-    $(LOCAL_DIR)/main.c
 
 MODULE_NAME := digest-test
 
diff --git a/zircon/system/utest/dlfcn/dlfcn.c b/zircon/system/utest/dlfcn/dlfcn.c
index 8863546b..388ad91 100644
--- a/zircon/system/utest/dlfcn/dlfcn.c
+++ b/zircon/system/utest/dlfcn/dlfcn.c
@@ -167,16 +167,17 @@
     END_TEST;
 }
 
-int main(int argc, char** argv);
-static bool dladdr_main_test(void) {
+void test_global_function(void) {}
+
+static bool dladdr_unexported_test(void) {
     BEGIN_TEST;
 
     Dl_info info;
-    ASSERT_NE(dladdr(&main, &info), 0, "dladdr failed");
+    ASSERT_NE(dladdr(&test_global_function, &info), 0, "dladdr failed");
 
-    // The "main" symbol is not exported to .dynsym, so it won't be found.
-    EXPECT_EQ(info.dli_sname, NULL, "unexpected symbol name");
-    EXPECT_EQ(info.dli_saddr, NULL, "unexpected symbol address");
+    // This symbol is not exported to .dynsym, so it won't be found.
+    EXPECT_NULL(info.dli_sname, "unexpected symbol name");
+    EXPECT_NULL(info.dli_saddr, "unexpected symbol address");
 
     END_TEST;
 }
@@ -187,10 +188,5 @@
 RUN_TEST(dlopen_vmo_test);
 RUN_TEST(loader_service_test);
 RUN_TEST(clone_test);
-RUN_TEST(dladdr_main_test);
+RUN_TEST(dladdr_unexported_test);
 END_TEST_CASE(dlfcn_tests)
-
-int main(int argc, char** argv) {
-    bool success = unittest_run_all_tests(argc, argv);
-    return success ? 0 : -1;
-}
diff --git a/zircon/system/utest/dlopen-indirect-deps/dlopen-indirect-deps.c b/zircon/system/utest/dlopen-indirect-deps/dlopen-indirect-deps.c
index b2f1b2a..ff4b8f6 100644
--- a/zircon/system/utest/dlopen-indirect-deps/dlopen-indirect-deps.c
+++ b/zircon/system/utest/dlopen-indirect-deps/dlopen-indirect-deps.c
@@ -29,8 +29,3 @@
 BEGIN_TEST_CASE(dlopen_indirect_deps_tests)
 RUN_TEST(dlopen_indirect_deps_test);
 END_TEST_CASE(dlopen_indirect_deps_tests)
-
-int main(int argc, char** argv) {
-    bool success = unittest_run_all_tests(argc, argv);
-    return success ? 0 : -1;
-}
diff --git a/zircon/system/utest/elf-search/elf-search-test.cpp b/zircon/system/utest/elf-search/elf-search-test.cpp
index 675b2c5..58f2571 100644
--- a/zircon/system/utest/elf-search/elf-search-test.cpp
+++ b/zircon/system/utest/elf-search/elf-search-test.cpp
@@ -187,8 +187,3 @@
 // sussed out by looking at coverage results.
 RUN_TEST(ElfSearchTest)
 END_TEST_CASE(elf_search_tests)
-
-int main(int argc, char** argv) {
-    bool success = unittest_run_all_tests(argc, argv);
-    return success ? 0 : -1;
-}
diff --git a/zircon/system/utest/entropy/entropy.cpp b/zircon/system/utest/entropy/entropy.cpp
index 1865c60..64dbabe 100644
--- a/zircon/system/utest/entropy/entropy.cpp
+++ b/zircon/system/utest/entropy/entropy.cpp
@@ -27,7 +27,3 @@
 END_TEST_CASE(entropy_tests)
 
 #endif
-
-int main(int argc, char** argv) {
-    return unittest_run_all_tests(argc, argv) ? 0 : -1;
-}
diff --git a/zircon/system/utest/errno/errno.c b/zircon/system/utest/errno/errno.c
index d579127..9eb7586 100644
--- a/zircon/system/utest/errno/errno.c
+++ b/zircon/system/utest/errno/errno.c
@@ -45,7 +45,3 @@
 BEGIN_TEST_CASE(errno_tests)
 RUN_TEST(errno_test)
 END_TEST_CASE(errno_tests)
-
-int main(int argc, char** argv) {
-    return unittest_run_all_tests(argc, argv) ? 0 : -1;
-}
diff --git a/zircon/system/utest/ethernet/ethernet.cpp b/zircon/system/utest/ethernet/ethernet.cpp
index 021801fd..cb2069c 100644
--- a/zircon/system/utest/ethernet/ethernet.cpp
+++ b/zircon/system/utest/ethernet/ethernet.cpp
@@ -934,8 +934,3 @@
 RUN_TEST_MEDIUM(EthernetDataTest_Send)
 RUN_TEST_MEDIUM(EthernetDataTest_Recv)
 END_TEST_CASE(EthernetDataTests)
-
-int main(int argc, char* argv[]) {
-    bool success = unittest_run_all_tests(argc, argv);
-    return success ? 0 : -1;
-}
diff --git a/zircon/system/utest/events/events.c b/zircon/system/utest/events/events.c
index 4621760..f8e7f78 100644
--- a/zircon/system/utest/events/events.c
+++ b/zircon/system/utest/events/events.c
@@ -287,7 +287,3 @@
 RUN_TEST(reset_test)
 RUN_TEST(wait_many_failures_test)
 END_TEST_CASE(event_tests)
-
-int main(int argc, char** argv) {
-    return unittest_run_all_tests(argc, argv) ? 0 : -1;
-}
diff --git a/zircon/system/utest/exit/exit.c b/zircon/system/utest/exit/exit.c
index d8c8f1d..f629d2d 100644
--- a/zircon/system/utest/exit/exit.c
+++ b/zircon/system/utest/exit/exit.c
@@ -30,7 +30,3 @@
 BEGIN_TEST_CASE(hard_to_exit)
 RUN_TEST(mutex_block)
 END_TEST_CASE(hard_to_exit)
-
-int main(int argc, char** argv) {
-    return unittest_run_all_tests(argc, argv) ? 0 : -1;
-}
diff --git a/zircon/system/utest/fbl/main.c b/zircon/system/utest/fbl/main.c
deleted file mode 100644
index 9bc8d0e..0000000
--- a/zircon/system/utest/fbl/main.c
+++ /dev/null
@@ -1,9 +0,0 @@
-// Copyright 2016 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.
-
-#include <unittest/unittest.h>
-
-int main(int argc, char** argv) {
-    return unittest_run_all_tests(argc, argv) ? 0 : -1;
-}
diff --git a/zircon/system/utest/fbl/rules.mk b/zircon/system/utest/fbl/rules.mk
index 766377c..d09b432 100644
--- a/zircon/system/utest/fbl/rules.mk
+++ b/zircon/system/utest/fbl/rules.mk
@@ -20,7 +20,6 @@
     $(LOCAL_DIR)/intrusive_hash_table_sll_tests.cpp \
     $(LOCAL_DIR)/intrusive_singly_linked_list_tests.cpp \
     $(LOCAL_DIR)/intrusive_wavl_tree_tests.cpp \
-    $(LOCAL_DIR)/main.c \
     $(LOCAL_DIR)/recycler_tests.cpp \
     $(LOCAL_DIR)/ref_ptr_tests.cpp \
     $(LOCAL_DIR)/string_buffer_tests.cpp \
diff --git a/zircon/system/utest/fdio/main.c b/zircon/system/utest/fdio/main.c
deleted file mode 100644
index bfd9b24..0000000
--- a/zircon/system/utest/fdio/main.c
+++ /dev/null
@@ -1,10 +0,0 @@
-// Copyright 2017 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.
-
-#include <unittest/unittest.h>
-
-int main(int argc, char** argv) {
-    bool success = unittest_run_all_tests(argc, argv);
-    return success ? 0 : -1;
-}
diff --git a/zircon/system/utest/fdio/rules.mk b/zircon/system/utest/fdio/rules.mk
index 3adc4fc..a1cdb54 100644
--- a/zircon/system/utest/fdio/rules.mk
+++ b/zircon/system/utest/fdio/rules.mk
@@ -9,7 +9,6 @@
 MODULE_TYPE := usertest
 
 MODULE_SRCS += \
-    $(LOCAL_DIR)/main.c \
     $(LOCAL_DIR)/fdio_fd.cpp \
     $(LOCAL_DIR)/fdio_handle_fd.c \
     $(LOCAL_DIR)/fdio_open_max.c \
diff --git a/zircon/system/utest/fidl-compiler/main.cpp b/zircon/system/utest/fidl-compiler/main.cpp
deleted file mode 100644
index 7e15b95..0000000
--- a/zircon/system/utest/fidl-compiler/main.cpp
+++ /dev/null
@@ -1,9 +0,0 @@
-// Copyright 2018 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.
-
-#include <unittest/unittest.h>
-
-int main(int argc, char** argv) {
-    return unittest_run_all_tests(argc, argv) ? 0 : -1;
-}
diff --git a/zircon/system/utest/fidl-compiler/rules.mk b/zircon/system/utest/fidl-compiler/rules.mk
index 82ff693..f2aef1e 100644
--- a/zircon/system/utest/fidl-compiler/rules.mk
+++ b/zircon/system/utest/fidl-compiler/rules.mk
@@ -75,7 +75,6 @@
     $(LOCAL_DIR)/flat_ast_tests.cpp \
     $(LOCAL_DIR)/formatter_unittests.cpp \
     $(LOCAL_DIR)/json_generator_tests.cpp \
-    $(LOCAL_DIR)/main.cpp \
     $(LOCAL_DIR)/max_bytes_multipass_tests.cpp \
     $(LOCAL_DIR)/max_bytes_tests.cpp \
     $(LOCAL_DIR)/max_handle_tests.cpp \
diff --git a/zircon/system/utest/fidl-llcpp-interop/main.cpp b/zircon/system/utest/fidl-llcpp-interop/main.cpp
deleted file mode 100644
index 57f8f55..0000000
--- a/zircon/system/utest/fidl-llcpp-interop/main.cpp
+++ /dev/null
@@ -1,9 +0,0 @@
-// Copyright 2018 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.
-
-#include <unittest/unittest.h>
-
-int main(int argc, char** argv) {
-    return unittest_run_all_tests(argc, argv) ? 0 : -1;
-}
\ No newline at end of file
diff --git a/zircon/system/utest/fidl-llcpp-interop/rules.mk b/zircon/system/utest/fidl-llcpp-interop/rules.mk
index 59204de..4f6ce47 100644
--- a/zircon/system/utest/fidl-llcpp-interop/rules.mk
+++ b/zircon/system/utest/fidl-llcpp-interop/rules.mk
@@ -41,7 +41,6 @@
 MODULE_TYPE := usertest
 
 MODULE_SRCS += \
-    $(LOCAL_DIR)/main.cpp \
     $(LOCAL_DIR)/generated/fidl_llcpp_basictypes.cpp \
     $(LOCAL_DIR)/generated/fidl_llcpp_dirent.cpp \
     $(LOCAL_DIR)/basictypes_tests.cpp \
@@ -77,4 +76,3 @@
     -Isystem/utest/fidl-llcpp-interop/generated \
 
 include make/module.mk
-
diff --git a/zircon/system/utest/fidl-simple/main.c b/zircon/system/utest/fidl-simple/main.c
deleted file mode 100644
index 7e15b95..0000000
--- a/zircon/system/utest/fidl-simple/main.c
+++ /dev/null
@@ -1,9 +0,0 @@
-// Copyright 2018 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.
-
-#include <unittest/unittest.h>
-
-int main(int argc, char** argv) {
-    return unittest_run_all_tests(argc, argv) ? 0 : -1;
-}
diff --git a/zircon/system/utest/fidl-simple/rules.mk b/zircon/system/utest/fidl-simple/rules.mk
index 0f5b0d3..d550ef2 100644
--- a/zircon/system/utest/fidl-simple/rules.mk
+++ b/zircon/system/utest/fidl-simple/rules.mk
@@ -44,7 +44,6 @@
     $(LOCAL_DIR)/client_tests.c \
     $(LOCAL_DIR)/fakesocket_tests.cpp \
     $(LOCAL_DIR)/ldsvc_tests.c \
-    $(LOCAL_DIR)/main.c \
     $(LOCAL_DIR)/server_tests.c \
     $(LOCAL_DIR)/spaceship_tests.c \
     $(LOCAL_DIR)/spaceship_tests.cpp \
diff --git a/zircon/system/utest/fidl/main.c b/zircon/system/utest/fidl/main.c
deleted file mode 100644
index ed1a365..0000000
--- a/zircon/system/utest/fidl/main.c
+++ /dev/null
@@ -1,9 +0,0 @@
-// Copyright 2017 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.
-
-#include <unittest/unittest.h>
-
-int main(int argc, char** argv) {
-    return unittest_run_all_tests(argc, argv) ? 0 : -1;
-}
diff --git a/zircon/system/utest/fidl/rules.mk b/zircon/system/utest/fidl/rules.mk
index db7a253..1969c2b 100644
--- a/zircon/system/utest/fidl/rules.mk
+++ b/zircon/system/utest/fidl/rules.mk
@@ -18,7 +18,6 @@
     $(LOCAL_DIR)/handle_closing_tests.cpp \
     $(LOCAL_DIR)/linearizing_tests.cpp \
     $(LOCAL_DIR)/llcpp_types_tests.cpp \
-    $(LOCAL_DIR)/main.c \
     $(LOCAL_DIR)/message_tests.cpp \
     $(LOCAL_DIR)/validating_tests.cpp \
 
diff --git a/zircon/system/utest/fit/main.c b/zircon/system/utest/fit/main.c
deleted file mode 100644
index 7e15b95..0000000
--- a/zircon/system/utest/fit/main.c
+++ /dev/null
@@ -1,9 +0,0 @@
-// Copyright 2018 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.
-
-#include <unittest/unittest.h>
-
-int main(int argc, char** argv) {
-    return unittest_run_all_tests(argc, argv) ? 0 : -1;
-}
diff --git a/zircon/system/utest/fit/rules.mk b/zircon/system/utest/fit/rules.mk
index 89f206d..cc99529 100644
--- a/zircon/system/utest/fit/rules.mk
+++ b/zircon/system/utest/fit/rules.mk
@@ -8,7 +8,6 @@
 # Zircon currently only supports that for the host.
 fit_zircon_friendly_usertests := \
     $(LOCAL_DIR)/function_tests.cpp \
-    $(LOCAL_DIR)/main.c \
     $(LOCAL_DIR)/nullable_tests.cpp \
     $(LOCAL_DIR)/optional_tests.cpp \
     $(LOCAL_DIR)/result_tests.cpp \
diff --git a/zircon/system/utest/fpu/fputest.c b/zircon/system/utest/fpu/fputest.c
index 0490a80..60a38fd 100644
--- a/zircon/system/utest/fpu/fputest.c
+++ b/zircon/system/utest/fpu/fputest.c
@@ -89,8 +89,3 @@
 BEGIN_TEST_CASE(fpu_tests)
 RUN_TEST(fpu_test);
 END_TEST_CASE(fpu_tests)
-
-int main(int argc, char** argv) {
-    bool success = unittest_run_all_tests(argc, argv);
-    return success ? 0 : -1;
-}
diff --git a/zircon/system/utest/fs-host/main.cpp b/zircon/system/utest/fs-host/main.cpp
deleted file mode 100644
index 9bfc91c..0000000
--- a/zircon/system/utest/fs-host/main.cpp
+++ /dev/null
@@ -1,9 +0,0 @@
-// Copyright 2017 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.
-
-#include <unittest/unittest.h>
-
-int main(int argc, char** argv) {
-    return unittest_run_all_tests(argc, argv) ? 0 : -1;
-}
\ No newline at end of file
diff --git a/zircon/system/utest/fs-host/rules.mk b/zircon/system/utest/fs-host/rules.mk
index 78587fe..921d98d 100644
--- a/zircon/system/utest/fs-host/rules.mk
+++ b/zircon/system/utest/fs-host/rules.mk
@@ -11,7 +11,6 @@
 MODULE_NAME := fs-test
 
 MODULE_SRCS := \
-    $(LOCAL_DIR)/main.cpp \
     $(LOCAL_DIR)/util.cpp \
     $(LOCAL_DIR)/test-basic.cpp \
     $(LOCAL_DIR)/test-directory.cpp \
diff --git a/zircon/system/utest/fs-vnode/main.c b/zircon/system/utest/fs-vnode/main.c
deleted file mode 100644
index ed1a365..0000000
--- a/zircon/system/utest/fs-vnode/main.c
+++ /dev/null
@@ -1,9 +0,0 @@
-// Copyright 2017 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.
-
-#include <unittest/unittest.h>
-
-int main(int argc, char** argv) {
-    return unittest_run_all_tests(argc, argv) ? 0 : -1;
-}
diff --git a/zircon/system/utest/fs-vnode/rules.mk b/zircon/system/utest/fs-vnode/rules.mk
index e68c5209..22c27b13 100644
--- a/zircon/system/utest/fs-vnode/rules.mk
+++ b/zircon/system/utest/fs-vnode/rules.mk
@@ -16,7 +16,6 @@
     $(LOCAL_DIR)/service-tests.cpp \
     $(LOCAL_DIR)/teardown-tests.cpp \
     $(LOCAL_DIR)/vmo-file-tests.cpp \
-    $(LOCAL_DIR)/main.c
 
 MODULE_NAME := fs-vnode-test
 
diff --git a/zircon/system/utest/fuzz-utils/main.cpp b/zircon/system/utest/fuzz-utils/main.cpp
deleted file mode 100644
index 3d7400e..0000000
--- a/zircon/system/utest/fuzz-utils/main.cpp
+++ /dev/null
@@ -1,11 +0,0 @@
-// Copyright 2018 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.
-
-#include <stdio.h>
-
-#include <unittest/unittest.h>
-
-int main(int argc, char** argv) {
-    return unittest_run_all_tests(argc, argv) ? 0 : -1;
-}
diff --git a/zircon/system/utest/fuzz-utils/rules.mk b/zircon/system/utest/fuzz-utils/rules.mk
index 2f6abb0..61b52c9 100644
--- a/zircon/system/utest/fuzz-utils/rules.mk
+++ b/zircon/system/utest/fuzz-utils/rules.mk
@@ -11,7 +11,6 @@
 MODULE_SRCS += \
     $(LOCAL_DIR)/fixture.cpp \
     $(LOCAL_DIR)/fuzzer-fixture.cpp \
-    $(LOCAL_DIR)/main.cpp \
     $(LOCAL_DIR)/test-fuzzer.cpp \
 
 MODULE_SRCS += \
diff --git a/zircon/system/utest/fzl/main.c b/zircon/system/utest/fzl/main.c
deleted file mode 100644
index 7e15b95..0000000
--- a/zircon/system/utest/fzl/main.c
+++ /dev/null
@@ -1,9 +0,0 @@
-// Copyright 2018 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.
-
-#include <unittest/unittest.h>
-
-int main(int argc, char** argv) {
-    return unittest_run_all_tests(argc, argv) ? 0 : -1;
-}
diff --git a/zircon/system/utest/fzl/rules.mk b/zircon/system/utest/fzl/rules.mk
index 14fca5b..db28baa 100644
--- a/zircon/system/utest/fzl/rules.mk
+++ b/zircon/system/utest/fzl/rules.mk
@@ -12,7 +12,6 @@
 
 MODULE_SRCS := \
     $(LOCAL_DIR)/fdio.cpp \
-    $(LOCAL_DIR)/main.c \
     $(LOCAL_DIR)/memory_probe_tests.cpp \
 
 MODULE_STATIC_LIBS := \
diff --git a/zircon/system/utest/getentropy/getentropy.cpp b/zircon/system/utest/getentropy/getentropy.cpp
index d93299c..34e8920 100644
--- a/zircon/system/utest/getentropy/getentropy.cpp
+++ b/zircon/system/utest/getentropy/getentropy.cpp
@@ -46,7 +46,3 @@
 RUN_TEST(getentropy_valid);
 RUN_TEST(getentropy_too_big);
 END_TEST_CASE(getentropy_tests)
-
-int main(int argc, char** argv) {
-    return unittest_run_all_tests(argc, argv) ? 0 : -1;
-}
diff --git a/zircon/system/utest/handle-alias/handle-alias.c b/zircon/system/utest/handle-alias/handle-alias.c
index 0e580fb..7ca2395 100644
--- a/zircon/system/utest/handle-alias/handle-alias.c
+++ b/zircon/system/utest/handle-alias/handle-alias.c
@@ -121,8 +121,3 @@
 BEGIN_TEST_CASE(handle_reuse)
 RUN_TEST_LARGE(handle_value_alias_test); // Potentially flaky => large test
 END_TEST_CASE(handle_reuse)
-
-int main(int argc, char** argv) {
-    bool success = unittest_run_all_tests(argc, argv);
-    return success ? 0 : -1;
-}
diff --git a/zircon/system/utest/hid-parser/hid-parser-test.cpp b/zircon/system/utest/hid-parser/hid-parser-test.cpp
index a96b61c..abf6942 100644
--- a/zircon/system/utest/hid-parser/hid-parser-test.cpp
+++ b/zircon/system/utest/hid-parser/hid-parser-test.cpp
@@ -920,8 +920,3 @@
 RUN_TEST(parse_asus_touch)
 RUN_TEST(parse_eve_touchpad_v2)
 END_TEST_CASE(hidparser_tests)
-
-int main(int argc, char** argv) {
-    bool success = unittest_run_all_tests(argc, argv);
-    return success ? 0 : -1;
-}
diff --git a/zircon/system/utest/hid/hid-test.cpp b/zircon/system/utest/hid/hid-test.cpp
index da6f845..c233b0b 100644
--- a/zircon/system/utest/hid/hid-test.cpp
+++ b/zircon/system/utest/hid/hid-test.cpp
@@ -312,8 +312,3 @@
 RUN_TEST(parse_acer12)
 RUN_TEST(parse_asus)
 END_TEST_CASE(hid_tests)
-
-int main(int argc, char** argv) {
-    bool success = unittest_run_all_tests(argc, argv);
-    return success ? 0 : -1;
-}
diff --git a/zircon/system/utest/hypervisor/main.cpp b/zircon/system/utest/hypervisor/main.cpp
deleted file mode 100644
index ed1a365..0000000
--- a/zircon/system/utest/hypervisor/main.cpp
+++ /dev/null
@@ -1,9 +0,0 @@
-// Copyright 2017 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.
-
-#include <unittest/unittest.h>
-
-int main(int argc, char** argv) {
-    return unittest_run_all_tests(argc, argv) ? 0 : -1;
-}
diff --git a/zircon/system/utest/hypervisor/rules.mk b/zircon/system/utest/hypervisor/rules.mk
index 7c0edda..d99e54f 100644
--- a/zircon/system/utest/hypervisor/rules.mk
+++ b/zircon/system/utest/hypervisor/rules.mk
@@ -13,7 +13,6 @@
 MODULE_SRCS += \
     $(LOCAL_DIR)/$(ARCH).S \
     $(LOCAL_DIR)/guest.cpp \
-    $(LOCAL_DIR)/main.cpp \
 
 MODULE_LIBS := \
     system/ulib/c \
diff --git a/zircon/system/utest/inspect-vmo/main.cpp b/zircon/system/utest/inspect-vmo/main.cpp
deleted file mode 100644
index cc704bf..0000000
--- a/zircon/system/utest/inspect-vmo/main.cpp
+++ /dev/null
@@ -1,10 +0,0 @@
-// Copyright 2018 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.
-
-#include <unittest/unittest.h>
-
-int main(int argc, char** argv) {
-    bool success = unittest_run_all_tests(argc, argv);
-    return success ? 0 : -1;
-}
diff --git a/zircon/system/utest/inspect-vmo/rules.mk b/zircon/system/utest/inspect-vmo/rules.mk
index 6cb98a6..e5047c6 100644
--- a/zircon/system/utest/inspect-vmo/rules.mk
+++ b/zircon/system/utest/inspect-vmo/rules.mk
@@ -11,7 +11,6 @@
 MODULE_NAME := inspect-test
 
 MODULE_SRCS := \
-    $(LOCAL_DIR)/main.cpp \
     $(LOCAL_DIR)/heap_tests.cpp \
     $(LOCAL_DIR)/inspect_tests.cpp \
     $(LOCAL_DIR)/scanner_tests.cpp \
@@ -30,6 +29,5 @@
     system/ulib/fdio  \
     system/ulib/unittest \
     system/ulib/zircon \
-    system/ulib/unittest \
 
 include make/module.mk
diff --git a/zircon/system/utest/int-types/int-types.cpp b/zircon/system/utest/int-types/int-types.cpp
index e50164e..ef0191b 100644
--- a/zircon/system/utest/int-types/int-types.cpp
+++ b/zircon/system/utest/int-types/int-types.cpp
@@ -325,7 +325,3 @@
 BEGIN_TEST_CASE(format_specifiers)
 RUN_TEST(check_format_specifiers)
 END_TEST_CASE(format_specifiers)
-
-int main(int argc, char** argv) {
-    return unittest_run_all_tests(argc, argv) ? 0 : -1;
-}
diff --git a/zircon/system/utest/kcounter/kcounter-test.cpp b/zircon/system/utest/kcounter/kcounter-test.cpp
index db1d68a..51e8189 100644
--- a/zircon/system/utest/kcounter/kcounter-test.cpp
+++ b/zircon/system/utest/kcounter/kcounter-test.cpp
@@ -131,8 +131,3 @@
 BEGIN_TEST_CASE(counters_test)
 RUN_TEST(test_counters)
 END_TEST_CASE(counters_test)
-
-int main(int argc, char** argv) {
-    bool success = unittest_run_all_tests(argc, argv);
-    return success ? 0 : -1;
-}
diff --git a/zircon/system/utest/kernel-unittests/kernel-unittests.cpp b/zircon/system/utest/kernel-unittests/kernel-unittests.cpp
index c8924a9..232a84e1 100644
--- a/zircon/system/utest/kernel-unittests/kernel-unittests.cpp
+++ b/zircon/system/utest/kernel-unittests/kernel-unittests.cpp
@@ -47,8 +47,3 @@
 BEGIN_TEST_CASE(kernel_unittests)
 RUN_TEST(run_kernel_unittests)
 END_TEST_CASE(kernel_unittests)
-
-int main(int argc, char** argv) {
-    bool success = unittest_run_all_tests(argc, argv);
-    return success ? 0 : -1;
-}
diff --git a/zircon/system/utest/libfzl/main.c b/zircon/system/utest/libfzl/main.c
deleted file mode 100644
index 7e15b95..0000000
--- a/zircon/system/utest/libfzl/main.c
+++ /dev/null
@@ -1,9 +0,0 @@
-// Copyright 2018 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.
-
-#include <unittest/unittest.h>
-
-int main(int argc, char** argv) {
-    return unittest_run_all_tests(argc, argv) ? 0 : -1;
-}
diff --git a/zircon/system/utest/libfzl/rules.mk b/zircon/system/utest/libfzl/rules.mk
index f7be6a7..5aabb93 100644
--- a/zircon/system/utest/libfzl/rules.mk
+++ b/zircon/system/utest/libfzl/rules.mk
@@ -9,7 +9,6 @@
 MODULE_TYPE := usertest
 
 MODULE_SRCS += \
-    $(LOCAL_DIR)/main.c \
     $(LOCAL_DIR)/fzl-test.cpp \
     $(LOCAL_DIR)/owned-vmo-mapper-tests.cpp \
     $(LOCAL_DIR)/resizeable-vmo-mapper-tests.cpp \
diff --git a/zircon/system/utest/libhwreg/bitfields-test.cpp b/zircon/system/utest/libhwreg/bitfields-test.cpp
index 24dde0b..31a68e3 100644
--- a/zircon/system/utest/libhwreg/bitfields-test.cpp
+++ b/zircon/system/utest/libhwreg/bitfields-test.cpp
@@ -498,8 +498,3 @@
 RUN_TEST(print_test)
 RUN_TEST(set_chaining_test)
 END_TEST_CASE(libhwreg_tests)
-
-int main(int argc, char** argv) {
-    bool success = unittest_run_all_tests(argc, argv);
-    return success ? 0 : -1;
-}
diff --git a/zircon/system/utest/libzx/zx-test.cpp b/zircon/system/utest/libzx/zx-test.cpp
index 8b4fdb4..382a5a09 100644
--- a/zircon/system/utest/libzx/zx-test.cpp
+++ b/zircon/system/utest/libzx/zx-test.cpp
@@ -653,8 +653,3 @@
 RUN_TEST(unowned_test)
 RUN_TEST(get_child_test)
 END_TEST_CASE(libzx_tests)
-
-int main(int argc, char** argv) {
-    bool success = unittest_run_all_tests(argc, argv);
-    return success ? 0 : -1;
-}
diff --git a/zircon/system/utest/logger/test.cpp b/zircon/system/utest/logger/test.cpp
index eaea90b..1fd09b8 100644
--- a/zircon/system/utest/logger/test.cpp
+++ b/zircon/system/utest/logger/test.cpp
@@ -247,7 +247,3 @@
 RUN_TEST(TestLoggerDiesWithSocket)
 RUN_TEST(TestLoggerDiesWithChannelWhenNoConnectCalled)
 END_TEST_CASE(logger_tests)
-
-int main(int argc, char** argv) {
-    return unittest_run_all_tests(argc, argv) ? 0 : -1;
-}
diff --git a/zircon/system/utest/memfs/main.c b/zircon/system/utest/memfs/main.c
deleted file mode 100644
index ed1a365..0000000
--- a/zircon/system/utest/memfs/main.c
+++ /dev/null
@@ -1,9 +0,0 @@
-// Copyright 2017 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.
-
-#include <unittest/unittest.h>
-
-int main(int argc, char** argv) {
-    return unittest_run_all_tests(argc, argv) ? 0 : -1;
-}
diff --git a/zircon/system/utest/memfs/rules.mk b/zircon/system/utest/memfs/rules.mk
index 8e21abd..49a6af6 100644
--- a/zircon/system/utest/memfs/rules.mk
+++ b/zircon/system/utest/memfs/rules.mk
@@ -12,7 +12,6 @@
 
 MODULE_SRCS += \
     $(LOCAL_DIR)/fidl-tests.cpp \
-    $(LOCAL_DIR)/main.c \
     $(LOCAL_DIR)/memfs-tests.cpp \
     $(LOCAL_DIR)/vmofile-tests.cpp \
 
diff --git a/zircon/system/utest/namespace/namespace-test.cpp b/zircon/system/utest/namespace/namespace-test.cpp
index 3ce1d73..442f700 100644
--- a/zircon/system/utest/namespace/namespace-test.cpp
+++ b/zircon/system/utest/namespace/namespace-test.cpp
@@ -379,7 +379,3 @@
 END_TEST_CASE(namespace_tests)
 
 } // namespace
-
-int main(int argc, char** argv) {
-    return unittest_run_all_tests(argc, argv) ? 0 : -1;
-}
diff --git a/zircon/system/utest/platform-bus/main.cpp b/zircon/system/utest/platform-bus/main.cpp
index f0a30fc..1ba9695 100644
--- a/zircon/system/utest/platform-bus/main.cpp
+++ b/zircon/system/utest/platform-bus/main.cpp
@@ -104,7 +104,3 @@
 BEGIN_TEST_CASE(pbus_tests)
 RUN_TEST(enumeration_test)
 END_TEST_CASE(pbus_tests);
-
-int main(int argc, char** argv) {
-    return unittest_run_all_tests(argc, argv) ? 0 : -1;
-}
diff --git a/zircon/system/utest/policy/job-policy.cpp b/zircon/system/utest/policy/job-policy.cpp
index 5a452f6..fe36f0c 100644
--- a/zircon/system/utest/policy/job-policy.cpp
+++ b/zircon/system/utest/policy/job-policy.cpp
@@ -464,8 +464,3 @@
 RUN_TEST(TestExceptionOnBadHandle)
 RUN_TEST(TestGetInfoOnBadHandle)
 END_TEST_CASE(job_policy)
-
-int main(int argc, char** argv) {
-    bool success = unittest_run_all_tests(argc, argv);
-    return success ? 0 : -1;
-}
diff --git a/zircon/system/utest/posixio/main.cpp b/zircon/system/utest/posixio/main.cpp
index a13de00..9e8aaa8 100644
--- a/zircon/system/utest/posixio/main.cpp
+++ b/zircon/system/utest/posixio/main.cpp
@@ -107,8 +107,3 @@
 RUN_TEST(lstat_empty_test)
 RUN_TEST(open_empty_test)
 END_TEST_CASE(posixio_test)
-
-int main(int argc, char** argv) {
-    bool success = unittest_run_all_tests(argc, argv);
-    return success ? 0 : -1;
-}
diff --git a/zircon/system/utest/processor/processor.c b/zircon/system/utest/processor/processor.c
index 6188069..847a8a0 100644
--- a/zircon/system/utest/processor/processor.c
+++ b/zircon/system/utest/processor/processor.c
@@ -51,7 +51,3 @@
 BEGIN_TEST_CASE(processor_tests)
 RUN_TEST(processor_test)
 END_TEST_CASE(processor_tests)
-
-int main(int argc, char** argv) {
-    return unittest_run_all_tests(argc, argv) ? 0 : -1;
-}
diff --git a/zircon/system/utest/profile/profile.cpp b/zircon/system/utest/profile/profile.cpp
index 00efaf1..b713fbb 100644
--- a/zircon/system/utest/profile/profile.cpp
+++ b/zircon/system/utest/profile/profile.cpp
@@ -48,7 +48,3 @@
 BEGIN_TEST_CASE(sched_profiles)
 RUN_TEST(get_profile);
 END_TEST_CASE(sched_profiles)
-
-int main(int argc, char** argv) {
-    return unittest_run_all_tests(argc, argv) ? 0 : -1;
-}
diff --git a/zircon/system/utest/property/property.c b/zircon/system/utest/property/property.c
index 5fc6a8f..632f5b8 100644
--- a/zircon/system/utest/property/property.c
+++ b/zircon/system/utest/property/property.c
@@ -408,8 +408,3 @@
 RUN_TEST(gs_test)
 #endif
 END_TEST_CASE(property_tests)
-
-int main(int argc, char** argv) {
-    bool success = unittest_run_all_tests(argc, argv);
-    return success ? 0 : -1;
-}
diff --git a/zircon/system/utest/pty/pty-test.c b/zircon/system/utest/pty/pty-test.c
index 4c091d6..25e03c3 100644
--- a/zircon/system/utest/pty/pty-test.c
+++ b/zircon/system/utest/pty/pty-test.c
@@ -225,7 +225,3 @@
 RUN_TEST(pty_test)
 RUN_TEST(not_a_pty_test)
 END_TEST_CASE(pty_tests)
-
-int main(int argc, char** argv) {
-    return unittest_run_all_tests(argc, argv) ? 0 : -1;
-}
diff --git a/zircon/system/utest/qsort/qsort.c b/zircon/system/utest/qsort/qsort.c
index 376a372..fc3b8bb 100644
--- a/zircon/system/utest/qsort/qsort.c
+++ b/zircon/system/utest/qsort/qsort.c
@@ -57,7 +57,3 @@
 BEGIN_TEST_CASE(qsort_tests)
 RUN_TEST(qsort_test)
 END_TEST_CASE(qsort_tests)
-
-int main(int argc, char** argv) {
-    return unittest_run_all_tests(argc, argv) ? 0 : -1;
-}
diff --git a/zircon/system/utest/ramdisk/main.c b/zircon/system/utest/ramdisk/main.c
deleted file mode 100644
index ed1a365..0000000
--- a/zircon/system/utest/ramdisk/main.c
+++ /dev/null
@@ -1,9 +0,0 @@
-// Copyright 2017 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.
-
-#include <unittest/unittest.h>
-
-int main(int argc, char** argv) {
-    return unittest_run_all_tests(argc, argv) ? 0 : -1;
-}
diff --git a/zircon/system/utest/ramdisk/rules.mk b/zircon/system/utest/ramdisk/rules.mk
index 4379a88..94ab5d0 100644
--- a/zircon/system/utest/ramdisk/rules.mk
+++ b/zircon/system/utest/ramdisk/rules.mk
@@ -9,7 +9,6 @@
 MODULE_TYPE := usertest
 
 MODULE_SRCS += \
-    $(LOCAL_DIR)/main.c \
     $(LOCAL_DIR)/ramdisk.cpp \
 
 MODULE_NAME := ramdisk-test
diff --git a/zircon/system/utest/region-alloc/main.c b/zircon/system/utest/region-alloc/main.c
deleted file mode 100644
index 9bc8d0e..0000000
--- a/zircon/system/utest/region-alloc/main.c
+++ /dev/null
@@ -1,9 +0,0 @@
-// Copyright 2016 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.
-
-#include <unittest/unittest.h>
-
-int main(int argc, char** argv) {
-    return unittest_run_all_tests(argc, argv) ? 0 : -1;
-}
diff --git a/zircon/system/utest/region-alloc/rules.mk b/zircon/system/utest/region-alloc/rules.mk
index df0ac937..63f309d 100644
--- a/zircon/system/utest/region-alloc/rules.mk
+++ b/zircon/system/utest/region-alloc/rules.mk
@@ -9,7 +9,6 @@
 MODULE_TYPE := usertest
 
 MODULE_SRCS += \
-    $(LOCAL_DIR)/main.c \
     $(LOCAL_DIR)/region-alloc.cpp \
     $(LOCAL_DIR)/region-alloc-c-api.c
 
diff --git a/zircon/system/utest/register-state/register-state-test.cpp b/zircon/system/utest/register-state/register-state-test.cpp
index a413a74..ce867bd 100644
--- a/zircon/system/utest/register-state/register-state-test.cpp
+++ b/zircon/system/utest/register-state/register-state-test.cpp
@@ -173,8 +173,3 @@
 END_TEST_CASE(register_state_tests)
 
 #endif
-
-int main(int argc, char** argv) {
-    bool success = unittest_run_all_tests(argc, argv);
-    return success ? 0 : -1;
-}
diff --git a/zircon/system/utest/rtc-lib/rtc.cpp b/zircon/system/utest/rtc-lib/rtc.cpp
index 29ae47b..38149de 100644
--- a/zircon/system/utest/rtc-lib/rtc.cpp
+++ b/zircon/system/utest/rtc-lib/rtc.cpp
@@ -54,7 +54,3 @@
 RUN_TEST(santitize_rtc_test)
 RUN_TEST(seconds_since_epoch_test)
 END_TEST_CASE(rtc_lib_tests)
-
-int main(int argc, char** argv) {
-    return unittest_run_all_tests(argc, argv) ? 0 : -1;
-}
diff --git a/zircon/system/utest/runtests-utils/helper/publish-data-helper.c b/zircon/system/utest/runtests-utils/helper/publish-data-helper.c
index e48a42f..7b0a673 100644
--- a/zircon/system/utest/runtests-utils/helper/publish-data-helper.c
+++ b/zircon/system/utest/runtests-utils/helper/publish-data-helper.c
@@ -22,7 +22,3 @@
 BEGIN_TEST_CASE(publish_data_helper_tests)
 RUN_TEST(publish_data)
 END_TEST_CASE(publish_data_helper_tests)
-
-int main(int argc, char** argv) {
-    return unittest_run_all_tests(argc, argv) ? 0 : -1;
-}
diff --git a/zircon/system/utest/sanitizer/sanitizer-utils.c b/zircon/system/utest/sanitizer/sanitizer-utils.c
index 29b45ea..d9ff3c221 100644
--- a/zircon/system/utest/sanitizer/sanitizer-utils.c
+++ b/zircon/system/utest/sanitizer/sanitizer-utils.c
@@ -188,8 +188,3 @@
 RUN_TEST(publish_data_test);
 RUN_TEST(debug_config_test);
 END_TEST_CASE(sanitizer_utils_tests)
-
-int main(int argc, char** argv) {
-    bool success = unittest_run_all_tests(argc, argv);
-    return success ? 0 : -1;
-}
diff --git a/zircon/system/utest/spawn/spawn.cpp b/zircon/system/utest/spawn/spawn.cpp
index 88279f72..c614480 100644
--- a/zircon/system/utest/spawn/spawn.cpp
+++ b/zircon/system/utest/spawn/spawn.cpp
@@ -613,7 +613,3 @@
 RUN_TEST(spawn_errors_test)
 RUN_TEST(spawn_vmo_test)
 END_TEST_CASE(spawn_tests)
-
-int main(int argc, char** argv) {
-    return unittest_run_all_tests(argc, argv) ? 0 : -1;
-}
diff --git a/zircon/system/utest/stdio/stdio.c b/zircon/system/utest/stdio/stdio.c
index cb64b48..229872f 100644
--- a/zircon/system/utest/stdio/stdio.c
+++ b/zircon/system/utest/stdio/stdio.c
@@ -156,10 +156,3 @@
 RUN_TEST(stdio_pipe_test);
 RUN_TEST(stdio_launchpad_pipe_test);
 END_TEST_CASE(launchpad_tests)
-
-int main(int argc, char **argv)
-{
-    bool success = unittest_run_all_tests(argc, argv);
-
-    return success ? 0 : -1;
-}
diff --git a/zircon/system/utest/sysconf/sysconf.c b/zircon/system/utest/sysconf/sysconf.c
index 2d9598c..707c80f2 100644
--- a/zircon/system/utest/sysconf/sysconf.c
+++ b/zircon/system/utest/sysconf/sysconf.c
@@ -24,7 +24,3 @@
 BEGIN_TEST_CASE(sysconf_tests)
 RUN_TEST(sysconf_test)
 END_TEST_CASE(sysconf_tests)
-
-int main(int argc, char** argv) {
-  return unittest_run_all_tests(argc, argv) ? 0 : -1;
-}
diff --git a/zircon/system/utest/sysinfo/main.cpp b/zircon/system/utest/sysinfo/main.cpp
index 4866e07..c76b256 100644
--- a/zircon/system/utest/sysinfo/main.cpp
+++ b/zircon/system/utest/sysinfo/main.cpp
@@ -99,7 +99,3 @@
 RUN_TEST(get_board_name_succeeds)
 RUN_TEST(get_interrupt_controller_info_succeeds)
 END_TEST_CASE(sysinfo_tests)
-
-int main(int argc, char** argv) {
-    return unittest_run_all_tests(argc, argv) ? 0 : -1;
-}
diff --git a/zircon/system/utest/syslog/main.c b/zircon/system/utest/syslog/main.c
deleted file mode 100644
index e73ef9ef..0000000
--- a/zircon/system/utest/syslog/main.c
+++ /dev/null
@@ -1,9 +0,0 @@
-// Copyright 2017 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.
-
-#include <unittest/unittest.h>
-
-int main(int argc, char** argv) {
-  return unittest_run_all_tests(argc, argv) ? 0 : -1;
-}
diff --git a/zircon/system/utest/syslog/rules.mk b/zircon/system/utest/syslog/rules.mk
index 44ae849..3c8cea2 100644
--- a/zircon/system/utest/syslog/rules.mk
+++ b/zircon/system/utest/syslog/rules.mk
@@ -9,7 +9,6 @@
 MODULE_TYPE := usertest
 
 MODULE_SRCS += \
-    $(LOCAL_DIR)/main.c \
     $(LOCAL_DIR)/syslog_tests.c \
     $(LOCAL_DIR)/syslog_socket_tests.cpp \
 
diff --git a/zircon/system/utest/sysmem/main.c b/zircon/system/utest/sysmem/main.c
deleted file mode 100644
index e5e4816..0000000
--- a/zircon/system/utest/sysmem/main.c
+++ /dev/null
@@ -1,9 +0,0 @@
-// Copyright 2018 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.
-
-#include <unittest/unittest.h>
-
-int main(int argc, char** argv) {
-  return unittest_run_all_tests(argc, argv) ? 0 : -1;
-}
diff --git a/zircon/system/utest/sysmem/rules.mk b/zircon/system/utest/sysmem/rules.mk
index 6c73fa40..e4bcca5 100644
--- a/zircon/system/utest/sysmem/rules.mk
+++ b/zircon/system/utest/sysmem/rules.mk
@@ -18,7 +18,6 @@
 #MODULE_GROUP := misc
 
 MODULE_SRCS += \
-    $(LOCAL_DIR)/main.c \
     $(LOCAL_DIR)/sysmem_tests.cpp \
 
 MODULE_NAME := sysmem-test
diff --git a/zircon/system/utest/task-utils/walker.cpp b/zircon/system/utest/task-utils/walker.cpp
index 0e26ddd..7da15a0 100644
--- a/zircon/system/utest/task-utils/walker.cpp
+++ b/zircon/system/utest/task-utils/walker.cpp
@@ -199,8 +199,3 @@
 RUN_TEST((cpp_walk_failure<HAS_ON_THREAD, /*PoisonDepth=*/2>))
 
 END_TEST_CASE(task_utils)
-
-int main(int argc, char** argv) {
-    bool success = unittest_run_all_tests(argc, argv);
-    return success ? 0 : -1;
-}
diff --git a/zircon/system/utest/thread-initial-state/init-state.c b/zircon/system/utest/thread-initial-state/init-state.c
index 745a4c5..87396b2 100644
--- a/zircon/system/utest/thread-initial-state/init-state.c
+++ b/zircon/system/utest/thread-initial-state/init-state.c
@@ -58,7 +58,3 @@
 BEGIN_TEST_CASE(tis_tests)
 RUN_TEST(tis_test)
 END_TEST_CASE(tis_tests)
-
-int main(int argc, char** argv) {
-    return unittest_run_all_tests(argc, argv) ? 0 : -1;
-}
diff --git a/zircon/system/utest/time/time_test.cpp b/zircon/system/utest/time/time_test.cpp
index eee4880..b4f695d 100644
--- a/zircon/system/utest/time/time_test.cpp
+++ b/zircon/system/utest/time/time_test.cpp
@@ -246,8 +246,3 @@
 RUN_TEST(duration_from_test)
 RUN_TEST(macro_conversion_test)
 END_TEST_CASE(time_test)
-
-int main(int argc, char** argv) {
-    bool success = unittest_run_all_tests(argc, argv);
-    return success ? 0 : -1;
-}
diff --git a/zircon/system/utest/timers/timers.cpp b/zircon/system/utest/timers/timers.cpp
index 7501dce..9d2a8b5 100644
--- a/zircon/system/utest/timers/timers.cpp
+++ b/zircon/system/utest/timers/timers.cpp
@@ -233,8 +233,3 @@
 RUN_TEST(restart_race)
 RUN_TEST(signals_asserted_immediately)
 END_TEST_CASE(timers_test)
-
-int main(int argc, char** argv) {
-    bool success = unittest_run_all_tests(argc, argv);
-    return success ? 0 : -1;
-}
diff --git a/zircon/system/utest/trace-reader/main.c b/zircon/system/utest/trace-reader/main.c
deleted file mode 100644
index ed1a365..0000000
--- a/zircon/system/utest/trace-reader/main.c
+++ /dev/null
@@ -1,9 +0,0 @@
-// Copyright 2017 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.
-
-#include <unittest/unittest.h>
-
-int main(int argc, char** argv) {
-    return unittest_run_all_tests(argc, argv) ? 0 : -1;
-}
diff --git a/zircon/system/utest/trace-reader/rules.mk b/zircon/system/utest/trace-reader/rules.mk
index ec0aa01..767fdf0 100644
--- a/zircon/system/utest/trace-reader/rules.mk
+++ b/zircon/system/utest/trace-reader/rules.mk
@@ -5,7 +5,6 @@
 LOCAL_DIR := $(GET_LOCAL_DIR)
 
 reader_tests := \
-    $(LOCAL_DIR)/main.c \
     $(LOCAL_DIR)/reader_tests.cpp \
     $(LOCAL_DIR)/records_tests.cpp
 
diff --git a/zircon/system/utest/trace/main.c b/zircon/system/utest/trace/main.c
deleted file mode 100644
index ed1a365..0000000
--- a/zircon/system/utest/trace/main.c
+++ /dev/null
@@ -1,9 +0,0 @@
-// Copyright 2017 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.
-
-#include <unittest/unittest.h>
-
-int main(int argc, char** argv) {
-    return unittest_run_all_tests(argc, argv) ? 0 : -1;
-}
diff --git a/zircon/system/utest/trace/rules.mk b/zircon/system/utest/trace/rules.mk
index 6054421..b22a57f 100644
--- a/zircon/system/utest/trace/rules.mk
+++ b/zircon/system/utest/trace/rules.mk
@@ -14,7 +14,6 @@
     $(LOCAL_DIR)/event_tests.cpp \
     $(LOCAL_DIR)/fields_tests.cpp \
     $(LOCAL_DIR)/fixture.cpp \
-    $(LOCAL_DIR)/main.c \
     $(LOCAL_DIR)/no_optimization.c \
     $(LOCAL_DIR)/record_tests.cpp
 
diff --git a/zircon/system/utest/usb/usb-test.c b/zircon/system/utest/usb/usb-test.c
index 5163771..c208bb1 100644
--- a/zircon/system/utest/usb/usb-test.c
+++ b/zircon/system/utest/usb/usb-test.c
@@ -241,7 +241,3 @@
 RUN_TEST(usb_isoch_loopback_test)
 RUN_TEST(usb_callbacks_opt_out_test)
 END_TEST_CASE(usb_tests)
-
-int main(int argc, char** argv) {
-    return unittest_run_all_tests(argc, argv) ? 0 : -1;
-}
diff --git a/zircon/system/utest/utf_conversion/main.cpp b/zircon/system/utest/utf_conversion/main.cpp
index 9a4e79f..3f1996e 100644
--- a/zircon/system/utest/utf_conversion/main.cpp
+++ b/zircon/system/utest/utf_conversion/main.cpp
@@ -362,7 +362,3 @@
 RUN_TEST(utf16to8_dst_buffer_lengths);
 RUN_TEST(utf16to8_endianness_and_bom);
 END_TEST_CASE(utf_conversion_tests)
-
-int main(int argc, char** argv) {
-    return unittest_run_all_tests(argc, argv) ? 0 : -1;
-}
diff --git a/zircon/system/utest/util/listnode.cpp b/zircon/system/utest/util/listnode.cpp
index 1a74322..1fe0f2f 100644
--- a/zircon/system/utest/util/listnode.cpp
+++ b/zircon/system/utest/util/listnode.cpp
@@ -167,10 +167,3 @@
 RUN_TEST(element_add_remove);
 RUN_TEST(list_splice_split);
 END_TEST_CASE(listnode_tests)
-
-#ifndef BUILD_COMBINED_TESTS
-int main(int argc, char** argv) {
-    bool success = unittest_run_all_tests(argc, argv);
-    return success ? 0 : -1;
-}
-#endif  // BUILD_COMBINED_TESTS
diff --git a/zircon/system/utest/vdso-base/vdso-base.c b/zircon/system/utest/vdso-base/vdso-base.c
index 3051f652..1c0ddba 100644
--- a/zircon/system/utest/vdso-base/vdso-base.c
+++ b/zircon/system/utest/vdso-base/vdso-base.c
@@ -137,8 +137,3 @@
 RUN_TEST(vdso_unmap_test);
 RUN_TEST(vdso_map_test);
 END_TEST_CASE(vdso_base_tests)
-
-int main(int argc, char** argv) {
-    bool success = unittest_run_all_tests(argc, argv);
-    return success ? 0 : -1;
-}
diff --git a/zircon/system/utest/vdso-variant/helper/vdso-variant-helper.c b/zircon/system/utest/vdso-variant/helper/vdso-variant-helper.c
index 6bcac72..0f37df72 100644
--- a/zircon/system/utest/vdso-variant/helper/vdso-variant-helper.c
+++ b/zircon/system/utest/vdso-variant/helper/vdso-variant-helper.c
@@ -67,7 +67,3 @@
 RUN_TEST(vdso_open_test)
 RUN_TEST(vdso_missing_test_syscall1_test)
 END_TEST_CASE(vdso_variant_tests)
-
-int main(int argc, char** argv) {
-    return unittest_run_all_tests(argc, argv) ? 0 : -1;
-}
diff --git a/zircon/system/utest/vdso/vdso.cpp b/zircon/system/utest/vdso/vdso.cpp
index f05431e..53f8dbe 100644
--- a/zircon/system/utest/vdso/vdso.cpp
+++ b/zircon/system/utest/vdso/vdso.cpp
@@ -185,7 +185,3 @@
 RUN_TEST(vdso_map_code_wrong_test);
 RUN_TEST(vdso_map_change_test);
 END_TEST_CASE(vdso_tests)
-
-int main(int argc, char** argv) {
-    return unittest_run_all_tests(argc, argv) ? 0 : -1;
-}
diff --git a/zircon/system/utest/x86-umip/main.cpp b/zircon/system/utest/x86-umip/main.cpp
index 9235cf6..6e03d82 100644
--- a/zircon/system/utest/x86-umip/main.cpp
+++ b/zircon/system/utest/x86-umip/main.cpp
@@ -150,7 +150,3 @@
 RUN_TEST(umip_test<Instruction::NOOP>)
 RUN_TEST(umip_test<Instruction::MOV_NONCANON>)
 END_TEST_CASE(x86_umip_test)
-
-int main(int argc, char** argv) {
-    return unittest_run_all_tests(argc, argv) ? 0 : -1;
-}
diff --git a/zircon/system/utest/zbi/zbi.cpp b/zircon/system/utest/zbi/zbi.cpp
index 8bbfe83..7df2897 100644
--- a/zircon/system/utest/zbi/zbi.cpp
+++ b/zircon/system/utest/zbi/zbi.cpp
@@ -528,7 +528,3 @@
 RUN_TEST(ZbiTestExtendOkay)
 RUN_TEST(ZbiTestNoOverflow)
 END_TEST_CASE(zbi_tests)
-
-int main(int argc, char** argv) {
-    return unittest_run_all_tests(argc, argv) ? 0 : -1;
-}
diff --git a/zircon/system/utest/zxio/main.c b/zircon/system/utest/zxio/main.c
deleted file mode 100644
index bfd9b24..0000000
--- a/zircon/system/utest/zxio/main.c
+++ /dev/null
@@ -1,10 +0,0 @@
-// Copyright 2017 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.
-
-#include <unittest/unittest.h>
-
-int main(int argc, char** argv) {
-    bool success = unittest_run_all_tests(argc, argv);
-    return success ? 0 : -1;
-}
diff --git a/zircon/system/utest/zxio/rules.mk b/zircon/system/utest/zxio/rules.mk
index 7833e934..08f74ca 100644
--- a/zircon/system/utest/zxio/rules.mk
+++ b/zircon/system/utest/zxio/rules.mk
@@ -11,7 +11,6 @@
 MODULE_NAME := zxio-test
 
 MODULE_SRCS := \
-    $(LOCAL_DIR)/main.c \
     $(LOCAL_DIR)/null-test.cpp \
     $(LOCAL_DIR)/vmofile-test.cpp \
     $(LOCAL_DIR)/zxio-test.cpp \