testing/cxxtest: Move examples/cxxtest to testing.

This commit is contained in:
Gregory Nutt 2019-01-24 15:05:16 -06:00
parent 60dc0a8f2b
commit def2c19c68
7 changed files with 45 additions and 45 deletions

View File

@ -228,40 +228,6 @@ examples/cpuhog
back mode. This may be useful if you are trying run down other problems back mode. This may be useful if you are trying run down other problems
that you think might only occur when the system is very busy. that you think might only occur when the system is very busy.
examples/cxxtest
^^^^^^^^^^^^^^^^
This is a test of the C++ standard library. At present a port of the uClibc++
C++ library is available. Due to licensing issues, the uClibc++ C++ library
is not included in the NuttX source tree by default, but must be installed
(see the README.txt file in the uClibc++ download package for installation).
The uClibc++ test includes simple test of:
- iostreams,
- STL,
- RTTI, and
- Exceptions
Example Configuration Options
-----------------------------
CONFIG_EXAMPLES_CXXTEST=y - Eanbles the example
CONFIG_EXAMPLES_CXXTEST_CXXINITIALIZE=y - By default, if CONFIG_HAVE_CXX
and CONFIG_HAVE_CXXINITIALIZE are defined, then this example
will call the NuttX function to initialize static C++ constructors.
This option may be disabled, however, if that static initialization
was performed elsewhere.
Other Required Configuration Settings
-------------------------------------
Other NuttX setting that are required include:
CONFIG_HAVE_CXX=y
CONFIG_HAVE_CXXINITIALIZE=y
CONFIG_UCLIBCXX=y
Additional uClibc++ settings may be required in your build environment.
examples/dac examples/dac
^^^^^^^^^^^^ ^^^^^^^^^^^^

View File

@ -4,6 +4,40 @@ apps/testing README file
The apps/testing directory is used to build NuttX-specific tests and to The apps/testing directory is used to build NuttX-specific tests and to
include external testing frameworks include external testing frameworks
testing/cxxtest
===============
This is a test of the C++ standard library. At present a port of the uClibc++
C++ library is available. Due to licensing issues, the uClibc++ C++ library
is not included in the NuttX source tree by default, but must be installed
(see the README.txt file in the uClibc++ download package for installation).
The uClibc++ test includes simple test of:
- iostreams,
- STL,
- RTTI, and
- Exceptions
Example Configuration Options
-----------------------------
CONFIG_TESTINGCXXTEST=y - Eanbles the example
CONFIG_TESTINGCXXTEST_CXXINITIALIZE=y - By default, if CONFIG_HAVE_CXX
and CONFIG_HAVE_CXXINITIALIZE are defined, then this example
will call the NuttX function to initialize static C++ constructors.
This option may be disabled, however, if that static initialization
was performed elsewhere.
Other Required Configuration Settings
-------------------------------------
Other NuttX setting that are required include:
CONFIG_HAVE_CXX=y
CONFIG_HAVE_CXXINITIALIZE=y
CONFIG_UCLIBCXX=y
Additional uClibc++ settings may be required in your build environment.
testing/fstest testing/fstest
============== ==============

View File

@ -3,16 +3,16 @@
# see the file kconfig-language.txt in the NuttX tools repository. # see the file kconfig-language.txt in the NuttX tools repository.
# #
config EXAMPLES_CXXTEST config TESTINGCXXTEST
tristate "C++ test program" tristate "C++ test program"
default n default n
depends on HAVE_CXX depends on HAVE_CXX
---help--- ---help---
Enable the C++ test program Enable the C++ test program
if EXAMPLES_CXXTEST if TESTINGCXXTEST
config EXAMPLES_CXXTEST_CXXINITIALIZE config TESTINGCXXTEST_CXXINITIALIZE
bool "C++ Initialization" bool "C++ Initialization"
default y default y
depends on HAVE_CXX && HAVE_CXXINITIALIZE depends on HAVE_CXX && HAVE_CXXINITIALIZE

View File

@ -1,5 +1,5 @@
############################################################################ ############################################################################
# apps/examples/cxxtest/Make.defs # apps/testing/Make.defs
# Adds selected applications to apps/ build # Adds selected applications to apps/ build
# #
# Copyright (C) 2015 Gregory Nutt. All rights reserved. # Copyright (C) 2015 Gregory Nutt. All rights reserved.
@ -34,6 +34,6 @@
# #
############################################################################ ############################################################################
ifneq ($(CONFIG_EXAMPLES_CXXTEST),) ifneq ($(CONFIG_TESTINGCXXTEST),)
CONFIGURED_APPS += examples/cxxtest CONFIGURED_APPS += testing
endif endif

View File

@ -1,5 +1,5 @@
############################################################################ ############################################################################
# apps/examples/cxxtest/Makefile # apps/testing/Makefile
# #
# Copyright (C) 2009-2012 Gregory Nutt. All rights reserved. # Copyright (C) 2009-2012 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <spudmonkey@racsa.co.cr> # Author: Gregory Nutt <spudmonkey@racsa.co.cr>
@ -51,6 +51,6 @@ APPNAME = cxxtest
PRIORITY = SCHED_PRIORITY_DEFAULT PRIORITY = SCHED_PRIORITY_DEFAULT
STACKSIZE = 4096 STACKSIZE = 4096
MODULE = CONFIG_EXAMPLES_CXXTEST MODULE = CONFIG_TESTINGCXXTEST
include $(APPDIR)/Application.mk include $(APPDIR)/Application.mk

View File

@ -1,5 +1,5 @@
//*************************************************************************** //***************************************************************************
// examples/cxxtest/main.cxx // testing/main.cxx
// //
// Copyright (C) 2012, 2017 Gregory Nutt. All rights reserved. // Copyright (C) 2012, 2017 Gregory Nutt. All rights reserved.
// Author: Qiang Yu, http://rgmp.sourceforge.net/wiki/index.php/Main_Page // Author: Qiang Yu, http://rgmp.sourceforge.net/wiki/index.php/Main_Page
@ -61,7 +61,7 @@ using namespace std;
#if !defined(CONFIG_HAVE_CXX) || !defined(CONFIG_HAVE_CXXINITIALIZE) #if !defined(CONFIG_HAVE_CXX) || !defined(CONFIG_HAVE_CXXINITIALIZE)
# warning Support for static initializers is NOT enabled # warning Support for static initializers is NOT enabled
# undef CONFIG_EXAMPLES_CXXTEST_CXXINITIALIZE # undef CONFIG_TESTINGCXXTEST_CXXINITIALIZE
#endif #endif
//*************************************************************************** //***************************************************************************
@ -250,7 +250,7 @@ extern "C"
// If C++ initialization for static constructors is supported, then do // If C++ initialization for static constructors is supported, then do
// that first // that first
#ifdef CONFIG_EXAMPLES_CXXTEST_CXXINITIALIZE #ifdef CONFIG_TESTINGCXXTEST_CXXINITIALIZE
up_cxxinitialize(); up_cxxinitialize();
#endif #endif