You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by pk...@apache.org on 2023/01/25 21:41:35 UTC
[nuttx-apps] branch master updated: math/libtommath: Add mtest test suite
This is an automated email from the ASF dual-hosted git repository.
pkarashchenko pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx-apps.git
The following commit(s) were added to refs/heads/master by this push:
new 1bd7554f5 math/libtommath: Add mtest test suite
1bd7554f5 is described below
commit 1bd7554f5c2e5264f46a5587351fc8f28bbeef8d
Author: panran <pa...@xiaomi.com>
AuthorDate: Mon Oct 24 11:38:22 2022 +0800
math/libtommath: Add mtest test suite
Signed-off-by: panran <pa...@xiaomi.com>
---
math/libtommath/Kconfig | 44 ++++++++++++++++++++++++++++++++++----------
math/libtommath/Makefile | 9 +++++++++
2 files changed, 43 insertions(+), 10 deletions(-)
diff --git a/math/libtommath/Kconfig b/math/libtommath/Kconfig
index b1d44a754..b4b705c9a 100644
--- a/math/libtommath/Kconfig
+++ b/math/libtommath/Kconfig
@@ -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
diff --git a/math/libtommath/Makefile b/math/libtommath/Makefile
index 8dd0e57c5..f729ba4ad 100644
--- a/math/libtommath/Makefile
+++ b/math/libtommath/Makefile
@@ -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