Skip to content

Commit

Permalink
apps/testing:merge case folder to the new mm folder
Browse files Browse the repository at this point in the history
1.rename original  mm folder to heaptest and move it to mm folder

2.move the following folders into the new mm folder:
  cachetest, heaptest, iob, kasantest, memstress, memtester, ramtest, stressapptest

Signed-off-by: tengshuangshuang <[email protected]>
  • Loading branch information
txy-21 committed Jan 23, 2025
1 parent 2ad162d commit e1eabc3
Show file tree
Hide file tree
Showing 44 changed files with 146 additions and 72 deletions.
1 change: 1 addition & 0 deletions testing/mm/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/Kconfig
17 changes: 2 additions & 15 deletions testing/mm/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,5 @@
#
# ##############################################################################

if(CONFIG_TESTING_MM)
nuttx_add_application(
NAME
${CONFIG_TESTING_MM_PROGNAME}
PRIORITY
${CONFIG_TESTING_MM_PRIORITY}
STACKSIZE
${CONFIG_TESTING_MM_STACKSIZE}
MODULE
${CONFIG_TESTING_MM}
INCLUDE_DIRECTORIES
${NUTTX_DIR}/mm/mm_heap
SRCS
mm_main.c)
endif()
nuttx_add_subdirectory()
nuttx_generate_kconfig(MENUDESC "mm")
4 changes: 1 addition & 3 deletions testing/mm/Make.defs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,4 @@
#
############################################################################

ifneq ($(CONFIG_TESTING_MM),)
CONFIGURED_APPS += $(APPDIR)/testing/mm
endif
include $(wildcard $(APPDIR)/testing/mm/*/Make.defs)
15 changes: 2 additions & 13 deletions testing/mm/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,6 @@
#
############################################################################

include $(APPDIR)/Make.defs
MENUDESC = "mm"

# Memory Management Test

PROGNAME = $(CONFIG_TESTING_MM_PROGNAME)
PRIORITY = $(CONFIG_TESTING_MM_PRIORITY)
STACKSIZE = $(CONFIG_TESTING_MM_STACKSIZE)
MODULE = $(CONFIG_TESTING_MM)

MAINSRC = mm_main.c

CFLAGS += -I$(TOPDIR)/mm/mm_heap

include $(APPDIR)/Application.mk
include $(APPDIR)/Directory.mk
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# ##############################################################################
# apps/testing/cachetest/CMakeLists.txt
# apps/testing/mm/cachetest/CMakeLists.txt
#
# SPDX-License-Identifier: Apache-2.0
#
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
############################################################################
# apps/testing/cachetest/Make.defs
# apps/testing/mm/cachetest/Make.defs
#
# SPDX-License-Identifier: Apache-2.0
#
Expand All @@ -21,5 +21,5 @@
############################################################################

ifneq ($(CONFIG_TESTING_CACHETEST),)
CONFIGURED_APPS += $(APPDIR)/testing/cachetest
CONFIGURED_APPS += $(APPDIR)/testing/mm/cachetest
endif
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
############################################################################
# apps/testing/cachetest/Makefile
# apps/testing/mm/cachetest/Makefile
#
# SPDX-License-Identifier: Apache-2.0
#
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/****************************************************************************
* apps/testing/cachetest/cachetest_main.c
* apps/testing/mm/cachetest/cachetest_main.c
*
* SPDX-License-Identifier: Apache-2.0
*
Expand Down
37 changes: 37 additions & 0 deletions testing/mm/heaptest/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# ##############################################################################
# apps/testing/mm/heaptest/CMakeLists.txt
#
# SPDX-License-Identifier: Apache-2.0
#
# Licensed to the Apache Software Foundation (ASF) under one or more contributor
# license agreements. See the NOTICE file distributed with this work for
# additional information regarding copyright ownership. The ASF licenses this
# file to you under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy of
# the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations under
# the License.
#
# ##############################################################################

if(CONFIG_TESTING_HEAP)
nuttx_add_application(
NAME
${CONFIG_TESTING_HEAP_PROGNAME}
PRIORITY
${CONFIG_TESTING_HEAP_PRIORITY}
STACKSIZE
${CONFIG_TESTING_HEAP_STACKSIZE}
MODULE
${CONFIG_TESTING_MHEAP
INCLUDE_DIRECTORIES
${NUTTX_DIR}/mm/mm_heap
SRCS
heap_main.c)
endif()
15 changes: 8 additions & 7 deletions testing/mm/Kconfig → testing/mm/heaptest/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -3,32 +3,33 @@
# see the file kconfig-language.txt in the NuttX tools repository.
#

config TESTING_MM
config TESTING_HEAP
tristate "Memory management test"
default n
---help---
Enable the memory management test

if TESTING_MM
if TESTING_HEAP

config TESTING_MM_PROGNAME
config TESTING_HEAP_PROGNAME
string "Program name"
default "mm"
default "heap"
---help---
This is the name of the program that will be used when the NSH ELF
program is installed.

config TESTING_MM_PRIORITY
config TESTING_HEAP_PRIORITY
int "Task priority"
default 100

config TESTING_MM_STACKSIZE
config TESTING_HEAP_STACKSIZE
int "Stack size"
default DEFAULT_TASK_STACKSIZE

config TESTING_MM_POWEROFF
config TESTING_HEAP_POWEROFF
bool "Terminate on test completion"
default n
depends on BOARDCTL_POWEROFF

endif

25 changes: 25 additions & 0 deletions testing/mm/heaptest/Make.defs
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
############################################################################
# apps/testing/mm/heaptest/Make.defs
#
# SPDX-License-Identifier: Apache-2.0
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership. The
# ASF licenses this file to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance with the
# License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
############################################################################

ifneq ($(CONFIG_TESTING_HEAP),)
CONFIGURED_APPS += $(APPDIR)/testing/mm/heaptest
endif
36 changes: 36 additions & 0 deletions testing/mm/heaptest/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
############################################################################
# apps/testing/mm/heaptest/Makefile
#
# SPDX-License-Identifier: Apache-2.0
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership. The
# ASF licenses this file to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance with the
# License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
############################################################################

include $(APPDIR)/Make.defs

# Memory Management Test

PROGNAME = $(CONFIG_TESTING_HEAP_PROGNAME)
PRIORITY = $(CONFIG_TESTING_HEAP_PRIORITY)
STACKSIZE = $(CONFIG_TESTING_HEAP_STACKSIZE)
MODULE = $(CONFIG_TESTING_HEAP)

MAINSRC = heap_main.c

CFLAGS += -I$(TOPDIR)/mm/mm_heap

include $(APPDIR)/Application.mk
2 changes: 1 addition & 1 deletion testing/mm/mm_main.c → testing/mm/heaptest/heap_main.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/****************************************************************************
* apps/testing/mm/mm_main.c
* apps/testing/mm/heaptest/heap_main.c
*
* SPDX-License-Identifier: Apache-2.0
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# ##############################################################################
# apps/testing/iob/CMakeLists.txt
# apps/testing/mm/iob/CMakeLists.txt
#
# SPDX-License-Identifier: Apache-2.0
#
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions testing/iob/Make.defs → testing/mm/iob/Make.defs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
############################################################################
# apps/testing/iob/Make.defs
# apps/testing/mm/iob/Make.defs
#
# SPDX-License-Identifier: Apache-2.0
#
Expand All @@ -21,5 +21,5 @@
############################################################################

ifneq ($(CONFIG_TESTING_IOB),)
CONFIGURED_APPS += $(APPDIR)/testing/iob
CONFIGURED_APPS += $(APPDIR)/testing/mm/iob
endif
2 changes: 1 addition & 1 deletion testing/iob/Makefile → testing/mm/iob/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
############################################################################
# apps/testing/iob/Makefile
# apps/testing/mm/iob/Makefile
#
# SPDX-License-Identifier: Apache-2.0
#
Expand Down
2 changes: 1 addition & 1 deletion testing/iob/iob_main.c → testing/mm/iob/iob_main.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/****************************************************************************
* apps/testing/iob/iob_main.c
* apps/testing/mm/iob/iob_main.c
*
* SPDX-License-Identifier: Apache-2.0
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# ##############################################################################
# apps/testing/kasantest/CMakeLists.txt
# apps/testing/mm/kasantest/CMakeLists.txt
#
# SPDX-License-Identifier: Apache-2.0
#
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
############################################################################
# apps/testing/kasantest/Make.defs
# apps/testing/mm/kasantest/Make.defs
#
# SPDX-License-Identifier: Apache-2.0
#
Expand All @@ -21,5 +21,5 @@
############################################################################

ifneq ($(CONFIG_TESTING_KASAN),)
CONFIGURED_APPS += $(APPDIR)/testing/kasantest
CONFIGURED_APPS += $(APPDIR)/testing/mm/kasantest
endif
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
############################################################################
# apps/testing/kasantest/Makefile
# apps/testing/mm/kasantest/Makefile
#
# SPDX-License-Identifier: Apache-2.0
#
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/****************************************************************************
* apps/testing/kasantest/kasantest.c
* apps/testing/mm/kasantest/kasantest.c
*
* SPDX-License-Identifier: Apache-2.0
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# ##############################################################################
# apps/testing/memstress/CMakeLists.txt
# apps/testing/mm/memstress/CMakeLists.txt
#
# SPDX-License-Identifier: Apache-2.0
#
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
############################################################################
# apps/testing/memstress/Make.defs
# apps/testing/mm/memstress/Make.defs
#
# SPDX-License-Identifier: Apache-2.0
#
Expand All @@ -21,5 +21,5 @@
############################################################################

ifneq ($(CONFIG_TESTING_MEMORY_STRESS),)
CONFIGURED_APPS += $(APPDIR)/testing/memstress
CONFIGURED_APPS += $(APPDIR)/testing/mm/memstress
endif
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
############################################################################
# apps/testing/memstress/Makefile
# apps/testing/mm/memstress/Makefile
#
# SPDX-License-Identifier: Apache-2.0
#
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/****************************************************************************
* apps/testing/memstress/memorystress_main.c
* apps/testing/mm/memstress/memorystress_main.c
*
* SPDX-License-Identifier: Apache-2.0
*
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# ##############################################################################
# apps/testing/memtester/CMakeLists.txt
# apps/testing/mm/memtester/CMakeLists.txt
#
# SPDX-License-Identifier: Apache-2.0
#
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
############################################################################
# apps/testing/memtester/Make.defs
# apps/testing/mm/memtester/Make.defs
#
# SPDX-License-Identifier: Apache-2.0
#
Expand All @@ -21,5 +21,5 @@
############################################################################

ifneq ($(CONFIG_UTILS_MEMTESTER),)
CONFIGURED_APPS += $(APPDIR)/testing/memtester
CONFIGURED_APPS += $(APPDIR)/testing/mm/memtester
endif
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
############################################################################
# apps/testing/memtester/Makefile
# apps/testing/mm/memtester/Makefile
#
# SPDX-License-Identifier: Apache-2.0
#
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# ##############################################################################
# apps/testing/ramtest/CMakeLists.txt
# apps/testing/mm/ramtest/CMakeLists.txt
#
# SPDX-License-Identifier: Apache-2.0
#
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions testing/ramtest/Make.defs → testing/mm/ramtest/Make.defs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
############################################################################
# apps/testing/ramtest/Make.defs
# apps/testing/mm/ramtest/Make.defs
#
# SPDX-License-Identifier: Apache-2.0
#
Expand All @@ -21,5 +21,5 @@
############################################################################

ifneq ($(CONFIG_TESTING_RAMTEST),)
CONFIGURED_APPS += $(APPDIR)/testing/ramtest
CONFIGURED_APPS += $(APPDIR)/testing/mm/ramtest
endif
2 changes: 1 addition & 1 deletion testing/ramtest/Makefile → testing/mm/ramtest/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
############################################################################
# apps/testing/ramtest/Makefile
# apps/testing/mm/ramtest/Makefile
#
# SPDX-License-Identifier: Apache-2.0
#
Expand Down
Loading

0 comments on commit e1eabc3

Please sign in to comment.