Jaakko Hannikainen | 9167a03 | 2016-08-22 14:51:46 +0300 | [diff] [blame] | 1 | # |
| 2 | # Copyright (c) 2016 Intel Corporation |
| 3 | # |
David B. Kinder | ac74d8b | 2017-01-18 17:01:01 -0800 | [diff] [blame] | 4 | # SPDX-License-Identifier: Apache-2.0 |
Jaakko Hannikainen | 9167a03 | 2016-08-22 14:51:46 +0300 | [diff] [blame] | 5 | # |
| 6 | |
Ulf Magnusson | 9964cf2 | 2019-03-18 15:03:35 +0100 | [diff] [blame] | 7 | menu "Testing" |
Jaakko Hannikainen | 9167a03 | 2016-08-22 14:51:46 +0300 | [diff] [blame] | 8 | |
Anas Nashif | ccad9d0 | 2019-02-19 15:45:18 -0500 | [diff] [blame] | 9 | source "subsys/testsuite/ztest/Kconfig" |
Jaakko Hannikainen | 9167a03 | 2016-08-22 14:51:46 +0300 | [diff] [blame] | 10 | |
Anas Nashif | 829598b | 2018-01-06 16:15:53 -0500 | [diff] [blame] | 11 | config TEST |
| 12 | bool "Mark project as a test" |
Paul Sokolovsky | 2a798bb | 2019-03-13 22:56:51 +0300 | [diff] [blame] | 13 | # For tests, store thread names in binary and dump them on crash to |
| 14 | # ease debugging. |
| 15 | select THREAD_NAME |
Anas Nashif | 829598b | 2018-01-06 16:15:53 -0500 | [diff] [blame] | 16 | help |
| 17 | Mark a project or an application as a test. This will enable a few |
| 18 | test defaults. |
| 19 | |
Anas Nashif | cd91038 | 2018-10-18 10:06:01 -0400 | [diff] [blame] | 20 | config TEST_SHELL |
| 21 | bool "Enable various shells for testing" |
| 22 | select GPIO_SHELL if GPIO |
Anas Nashif | cd91038 | 2018-10-18 10:06:01 -0400 | [diff] [blame] | 23 | help |
| 24 | Enable various platform and driver related shells for testing. |
| 25 | |
Mazen NEIFER | 4713575 | 2017-01-31 23:05:18 +0100 | [diff] [blame] | 26 | config TEST_EXTRA_STACKSIZE |
Ramakrishna Pallala | 275d16d | 2018-01-30 21:09:12 +0530 | [diff] [blame] | 27 | int "Test function extra thread stack size" |
Wentong Wu | b991962 | 2019-04-04 17:50:30 +0800 | [diff] [blame] | 28 | default 2048 if COVERAGE_GCOV |
Mazen NEIFER | 4713575 | 2017-01-31 23:05:18 +0100 | [diff] [blame] | 29 | default 768 if XTENSA |
Ulf Magnusson | ec3eff5 | 2018-07-30 10:57:47 +0200 | [diff] [blame] | 30 | default 0 |
Anas Nashif | a2eaae5 | 2018-01-07 11:54:38 -0500 | [diff] [blame] | 31 | help |
| 32 | Additional stack for tests on some platform where default is not |
| 33 | enough. |
Mazen NEIFER | 4713575 | 2017-01-31 23:05:18 +0100 | [diff] [blame] | 34 | |
Adithya Baglody | 76ee02b | 2018-08-31 15:13:36 +0530 | [diff] [blame] | 35 | config HAS_COVERAGE_SUPPORT |
| 36 | bool |
| 37 | help |
| 38 | The code coverage report generation is only available on boards |
Alberto Escolar Piedras | ee3403a | 2019-02-11 16:44:51 +0100 | [diff] [blame] | 39 | with enough spare RAM to buffer the coverage data, or on boards |
| 40 | based on the POSIX ARCH. |
Adithya Baglody | 76ee02b | 2018-08-31 15:13:36 +0530 | [diff] [blame] | 41 | |
Anas Nashif | 72fe097 | 2017-11-22 08:28:52 -0500 | [diff] [blame] | 42 | config COVERAGE |
| 43 | bool "Create coverage data" |
Adithya Baglody | 76ee02b | 2018-08-31 15:13:36 +0530 | [diff] [blame] | 44 | depends on HAS_COVERAGE_SUPPORT |
Anas Nashif | 72fe097 | 2017-11-22 08:28:52 -0500 | [diff] [blame] | 45 | help |
| 46 | This option will build your application with the -coverage option |
| 47 | which will generate data that can be used to create coverage reports. |
Alberto Escolar Piedras | 02ec7a0 | 2019-09-12 14:31:00 +0200 | [diff] [blame] | 48 | For more information see |
| 49 | https://docs.zephyrproject.org/latest/guides/coverage.html |
Adithya Baglody | a47f14a | 2018-03-19 14:17:55 +0530 | [diff] [blame] | 50 | |
Adithya Baglody | e223cfa | 2018-08-29 17:31:46 +0530 | [diff] [blame] | 51 | if COVERAGE |
| 52 | config COVERAGE_GCOV |
| 53 | bool "Create Coverage data from hardware platform" |
Adithya Baglody | e223cfa | 2018-08-29 17:31:46 +0530 | [diff] [blame] | 54 | depends on !NATIVE_APPLICATION |
| 55 | default y |
| 56 | help |
| 57 | This option will select the custom gcov library. The reports will |
| 58 | be available over serial. This serial dump can be passed to |
| 59 | gen_gcov_files.py which creates the required .gcda files. These |
| 60 | can be read by gcov utility. For more details see gcovr.com . |
| 61 | endif |
| 62 | |
Adithya Baglody | a47f14a | 2018-03-19 14:17:55 +0530 | [diff] [blame] | 63 | config TEST_USERSPACE |
Andrew Boie | 7b1ee5c | 2019-04-05 15:39:50 -0700 | [diff] [blame] | 64 | bool "Indicate that this test exercises user mode" |
| 65 | help |
| 66 | This option indicates that a test case puts threads in user mode, |
Marc Herbert | 4afcc0f | 2019-05-21 16:09:35 -0700 | [diff] [blame] | 67 | and that the build system will [override and] enable USERSPACE |
| 68 | if the platform supports it. It should be set in a .conf file on |
| 69 | a per-test basis and is not meant to be used outside test cases. |
| 70 | Tests with this option should also have the "userspace" filtering |
| 71 | tag in their testcase.yaml file. |
Andrew Boie | 7b1ee5c | 2019-04-05 15:39:50 -0700 | [diff] [blame] | 72 | |
| 73 | The userspace APIs are no-ops if userspace is not enabled, so it is |
| 74 | OK to enable this even if the test will run on platforms which do |
| 75 | not support userspace. The test should still run on those platforms, |
| 76 | just with all threads in supervisor mode. |
| 77 | |
| 78 | If a test *requires* that userspace be enabled in order to |
Marc Herbert | 4afcc0f | 2019-05-21 16:09:35 -0700 | [diff] [blame] | 79 | pass, CONFIG_ARCH_HAS_USERSPACE should be filtered in its |
Andrew Boie | 7b1ee5c | 2019-04-05 15:39:50 -0700 | [diff] [blame] | 80 | testcase.yaml. |
| 81 | |
Andrew Boie | 2192499 | 2019-08-08 12:26:55 -0700 | [diff] [blame] | 82 | config TEST_LOGGING_DEFAULTS |
| 83 | bool "Enable test case logging defaults" |
| 84 | depends on TEST |
| 85 | select LOG |
Andrew Boie | 7e29c9d | 2019-09-22 16:44:43 -0700 | [diff] [blame^] | 86 | select LOG_MINIMAL |
Andrew Boie | 2192499 | 2019-08-08 12:26:55 -0700 | [diff] [blame] | 87 | default y |
| 88 | help |
| 89 | Option which implements default policy of enabling logging in |
Andrew Boie | 7e29c9d | 2019-09-22 16:44:43 -0700 | [diff] [blame^] | 90 | minimal mode for all test cases. For tests that need alternate |
Andrew Boie | 2192499 | 2019-08-08 12:26:55 -0700 | [diff] [blame] | 91 | logging configuration, or no logging at all, disable this |
| 92 | in the project-level defconfig. |
| 93 | |
Andrew Boie | 7b1ee5c | 2019-04-05 15:39:50 -0700 | [diff] [blame] | 94 | config TEST_ENABLE_USERSPACE |
| 95 | bool |
| 96 | depends on TEST_USERSPACE |
Adithya Baglody | a47f14a | 2018-03-19 14:17:55 +0530 | [diff] [blame] | 97 | depends on ARCH_HAS_USERSPACE |
| 98 | select USERSPACE |
Andrew Boie | efe0c4b | 2018-05-21 12:44:38 -0700 | [diff] [blame] | 99 | select DYNAMIC_OBJECTS |
| 100 | default y |
Adithya Baglody | a47f14a | 2018-03-19 14:17:55 +0530 | [diff] [blame] | 101 | help |
Marc Herbert | 4afcc0f | 2019-05-21 16:09:35 -0700 | [diff] [blame] | 102 | This hidden option implements the TEST_USERSPACE logic. It turns on |
| 103 | USERSPACE when CONFIG_ARCH_HAS_USERSPACE is set and the test |
Andrew Boie | 7b1ee5c | 2019-04-05 15:39:50 -0700 | [diff] [blame] | 104 | case itself indicates that it exercises user mode via |
Anas Nashif | 073e017 | 2019-04-07 09:02:37 -0400 | [diff] [blame] | 105 | CONFIG_TEST_USERSPACE. |
Andrew Boie | ba2c44e | 2018-05-24 22:14:20 -0700 | [diff] [blame] | 106 | |
Ioannis Glaropoulos | 912c558 | 2019-08-26 12:44:03 +0200 | [diff] [blame] | 107 | config TEST_USERSPACE_WITHOUT_HW_STACK_PROTECTION |
| 108 | bool "Run User Mode tests without additionally enabling stack protection" |
| 109 | depends on TEST_ENABLE_USERSPACE |
Ioannis Glaropoulos | 861fc23 | 2019-08-26 12:40:31 +0200 | [diff] [blame] | 110 | default y if SOC_SERIES_KINETIS_KE1XF |
Ioannis Glaropoulos | 912c558 | 2019-08-26 12:44:03 +0200 | [diff] [blame] | 111 | help |
| 112 | A HW platform might not have sufficient MPU/MMU capabilities to support |
| 113 | running all test cases with User Mode and HW Stack Protection features |
| 114 | simultaneously enabled. For this platforms we execute the User Mode- |
| 115 | related tests without enabling HW stack protection. |
| 116 | |
Andrew Boie | ba2c44e | 2018-05-24 22:14:20 -0700 | [diff] [blame] | 117 | config TEST_HW_STACK_PROTECTION |
| 118 | bool "Enable hardware-based stack overflow detection if available" |
| 119 | depends on ARCH_HAS_STACK_PROTECTION |
| 120 | depends on TEST |
| 121 | select HW_STACK_PROTECTION |
Ioannis Glaropoulos | 912c558 | 2019-08-26 12:44:03 +0200 | [diff] [blame] | 122 | default y if !TEST_USERSPACE_WITHOUT_HW_STACK_PROTECTION |
Andrew Boie | ba2c44e | 2018-05-24 22:14:20 -0700 | [diff] [blame] | 123 | help |
| 124 | This option will enable hardware-based stack protection by default |
| 125 | for all test cases if the hardware supports it. |
Adithya Baglody | 4377540 | 2018-04-02 15:56:55 +0530 | [diff] [blame] | 126 | |
| 127 | config TEST_FLASH_DRIVERS |
| 128 | bool "Test flash drivers" |
| 129 | depends on BOARD_QEMU_X86 |
| 130 | select FLASH_HAS_DRIVER_ENABLED |
| 131 | select FLASH_HAS_PAGE_LAYOUT |
Adithya Baglody | 4377540 | 2018-04-02 15:56:55 +0530 | [diff] [blame] | 132 | help |
| 133 | This option will help test the flash drivers. This should be enabled |
| 134 | only when using qemu_x86. |
Ulf Magnusson | 9964cf2 | 2019-03-18 15:03:35 +0100 | [diff] [blame] | 135 | |
Ioannis Glaropoulos | a3ee56f | 2019-08-08 14:56:53 +0200 | [diff] [blame] | 136 | config TEST_ARM_CORTEX_M |
| 137 | bool |
| 138 | depends on CPU_CORTEX_M |
| 139 | default y |
| 140 | select ARM_SECURE_BUSFAULT_HARDFAULT_NMI if ARM_SECURE_FIRMWARE |
| 141 | help |
| 142 | ARM Cortex-M configuration required when testing. |
| 143 | |
| 144 | Currently, this option is only utilized, to force routing |
| 145 | BusFault, HardFault, and NMI exceptions to Secure State, |
| 146 | when building a Secure ARMv8-M firmware. This will allow |
| 147 | the testing suite to utilize these exceptions, in tests. |
| 148 | Note that by default, when building with ARM_SECURE_FIRMWARE |
| 149 | set, these exceptions are set to target the Non-Secure state. |
| 150 | |
Jaakko Hannikainen | 9167a03 | 2016-08-22 14:51:46 +0300 | [diff] [blame] | 151 | endmenu |