math/libtommath: Add mtest test suite

Signed-off-by: panran <panran@xiaomi.com>
This commit is contained in:
panran 2022-10-24 11:38:22 +08:00 committed by Petro Karashchenko
parent 8994bab34c
commit 1bd7554f5c
2 changed files with 43 additions and 10 deletions

View File

@ -48,29 +48,29 @@ config LIBTOMMATH_TEST_STACKSIZE
endif # LIBTOMMATH_TEST
config LIBTOMMATH_OPPONENT_MTEST
tristate "LibTomMath MTest"
config LIBTOMMATH_MTEST_OPPONENT
tristate "LibTomMath MTest opponent"
default n
---help---
Demo mtest application for LibTomMath
Demo mtest opponent application for LibTomMath
if LIBTOMMATH_OPPONENT_MTEST
if LIBTOMMATH_MTEST_OPPONENT
config LIBTOMMATH_MTEST_OPPONENT_PROGNAME
string "MTest program name"
default "tommath_mtest"
string "MTest opponent program name"
default "tommath_mtest_opponent"
---help---
LibTomMath mtest application name
LibTomMath mtest opponent application name
config LIBTOMMATH_MTEST_OPPONENT_PRIORITY
int "MTest application priority"
int "MTest opponent application priority"
default 100
config LIBTOMMATH_MTEST_OPPONENT_STACKSIZE
int "MTest application stack size"
int "MTest opponent application stack size"
default DEFAULT_TASK_STACKSIZE
endif # LIBTOMMATH_OPPONENT_MTEST
endif # LIBTOMMATH_MTEST_OPPONENT
config LIBTOMMATH_TIMING
tristate "LibTomMath Timing"
@ -98,4 +98,28 @@ endif # LIBTOMMATH_TIMING
endif # LIBTOMMATH_DEMOS
config LIBTOMMATH_MTEST
tristate "LibTomMath MPI Math Library Mtest"
default n
---help---
LibTomMath mtest applications for LibTomMath
if LIBTOMMATH_MTEST
config LIBTOMMATH_MTEST_PROGNAME
string "Mtest program name"
default "tommath_mtest"
---help---
LibTomMath test application name
config LIBTOMMATH_MTEST_PRIORITY
int "Mtest application priority"
default 100
config LIBTOMMATH_MTEST_STACKSIZE
int "Mtest application stack size"
default DEFAULT_TASK_STACKSIZE
endif # LIBTOMMATH_MTEST
endif # MATH_LIBTOMMATH

View File

@ -82,6 +82,15 @@ PRIORITY += $(CONFIG_LIBTOMMATH_TIMING_PRIORITY)
STACKSIZE += $(CONFIG_LIBTOMMATH_TIMING_STACKSIZE)
endif
ifneq ($(CONFIG_LIBTOMMATH_MTEST),)
MAINSRC += mtest.c
VPATH += $(LIBTOMMATH_UNPACKNAME)/mtest
PROGNAME += $(CONFIG_LIBTOMMATH_MTEST_PROGNAME)
PRIORITY += $(CONFIG_LIBTOMMATH_MTEST_PRIORITY)
STACKSIZE += $(CONFIG_LIBTOMMATH_MTEST_STACKSIZE)
endif
endif
# Set up build configuration and environment