Skip to content

Commit 7bb1892

Browse files
apps/testing: Move sd_bench to apps/bechmarks
Signed-off-by: Xiang Xiao <[email protected]>
1 parent b7f05e8 commit 7bb1892

File tree

4 files changed

+19
-18
lines changed

4 files changed

+19
-18
lines changed

testing/sd_bench/Kconfig renamed to benchmarks/sd_bench/Kconfig

+6-6
Original file line numberDiff line numberDiff line change
@@ -3,31 +3,31 @@
33
# see the file kconfig-language.txt in the NuttX tools repository.
44
#
55

6-
config TESTING_SD_BENCH
6+
config BENCHMARK_SD_BENCH
77
tristate "SD benchmark program"
88
depends on ALLOW_BSD_COMPONENTS
99
default n
1010
---help---
1111
SD benchmark application based on https://github.com/PX4/PX4-Autopilot/blob/main/src/systemcmds/sd_bench/sd_bench.cpp
1212

13-
if TESTING_SD_BENCH
13+
if BENCHMARK_SD_BENCH
1414

15-
config TESTING_SD_BENCH_PROGNAME
15+
config BENCHMARK_SD_BENCH_PROGNAME
1616
string "Program name"
1717
default "sdbench"
1818
---help---
1919
This is the name of the program that will be used when the NSH ELF
2020
program is installed.
2121

22-
config TESTING_SD_BENCH_PRIORITY
22+
config BENCHMARK_SD_BENCH_PRIORITY
2323
int "SD bench task priority"
2424
default 100
2525

26-
config TESTING_SD_BENCH_STACKSIZE
26+
config BENCHMARK_SD_BENCH_STACKSIZE
2727
int "SD bench stack size"
2828
default DEFAULT_TASK_STACKSIZE
2929

30-
config TESTING_SD_BENCH_DEVICE
30+
config BENCHMARK_SD_BENCH_DEVICE
3131
string "SD / MMC mount point"
3232
default "/mnt"
3333

testing/sd_bench/Make.defs renamed to benchmarks/sd_bench/Make.defs

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
############################################################################
2-
# apps/testing/sd_bench/Make.defs
2+
# apps/benchmarks/sd_bench/Make.defs
33
#
44
# SPDX-License-Identifier: Apache-2.0
55
#
@@ -20,6 +20,6 @@
2020
#
2121
############################################################################
2222

23-
ifneq ($(CONFIG_TESTING_SD_BENCH),)
24-
CONFIGURED_APPS += $(APPDIR)/testing/sd_bench
23+
ifneq ($(CONFIG_BENCHMARK_SD_BENCH),)
24+
CONFIGURED_APPS += $(APPDIR)/benchmarks/sd_bench
2525
endif

testing/sd_bench/Makefile renamed to benchmarks/sd_bench/Makefile

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
############################################################################
2-
# apps/testing/sd_bench/Makefile
2+
# apps/benchmarks/sd_bench/Makefile
33
#
44
# SPDX-License-Identifier: Apache-2.0
55
#
@@ -22,10 +22,10 @@
2222

2323
include $(APPDIR)/Make.defs
2424

25-
PROGNAME = $(CONFIG_TESTING_SD_BENCH_PROGNAME)
26-
PRIORITY = $(CONFIG_TESTING_SD_BENCH_PRIORITY)
27-
STACKSIZE = $(CONFIG_TESTING_SD_BENCH_STACKSIZE)
28-
MODULE = $(CONFIG_TESTING_SD_BENCH)
25+
PROGNAME = $(CONFIG_BENCHMARK_SD_BENCH_PROGNAME)
26+
PRIORITY = $(CONFIG_BENCHMARK_SD_BENCH_PRIORITY)
27+
STACKSIZE = $(CONFIG_BENCHMARK_SD_BENCH_STACKSIZE)
28+
MODULE = $(CONFIG_BENCHMARK_SD_BENCH)
2929

3030
MAINSRC = sd_bench_main.c
3131

testing/sd_bench/sd_bench_main.c renamed to benchmarks/sd_bench/sd_bench_main.c

+5-4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
/****************************************************************************
2-
* apps/testing/sd_bench/sd_bench_main.c
2+
* apps/benchmarks/sd_bench/sd_bench_main.c
33
*
44
* SPDX-License-Identifier: BSD-3-Clause
5-
* SPDX-FileCopyrightText: 2016-2021 PX4 Development Team. All rights reserved.
5+
* SPDX-FileCopyrightText: 2016-2021 PX4 Development Team.
6+
* All rights reserved.
67
*
78
* Redistribution and use in source and binary forms, with or without
89
* modification, are permitted provided that the following conditions
@@ -77,7 +78,7 @@ typedef struct sdb_config
7778
****************************************************************************/
7879

7980
static const char *BENCHMARK_FILE =
80-
CONFIG_TESTING_SD_BENCH_DEVICE "/sd_bench";
81+
CONFIG_BENCHMARK_SD_BENCH_DEVICE "/sd_bench";
8182

8283
static const size_t max_block = 65536;
8384
static const size_t min_block = 1;
@@ -350,7 +351,7 @@ static int read_test(int fd, sdb_config_t *cfg, uint8_t *block,
350351
static void usage(void)
351352
{
352353
printf("Test the speed of an SD card or mount point\n");
353-
printf(CONFIG_TESTING_SD_BENCH_PROGNAME
354+
printf(CONFIG_BENCHMARK_SD_BENCH_PROGNAME
354355
": [-b] [-r] [-d] [-k] [-s] [-a] [-v]\n");
355356
printf(" -b Block size per write (%zu-%zu), default %zu\n",
356357
min_block, max_block, default_block);

0 commit comments

Comments
 (0)