Skip to content

Commit 85a6aaa

Browse files
xiaoxiang781216cederom
authored andcommitted
apps/testing: Move irtest/sensortest/resmonitor/monkey to apps/system
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
1 parent 4e9d907 commit 85a6aaa

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+163
-163
lines changed

testing/irtest/CMakeLists.txt renamed to system/irtest/CMakeLists.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# ##############################################################################
2-
# apps/testing/irtest/CMakeLists.txt
2+
# apps/system/irtest/CMakeLists.txt
33
#
44
# SPDX-License-Identifier: Apache-2.0
55
#
@@ -20,19 +20,19 @@
2020
#
2121
# ##############################################################################
2222

23-
if(CONFIG_TESTING_IRTEST)
23+
if(CONFIG_SYSTEM_IRTEST)
2424
file(GLOB CURRENT_SRCS *.cxx)
2525
list(REMOVE_ITEM CURRENT_SRCS main.cxx)
2626
set(SRCS main.cxx ${CURRENT_SRCS})
2727
nuttx_add_application(
2828
NAME
29-
${CONFIG_TESTING_IRTEST_PROGNAME}
29+
${CONFIG_SYSTEM_IRTEST_PROGNAME}
3030
PRIORITY
31-
${CONFIG_TESTING_IRTEST_PRIORITY}
31+
${CONFIG_SYSTEM_IRTEST_PRIORITY}
3232
STACKSIZE
33-
${CONFIG_TESTING_IRTEST_STACKSIZE}
33+
${CONFIG_SYSTEM_IRTEST_STACKSIZE}
3434
MODULE
35-
${CONFIG_TESTING_IRTEST}
35+
${CONFIG_SYSTEM_IRTEST}
3636
SRCS
3737
${SRCS})
3838
endif()

testing/irtest/Kconfig renamed to system/irtest/Kconfig

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,35 +3,35 @@
33
# see the file kconfig-language.txt in the NuttX tools repository.
44
#
55

6-
config TESTING_IRTEST
6+
config SYSTEM_IRTEST
77
tristate "IR driver test"
88
default n
99
depends on DRIVERS_RC
1010
---help---
1111
Enable the IR driver test
1212

13-
if TESTING_IRTEST
13+
if SYSTEM_IRTEST
1414

15-
config TESTING_IRTEST_PROGNAME
15+
config SYSTEM_IRTEST_PROGNAME
1616
string "Program name"
1717
default "irtest"
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_IRTEST_PRIORITY
22+
config SYSTEM_IRTEST_PRIORITY
2323
int "IR driver test task priority"
2424
default 100
2525

26-
config TESTING_IRTEST_STACKSIZE
26+
config SYSTEM_IRTEST_STACKSIZE
2727
int "IR driver test stack size"
2828
default DEFAULT_TASK_STACKSIZE
2929

30-
config TESTING_IRTEST_MAX_NIRDEV
30+
config SYSTEM_IRTEST_MAX_NIRDEV
3131
int "The Maximum number of IR devices supported"
3232
default 2
3333

34-
config TESTING_IRTEST_MAX_SIRDATA
34+
config SYSTEM_IRTEST_MAX_SIRDATA
3535
int "The Maximum size of sending data in unsigned int"
3636
default 64
3737

testing/irtest/Make.defs renamed to system/irtest/Make.defs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
############################################################################
2-
# apps/testing/irtest/Make.defs
2+
# apps/system/irtest/Make.defs
33
#
44
# SPDX-License-Identifier: Apache-2.0
55
#
@@ -20,6 +20,6 @@
2020
#
2121
############################################################################
2222

23-
ifneq ($(CONFIG_TESTING_IRTEST),)
23+
ifneq ($(CONFIG_SYSTEM_IRTEST),)
2424
CONFIGURED_APPS += $(APPDIR)/testing/irtest
2525
endif

testing/irtest/Makefile renamed to system/irtest/Makefile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
############################################################################
2-
# apps/testing/irtest/Makefile
2+
# apps/system/irtest/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_IRTEST_PROGNAME)
26-
PRIORITY = $(CONFIG_TESTING_IRTEST_PRIORITY)
27-
STACKSIZE = $(CONFIG_TESTING_IRTEST_STACKSIZE)
28-
MODULE = $(CONFIG_TESTING_IRTEST)
25+
PROGNAME = $(CONFIG_SYSTEM_IRTEST_PROGNAME)
26+
PRIORITY = $(CONFIG_SYSTEM_IRTEST_PRIORITY)
27+
STACKSIZE = $(CONFIG_SYSTEM_IRTEST_STACKSIZE)
28+
MODULE = $(CONFIG_SYSTEM_IRTEST)
2929

3030
MAINSRC = main.cxx
3131
CXXSRCS = $(filter-out $(MAINSRC), $(wildcard *.cxx))

testing/irtest/cmd.cxx renamed to system/irtest/cmd.cxx

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/****************************************************************************
2-
* apps/testing/irtest/cmd.cxx
2+
* apps/system/irtest/cmd.cxx
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*
@@ -46,7 +46,7 @@
4646

4747
static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
4848
static pthread_cond_t cond = PTHREAD_COND_INITIALIZER;
49-
static int g_irdevs[CONFIG_TESTING_IRTEST_MAX_NIRDEV];
49+
static int g_irdevs[CONFIG_SYSTEM_IRTEST_MAX_NIRDEV];
5050

5151
/****************************************************************************
5252
* Private Functions
@@ -190,7 +190,7 @@ CMD1(open_device, const char *, file_name)
190190
}
191191

192192
int index = 0;
193-
for (; index < CONFIG_TESTING_IRTEST_MAX_NIRDEV; index++)
193+
for (; index < CONFIG_SYSTEM_IRTEST_MAX_NIRDEV; index++)
194194
{
195195
if (g_irdevs[index] == -1)
196196
{
@@ -199,7 +199,7 @@ CMD1(open_device, const char *, file_name)
199199
}
200200
}
201201

202-
if (index == CONFIG_TESTING_IRTEST_MAX_NIRDEV)
202+
if (index == CONFIG_SYSTEM_IRTEST_MAX_NIRDEV)
203203
{
204204
return ERROR;
205205
}
@@ -209,7 +209,7 @@ CMD1(open_device, const char *, file_name)
209209

210210
CMD1(close_device, size_t, index)
211211
{
212-
if (index >= CONFIG_TESTING_IRTEST_MAX_NIRDEV)
212+
if (index >= CONFIG_SYSTEM_IRTEST_MAX_NIRDEV)
213213
{
214214
return ERROR;
215215
}
@@ -226,15 +226,15 @@ CMD1(close_device, size_t, index)
226226

227227
CMD1(write_data, size_t, index)
228228
{
229-
unsigned int data[CONFIG_TESTING_IRTEST_MAX_SIRDATA];
229+
unsigned int data[CONFIG_SYSTEM_IRTEST_MAX_SIRDATA];
230230

231-
if (index >= CONFIG_TESTING_IRTEST_MAX_NIRDEV)
231+
if (index >= CONFIG_SYSTEM_IRTEST_MAX_NIRDEV)
232232
{
233233
return ERROR;
234234
}
235235

236236
int size = 0;
237-
for (; size < CONFIG_TESTING_IRTEST_MAX_SIRDATA; size++)
237+
for (; size < CONFIG_SYSTEM_IRTEST_MAX_SIRDATA; size++)
238238
{
239239
unsigned int tmp = get_next_arg < unsigned int > ();
240240
if (tmp == 0)
@@ -263,7 +263,7 @@ CMD1(write_data, size_t, index)
263263

264264
CMD2(read_data, size_t, index, size_t, size)
265265
{
266-
if (index >= CONFIG_TESTING_IRTEST_MAX_NIRDEV)
266+
if (index >= CONFIG_SYSTEM_IRTEST_MAX_NIRDEV)
267267
{
268268
return ERROR;
269269
}
@@ -291,7 +291,7 @@ CMD2(read_data, size_t, index, size_t, size)
291291

292292
CMD1(get_features, size_t, index)
293293
{
294-
if (index >= CONFIG_TESTING_IRTEST_MAX_NIRDEV)
294+
if (index >= CONFIG_SYSTEM_IRTEST_MAX_NIRDEV)
295295
{
296296
return ERROR;
297297
}
@@ -308,7 +308,7 @@ CMD1(get_features, size_t, index)
308308

309309
CMD1(get_send_mode, size_t, index)
310310
{
311-
if (index >= CONFIG_TESTING_IRTEST_MAX_NIRDEV)
311+
if (index >= CONFIG_SYSTEM_IRTEST_MAX_NIRDEV)
312312
{
313313
return ERROR;
314314
}
@@ -325,7 +325,7 @@ CMD1(get_send_mode, size_t, index)
325325

326326
CMD1(get_rec_mode, size_t, index)
327327
{
328-
if (index >= CONFIG_TESTING_IRTEST_MAX_NIRDEV)
328+
if (index >= CONFIG_SYSTEM_IRTEST_MAX_NIRDEV)
329329
{
330330
return ERROR;
331331
}
@@ -342,7 +342,7 @@ CMD1(get_rec_mode, size_t, index)
342342

343343
CMD1(get_rec_resolution, size_t, index)
344344
{
345-
if (index >= CONFIG_TESTING_IRTEST_MAX_NIRDEV)
345+
if (index >= CONFIG_SYSTEM_IRTEST_MAX_NIRDEV)
346346
{
347347
return ERROR;
348348
}
@@ -359,7 +359,7 @@ CMD1(get_rec_resolution, size_t, index)
359359

360360
CMD1(get_min_timeout, size_t, index)
361361
{
362-
if (index >= CONFIG_TESTING_IRTEST_MAX_NIRDEV)
362+
if (index >= CONFIG_SYSTEM_IRTEST_MAX_NIRDEV)
363363
{
364364
return ERROR;
365365
}
@@ -376,7 +376,7 @@ CMD1(get_min_timeout, size_t, index)
376376

377377
CMD1(get_max_timeout, size_t, index)
378378
{
379-
if (index >= CONFIG_TESTING_IRTEST_MAX_NIRDEV)
379+
if (index >= CONFIG_SYSTEM_IRTEST_MAX_NIRDEV)
380380
{
381381
return ERROR;
382382
}
@@ -393,7 +393,7 @@ CMD1(get_max_timeout, size_t, index)
393393

394394
CMD1(get_length, size_t, index)
395395
{
396-
if (index >= CONFIG_TESTING_IRTEST_MAX_NIRDEV)
396+
if (index >= CONFIG_SYSTEM_IRTEST_MAX_NIRDEV)
397397
{
398398
return ERROR;
399399
}
@@ -410,7 +410,7 @@ CMD1(get_length, size_t, index)
410410

411411
CMD2(set_send_mode, size_t, index, unsigned int, mode)
412412
{
413-
if (index >= CONFIG_TESTING_IRTEST_MAX_NIRDEV)
413+
if (index >= CONFIG_SYSTEM_IRTEST_MAX_NIRDEV)
414414
{
415415
return ERROR;
416416
}
@@ -420,7 +420,7 @@ CMD2(set_send_mode, size_t, index, unsigned int, mode)
420420

421421
CMD2(set_rec_mode, size_t, index, unsigned int, mode)
422422
{
423-
if (index >= CONFIG_TESTING_IRTEST_MAX_NIRDEV)
423+
if (index >= CONFIG_SYSTEM_IRTEST_MAX_NIRDEV)
424424
{
425425
return ERROR;
426426
}
@@ -430,7 +430,7 @@ CMD2(set_rec_mode, size_t, index, unsigned int, mode)
430430

431431
CMD2(set_send_carrier, size_t, index, unsigned int, carrier)
432432
{
433-
if (index >= CONFIG_TESTING_IRTEST_MAX_NIRDEV)
433+
if (index >= CONFIG_SYSTEM_IRTEST_MAX_NIRDEV)
434434
{
435435
return ERROR;
436436
}
@@ -440,7 +440,7 @@ CMD2(set_send_carrier, size_t, index, unsigned int, carrier)
440440

441441
CMD2(set_rec_carrier, size_t, index, unsigned int, carrier)
442442
{
443-
if (index >= CONFIG_TESTING_IRTEST_MAX_NIRDEV)
443+
if (index >= CONFIG_SYSTEM_IRTEST_MAX_NIRDEV)
444444
{
445445
return ERROR;
446446
}
@@ -450,7 +450,7 @@ CMD2(set_rec_carrier, size_t, index, unsigned int, carrier)
450450

451451
CMD2(set_send_duty_cycle, size_t, index, unsigned int, duty_cycle)
452452
{
453-
if (index >= CONFIG_TESTING_IRTEST_MAX_NIRDEV)
453+
if (index >= CONFIG_SYSTEM_IRTEST_MAX_NIRDEV)
454454
{
455455
return ERROR;
456456
}
@@ -460,7 +460,7 @@ CMD2(set_send_duty_cycle, size_t, index, unsigned int, duty_cycle)
460460

461461
CMD2(set_transmitter_mask, size_t, index, unsigned int, mask)
462462
{
463-
if (index >= CONFIG_TESTING_IRTEST_MAX_NIRDEV)
463+
if (index >= CONFIG_SYSTEM_IRTEST_MAX_NIRDEV)
464464
{
465465
return ERROR;
466466
}
@@ -470,7 +470,7 @@ CMD2(set_transmitter_mask, size_t, index, unsigned int, mask)
470470

471471
CMD2(set_rec_timeout, size_t, index, unsigned int, timeout)
472472
{
473-
if (index >= CONFIG_TESTING_IRTEST_MAX_NIRDEV)
473+
if (index >= CONFIG_SYSTEM_IRTEST_MAX_NIRDEV)
474474
{
475475
return ERROR;
476476
}
@@ -480,7 +480,7 @@ CMD2(set_rec_timeout, size_t, index, unsigned int, timeout)
480480

481481
CMD2(set_rec_timeout_reports, size_t, index, unsigned int, enable)
482482
{
483-
if (index >= CONFIG_TESTING_IRTEST_MAX_NIRDEV)
483+
if (index >= CONFIG_SYSTEM_IRTEST_MAX_NIRDEV)
484484
{
485485
return ERROR;
486486
}
@@ -490,7 +490,7 @@ CMD2(set_rec_timeout_reports, size_t, index, unsigned int, enable)
490490

491491
CMD2(set_measure_carrier_mode, size_t, index, unsigned int, enable)
492492
{
493-
if (index >= CONFIG_TESTING_IRTEST_MAX_NIRDEV)
493+
if (index >= CONFIG_SYSTEM_IRTEST_MAX_NIRDEV)
494494
{
495495
return ERROR;
496496
}
@@ -500,7 +500,7 @@ CMD2(set_measure_carrier_mode, size_t, index, unsigned int, enable)
500500

501501
CMD2(set_rec_carrier_range, size_t, index, unsigned int, carrier)
502502
{
503-
if (index >= CONFIG_TESTING_IRTEST_MAX_NIRDEV)
503+
if (index >= CONFIG_SYSTEM_IRTEST_MAX_NIRDEV)
504504
{
505505
return ERROR;
506506
}
@@ -514,7 +514,7 @@ CMD2(set_rec_carrier_range, size_t, index, unsigned int, carrier)
514514

515515
void init_device()
516516
{
517-
for (int i = 0; i < CONFIG_TESTING_IRTEST_MAX_NIRDEV; i++)
517+
for (int i = 0; i < CONFIG_SYSTEM_IRTEST_MAX_NIRDEV; i++)
518518
g_irdevs[i] = -1;
519519
}
520520

testing/irtest/cmd.hpp renamed to system/irtest/cmd.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/****************************************************************************
2-
* apps/testing/irtest/cmd.hpp
2+
* apps/system/irtest/cmd.hpp
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*
@@ -20,8 +20,8 @@
2020
*
2121
****************************************************************************/
2222

23-
#ifndef __APPS_TESTING_IRTEST_CMD_HPP
24-
#define __APPS_TESTING_IRTEST_CMD_HPP
23+
#ifndef __APPS_SYSTEM_IRTEST_CMD_HPP
24+
#define __APPS_SYSTEM_IRTEST_CMD_HPP
2525

2626
/****************************************************************************
2727
* Included Files
@@ -179,4 +179,4 @@ inline float get_next_arg()
179179

180180
void init_device();
181181

182-
#endif /* __APPS_TESTING_IRTEST_CMD_H */
182+
#endif /* __APPS_SYSTEM_IRTEST_CMD_H */

testing/irtest/enum.cxx renamed to system/irtest/enum.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/****************************************************************************
2-
* apps/testing/irtest/enum.cxx
2+
* apps/system/irtest/enum.cxx
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*

testing/irtest/enum.hpp renamed to system/irtest/enum.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/****************************************************************************
2-
* apps/testing/irtest/enum.hpp
2+
* apps/system/irtest/enum.hpp
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*
@@ -20,8 +20,8 @@
2020
*
2121
****************************************************************************/
2222

23-
#ifndef __APPS_TESTING_IRTEST_ENUM_HPP
24-
#define __APPS_TESTING_IRTEST_ENUM_HPP
23+
#ifndef __APPS_SYSTEM_IRTEST_ENUM_HPP
24+
#define __APPS_SYSTEM_IRTEST_ENUM_HPP
2525

2626
/****************************************************************************
2727
* Included Files
@@ -71,4 +71,4 @@ struct enum_type
7171

7272
extern const struct enum_type *g_enum_table[];
7373

74-
#endif /* __APPS_TESTING_IRTEST_ENUM_H */
74+
#endif /* __APPS_SYSTEM_IRTEST_ENUM_H */

0 commit comments

Comments
 (0)