testsuite: split coverage kconfig into own file

Coverage options deserve their own kconfig, otherwise the testsuite
Kconfig will be very crowded and difficult to read.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
diff --git a/subsys/testsuite/Kconfig b/subsys/testsuite/Kconfig
index 4735a30..a2486eb 100644
--- a/subsys/testsuite/Kconfig
+++ b/subsys/testsuite/Kconfig
@@ -24,102 +24,6 @@
 	  Additional stack for tests on some platform where default is not
 	  enough.
 
-config HAS_COVERAGE_SUPPORT
-	bool
-	help
-	  The code coverage report generation is only available on boards
-	  with enough spare RAM to buffer the coverage data, or on boards
-	  based on the POSIX ARCH.
-
-config COVERAGE
-	bool "Create coverage data"
-	depends on HAS_COVERAGE_SUPPORT
-	help
-	  This option will build your application with the -coverage option
-	  which will generate data that can be used to create coverage reports.
-	  For more information see
-	  https://docs.zephyrproject.org/latest/guides/coverage.html
-
-choice
-	prompt "Coverage mode"
-	default COVERAGE_NATIVE_GCOV if NATIVE_BUILD
-	default COVERAGE_GCOV if !NATIVE_BUILD
-	depends on COVERAGE
-
-config COVERAGE_NATIVE_GCOV
-	bool "Host compiler gcov based code coverage"
-	depends on NATIVE_BUILD
-	help
-	  Build natively with the compiler standard `--coverage` options,
-	  that is with gcov/GCC-compatible coverage
-
-config COVERAGE_NATIVE_SOURCE
-	bool "Host compiler source based code coverage"
-	depends on NATIVE_BUILD
-	depends on "$(ZEPHYR_TOOLCHAIN_VARIANT)" = "llvm"
-	help
-	  Build natively with the compiler source based coverage options.
-	  Today this is only supported with LLVM
-
-config COVERAGE_GCOV
-	bool "Create Coverage data from hardware platform"
-	depends on !NATIVE_BUILD
-	help
-	  This option will select the custom gcov library. The reports will
-	  be available over serial. This serial dump can be passed to
-	  gen_gcov_files.py which creates the required .gcda files. These
-	  can be read by gcov utility. For more details see gcovr.com .
-
-endchoice
-
-if COVERAGE_GCOV
-
-config COVERAGE_GCOV_HEAP_SIZE
-	int "Size of heap allocated for gcov coverage data dump"
-	depends on COVERAGE_GCOV
-	default 32768 if X86 || SOC_SERIES_MPS2
-	default 16384
-	help
-	  This option configures the heap size allocated for gcov coverage
-	  data to be dumped over serial. If the value is 0, no buffer will be used,
-	  data will be dumped directly over serial.
-
-choice COVERAGE_DUMP_METHOD
-	prompt "Method to dump coverage data"
-	default COVERAGE_DUMP
-
-config COVERAGE_DUMP
-	bool "Dump coverage data to console on exit"
-	help
-	  Dump collected coverage information to console on exit.
-
-config COVERAGE_SEMIHOST
-	bool "Use semihosting to write coverage data"
-	depends on SEMIHOST
-	help
-	  Use semihosting to write coverage data to a file on the host.
-
-endchoice
-
-config COVERAGE_DUMP_PATH_EXCLUDE
-	string "Exclude files matching this pattern from the coverage data"
-	default ""
-	help
-	  Filenames are matched against the pattern using the POSIX fnmatch
-	  function. Filenames are based on their path in the build folder, not the
-	  original source tree. The empty string "" disables the pattern
-	  matching.
-
-endif # COVERAGE_GCOV
-config FORCE_COVERAGE
-	bool "Force coverage"
-	select HAS_COVERAGE_SUPPORT
-	help
-	  Regardless of platform support, it will enable coverage data production.
-	  If the platform does not support coverage by default, setting this config
-	  does not guarantee that coverage data will be gathered.
-	  Application may not fit memory or crash at runtime.
-
 config TEST_USERSPACE
 	bool "Indicate that this test exercises user mode"
 	help
@@ -222,3 +126,6 @@
 	  with random intervals and random busy looping in the interrupt.
 
 endmenu
+
+
+rsource "Kconfig.coverage"
diff --git a/subsys/testsuite/Kconfig.coverage b/subsys/testsuite/Kconfig.coverage
new file mode 100644
index 0000000..ccbad92
--- /dev/null
+++ b/subsys/testsuite/Kconfig.coverage
@@ -0,0 +1,99 @@
+# SPDX-License-Identifier: Apache-2.0
+# Copyright The Zephyr Project Contributors
+#
+menu "Coverage"
+
+config HAS_COVERAGE_SUPPORT
+	bool
+	help
+	  The code coverage report generation is only available on boards
+	  with enough spare RAM to buffer the coverage data, or on boards
+	  based on the POSIX ARCH.
+
+config COVERAGE
+	bool "Create coverage data"
+	depends on HAS_COVERAGE_SUPPORT
+	help
+	  This option will build your application with the -coverage option
+	  which will generate data that can be used to create coverage reports.
+	  For more information see
+	  https://docs.zephyrproject.org/latest/guides/coverage.html
+
+choice
+	prompt "Coverage mode"
+	default COVERAGE_NATIVE_GCOV if NATIVE_BUILD
+	default COVERAGE_GCOV if !NATIVE_BUILD
+	depends on COVERAGE
+
+config COVERAGE_NATIVE_GCOV
+	bool "Host compiler gcov based code coverage"
+	depends on NATIVE_BUILD
+	help
+	  Build natively with the compiler standard `--coverage` options,
+	  that is with gcov/GCC-compatible coverage
+
+config COVERAGE_NATIVE_SOURCE
+	bool "Host compiler source based code coverage"
+	depends on NATIVE_BUILD
+	depends on "$(ZEPHYR_TOOLCHAIN_VARIANT)" = "llvm"
+	help
+	  Build natively with the compiler source based coverage options.
+	  Today this is only supported with LLVM
+
+config COVERAGE_GCOV
+	bool "Create Coverage data from hardware platform"
+	depends on !NATIVE_BUILD
+	help
+	  This option will select the custom gcov library. The reports will
+	  be available over serial. This serial dump can be passed to
+	  gen_gcov_files.py which creates the required .gcda files. These
+	  can be read by gcov utility. For more details see gcovr.com .
+
+endchoice
+
+config COVERAGE_GCOV_HEAP_SIZE
+	int "Size of heap allocated for gcov coverage data dump"
+	depends on COVERAGE_GCOV
+	default 32768 if X86 || SOC_SERIES_MPS2
+	default 16384
+	help
+	  This option configures the heap size allocated for gcov coverage
+	  data to be dumped over serial. If the value is 0, no buffer will be used,
+	  data will be dumped directly over serial.
+
+choice COVERAGE_DUMP_METHOD
+	prompt "Method to dump coverage data"
+	default COVERAGE_DUMP
+
+config COVERAGE_DUMP
+	bool "Dump coverage data to console on exit"
+	help
+	  Dump collected coverage information to console on exit.
+
+config COVERAGE_SEMIHOST
+	bool "Use semihosting to write coverage data"
+	depends on SEMIHOST
+	help
+	  Use semihosting to write coverage data to a file on the host.
+
+endchoice
+
+config FORCE_COVERAGE
+	bool "Force coverage"
+	select HAS_COVERAGE_SUPPORT
+	help
+	  Regardless of platform support, it will enable coverage data production.
+	  If the platform does not support coverage by default, setting this config
+	  does not guarantee that coverage data will be gathered.
+	  Application may not fit memory or crash at runtime.
+
+config COVERAGE_DUMP_PATH_EXCLUDE
+	string "Exclude files matching this pattern from the coverage data"
+	default ""
+	help
+	  Filenames are matched against the pattern using the POSIX fnmatch
+	  function. Filenames are based on their path in the build folder, not the
+	  original source tree. The empty string "" disables the pattern
+	  matching.
+
+endmenu