[PATCH 00/13] Avoid build system defined defines

Sebastian Huber sebastian.huber at embedded-brains.de
Fri Nov 8 14:02:47 UTC 2019


Build system defined defines are quite bad.  Firstly, they are invisible to code
indexing tools such as ctags and code anlaysers included in IDEs.  Secondly,
they make the introduction of a new build system more complicated than
necessary.  This patch set removes all build system defined defines from the
test.

Sebastian Huber (13):
  tests: Remove superfluous SMPTESTS define
  psxtests: Avoid build system defined defines
  psxtmtests: Avoid build system defined defines
  sptests: Avoid build system defined defines
  spfatal16: Remove obsolete test program
  sptests: Remove obsolete semaphore consume driver
  libtests: Avoid build system defined defines
  samples: Avoid build system defined defines
  samples/paranoia: Remove <bsp.h> include
  tmtests: Avoid build system defined defines
  mptests/mp14: Make MAX_LONG_TEST_DURATION constant
  ada/samples: Avoid build system defined defines
  mptests: Avoid build system defined defines

 testsuites/ada/samples/base_mp/node1/Makefile.am   |   5 +-
 testsuites/ada/samples/base_mp/node1/init.c        |   2 +
 testsuites/ada/samples/base_mp/node2/Makefile.am   |   5 +-
 testsuites/ada/samples/base_mp/node2/init.c        |   2 +
 testsuites/libtests/Makefile.am                    |  27 +-
 testsuites/libtests/complex/docomplexl.c           |   3 +
 testsuites/libtests/dl06/init.c                    |  89 +-----
 testsuites/libtests/dl06/initimpl.h                |  88 ++++++
 testsuites/libtests/dl06/pre-init.c                |   2 +
 testsuites/libtests/mathl/domathl.c                |   3 +
 testsuites/libtests/mouse01/init.c                 |   3 +-
 testsuites/libtests/mouse01/serial_mouse_config.c  |   2 +-
 .../libtests/termios04/termios_testdriver_impl.h   | 306 ++++++++++++++++++++
 .../libtests/termios04/termios_testdriver_intr.c   | 307 +--------------------
 testsuites/libtests/termios05/init.c               |   2 +-
 .../libtests/termios05/termios_testdriver_task.c   |   2 +
 testsuites/libtests/termios06/init.c               |   2 +-
 testsuites/libtests/termios07/init.c               |   2 +-
 testsuites/libtests/termios08/init.c               |   2 +-
 testsuites/libtests/termios10/init.c               | 192 +------------
 testsuites/libtests/termios10/termios10impl.h      | 191 +++++++++++++
 testsuites/libtests/termios11/init.c               |   2 +
 testsuites/libtests/uid01/init.c                   |   3 +-
 testsuites/libtests/uid01/serial_mouse_config.c    |   2 +-
 testsuites/mptests/Makefile.am                     | 108 ++++----
 testsuites/mptests/configure.ac                    |   4 -
 testsuites/mptests/mp01/init1.c                    |   2 +
 testsuites/mptests/mp01/init2.c                    |   2 +
 testsuites/mptests/mp01/{init.c => initimpl.h}     |   0
 testsuites/mptests/mp03/init1.c                    |   2 +
 testsuites/mptests/mp03/init2.c                    |   2 +
 testsuites/mptests/mp03/{init.c => initimpl.h}     |   0
 testsuites/mptests/mp04/init1.c                    |   2 +
 testsuites/mptests/mp04/init2.c                    |   2 +
 testsuites/mptests/mp04/{init.c => initimpl.h}     |   0
 testsuites/mptests/mp05/init1.c                    |   2 +
 testsuites/mptests/mp05/init2.c                    |   2 +
 testsuites/mptests/mp05/{init.c => initimpl.h}     |   0
 testsuites/mptests/mp06/init1.c                    |   2 +
 testsuites/mptests/mp06/init2.c                    |   2 +
 testsuites/mptests/mp06/{init.c => initimpl.h}     |   0
 testsuites/mptests/mp07/init1.c                    |   2 +
 testsuites/mptests/mp07/init2.c                    |   2 +
 testsuites/mptests/mp07/{init.c => initimpl.h}     |   0
 testsuites/mptests/mp08/init1.c                    |   2 +
 testsuites/mptests/mp08/init2.c                    |   2 +
 testsuites/mptests/mp08/{init.c => initimpl.h}     |   0
 testsuites/mptests/mp09/init1.c                    |   2 +
 testsuites/mptests/mp09/init2.c                    |   2 +
 testsuites/mptests/mp09/{init.c => initimpl.h}     |   0
 testsuites/mptests/mp10/init1.c                    |   2 +
 testsuites/mptests/mp10/init2.c                    |   2 +
 testsuites/mptests/mp10/{init.c => initimpl.h}     |   0
 testsuites/mptests/mp11/init1.c                    |   2 +
 testsuites/mptests/mp11/init2.c                    |   2 +
 testsuites/mptests/mp11/{init.c => initimpl.h}     |   0
 testsuites/mptests/mp12/init1.c                    |   2 +
 testsuites/mptests/mp12/init2.c                    |   2 +
 testsuites/mptests/mp12/{init.c => initimpl.h}     |   0
 testsuites/mptests/mp13/init1.c                    |   2 +
 testsuites/mptests/mp13/init2.c                    |   2 +
 testsuites/mptests/mp13/{init.c => initimpl.h}     |   0
 testsuites/mptests/mp14/init1.c                    |   2 +
 testsuites/mptests/mp14/init2.c                    |   2 +
 testsuites/mptests/mp14/{init.c => initimpl.h}     |   6 +
 testsuites/psxtests/Makefile.am                    |   8 +-
 testsuites/psxtests/psxsignal03/init.c             | 252 +----------------
 testsuites/psxtests/psxsignal03/psxsignal0ximpl.h  | 234 ++++++++++++++++
 testsuites/psxtests/psxsignal04/init.c             |   2 +
 testsuites/psxtmtests/Makefile.am                  |  12 +-
 testsuites/psxtmtests/psxtmcond08/init.c           | 184 +-----------
 .../psxtmtests/psxtmcond08/psxtmcond08impl.h       | 182 ++++++++++++
 testsuites/psxtmtests/psxtmcond09/init.c           |   2 +
 testsuites/psxtmtests/psxtmcond10/init.c           |   2 +
 testsuites/samples/Makefile.am                     |  10 +-
 testsuites/samples/base_mp/init1.c                 |   2 +
 testsuites/samples/base_mp/init2.c                 |   2 +
 testsuites/samples/base_mp/{init.c => initimpl.h}  |   0
 testsuites/samples/paranoia/paranoia.c             |   5 +-
 testsuites/smptests/Makefile.am                    |  14 +-
 testsuites/sptests/Makefile.am                     |  67 ++---
 testsuites/sptests/sp27/init.c                     | 146 +---------
 testsuites/sptests/sp27/sp27impl.h                 | 145 ++++++++++
 testsuites/sptests/sp27a/init.c                    |   2 +
 testsuites/sptests/sp52/init.c                     | 140 +---------
 testsuites/sptests/sp52/sp52impl.h                 | 139 ++++++++++
 testsuites/sptests/sp53/init.c                     |   2 +
 testsuites/sptests/sp65/init.c                     | 154 +----------
 testsuites/sptests/sp65/sp65impl.h                 | 153 ++++++++++
 testsuites/sptests/sp66/init.c                     |   2 +
 testsuites/sptests/spfatal16/spfatal16.doc         |  19 --
 testsuites/sptests/spfatal16/spfatal16.scn         |   3 -
 testsuites/sptests/spfatal16/testcase.h            |  29 --
 testsuites/sptests/spfatal_support/consume_sems.c  |  63 -----
 testsuites/sptests/spfatal_support/system.h        |  11 -
 testsuites/sptests/spintrcritical01/init.c         | 157 +----------
 .../spintrcritical01/spintrcritical01impl.h        | 155 +++++++++++
 testsuites/sptests/spintrcritical02/init.c         |   2 +
 testsuites/sptests/spintrcritical03/init.c         |   2 +
 testsuites/sptests/spintrcritical04/init.c         |   2 +
 testsuites/sptests/spintrcritical05/init.c         |   2 +
 testsuites/sptests/spintrcritical06/init.c         | 149 +---------
 .../spintrcritical06/spintrcritical06impl.h        | 147 ++++++++++
 testsuites/sptests/spintrcritical07/init.c         |   2 +
 testsuites/sptests/spintrcritical11/init.c         |  98 +------
 .../spintrcritical11/spintrcritical11impl.h        |  96 +++++++
 testsuites/sptests/spintrcritical12/init.c         |   2 +
 testsuites/sptests/spintrcritical13/init.c         | 122 +-------
 .../spintrcritical13/spintrcritical13impl.h        | 120 ++++++++
 testsuites/sptests/spintrcritical14/init.c         |   2 +
 testsuites/support/include/tmacros.h               |  10 +-
 testsuites/tmtests/Makefile.am                     |  28 +-
 testsuites/tmtests/tm02/task1.c                    | 189 +------------
 testsuites/tmtests/tm02/tm02impl.h                 | 187 +++++++++++++
 testsuites/tmtests/tm03/task1.c                    | 180 +-----------
 testsuites/tmtests/tm03/tm03impl.h                 | 178 ++++++++++++
 testsuites/tmtests/tm31/task1.c                    |   2 +
 testsuites/tmtests/tm32/task1.c                    |   2 +
 testsuites/tmtests/tm33/task1.c                    |   2 +
 testsuites/tmtests/tm34/task1.c                    |   2 +
 testsuites/tmtests/tm35/task1.c                    |   2 +
 testsuites/tmtests/tm36/task1.c                    |   2 +
 122 files changed, 2602 insertions(+), 2640 deletions(-)
 create mode 100644 testsuites/ada/samples/base_mp/node1/init.c
 create mode 100644 testsuites/ada/samples/base_mp/node2/init.c
 create mode 100644 testsuites/libtests/dl06/initimpl.h
 create mode 100644 testsuites/libtests/dl06/pre-init.c
 create mode 100644 testsuites/libtests/termios04/termios_testdriver_impl.h
 create mode 100644 testsuites/libtests/termios05/termios_testdriver_task.c
 create mode 100644 testsuites/libtests/termios10/termios10impl.h
 create mode 100644 testsuites/libtests/termios11/init.c
 create mode 100644 testsuites/mptests/mp01/init1.c
 create mode 100644 testsuites/mptests/mp01/init2.c
 rename testsuites/mptests/mp01/{init.c => initimpl.h} (100%)
 create mode 100644 testsuites/mptests/mp03/init1.c
 create mode 100644 testsuites/mptests/mp03/init2.c
 rename testsuites/mptests/mp03/{init.c => initimpl.h} (100%)
 create mode 100644 testsuites/mptests/mp04/init1.c
 create mode 100644 testsuites/mptests/mp04/init2.c
 rename testsuites/mptests/mp04/{init.c => initimpl.h} (100%)
 create mode 100644 testsuites/mptests/mp05/init1.c
 create mode 100644 testsuites/mptests/mp05/init2.c
 rename testsuites/mptests/mp05/{init.c => initimpl.h} (100%)
 create mode 100644 testsuites/mptests/mp06/init1.c
 create mode 100644 testsuites/mptests/mp06/init2.c
 rename testsuites/mptests/mp06/{init.c => initimpl.h} (100%)
 create mode 100644 testsuites/mptests/mp07/init1.c
 create mode 100644 testsuites/mptests/mp07/init2.c
 rename testsuites/mptests/mp07/{init.c => initimpl.h} (100%)
 create mode 100644 testsuites/mptests/mp08/init1.c
 create mode 100644 testsuites/mptests/mp08/init2.c
 rename testsuites/mptests/mp08/{init.c => initimpl.h} (100%)
 create mode 100644 testsuites/mptests/mp09/init1.c
 create mode 100644 testsuites/mptests/mp09/init2.c
 rename testsuites/mptests/mp09/{init.c => initimpl.h} (100%)
 create mode 100644 testsuites/mptests/mp10/init1.c
 create mode 100644 testsuites/mptests/mp10/init2.c
 rename testsuites/mptests/mp10/{init.c => initimpl.h} (100%)
 create mode 100644 testsuites/mptests/mp11/init1.c
 create mode 100644 testsuites/mptests/mp11/init2.c
 rename testsuites/mptests/mp11/{init.c => initimpl.h} (100%)
 create mode 100644 testsuites/mptests/mp12/init1.c
 create mode 100644 testsuites/mptests/mp12/init2.c
 rename testsuites/mptests/mp12/{init.c => initimpl.h} (100%)
 create mode 100644 testsuites/mptests/mp13/init1.c
 create mode 100644 testsuites/mptests/mp13/init2.c
 rename testsuites/mptests/mp13/{init.c => initimpl.h} (100%)
 create mode 100644 testsuites/mptests/mp14/init1.c
 create mode 100644 testsuites/mptests/mp14/init2.c
 rename testsuites/mptests/mp14/{init.c => initimpl.h} (97%)
 create mode 100644 testsuites/psxtests/psxsignal03/psxsignal0ximpl.h
 create mode 100644 testsuites/psxtests/psxsignal04/init.c
 create mode 100644 testsuites/psxtmtests/psxtmcond08/psxtmcond08impl.h
 create mode 100644 testsuites/psxtmtests/psxtmcond09/init.c
 create mode 100644 testsuites/psxtmtests/psxtmcond10/init.c
 create mode 100644 testsuites/samples/base_mp/init1.c
 create mode 100644 testsuites/samples/base_mp/init2.c
 rename testsuites/samples/base_mp/{init.c => initimpl.h} (100%)
 create mode 100644 testsuites/sptests/sp27/sp27impl.h
 create mode 100644 testsuites/sptests/sp27a/init.c
 create mode 100644 testsuites/sptests/sp52/sp52impl.h
 create mode 100644 testsuites/sptests/sp53/init.c
 create mode 100644 testsuites/sptests/sp65/sp65impl.h
 create mode 100644 testsuites/sptests/sp66/init.c
 delete mode 100644 testsuites/sptests/spfatal16/spfatal16.doc
 delete mode 100644 testsuites/sptests/spfatal16/spfatal16.scn
 delete mode 100644 testsuites/sptests/spfatal16/testcase.h
 delete mode 100644 testsuites/sptests/spfatal_support/consume_sems.c
 create mode 100644 testsuites/sptests/spintrcritical01/spintrcritical01impl.h
 create mode 100644 testsuites/sptests/spintrcritical02/init.c
 create mode 100644 testsuites/sptests/spintrcritical03/init.c
 create mode 100644 testsuites/sptests/spintrcritical04/init.c
 create mode 100644 testsuites/sptests/spintrcritical05/init.c
 create mode 100644 testsuites/sptests/spintrcritical06/spintrcritical06impl.h
 create mode 100644 testsuites/sptests/spintrcritical07/init.c
 create mode 100644 testsuites/sptests/spintrcritical11/spintrcritical11impl.h
 create mode 100644 testsuites/sptests/spintrcritical12/init.c
 create mode 100644 testsuites/sptests/spintrcritical13/spintrcritical13impl.h
 create mode 100644 testsuites/sptests/spintrcritical14/init.c
 create mode 100644 testsuites/tmtests/tm02/tm02impl.h
 create mode 100644 testsuites/tmtests/tm03/tm03impl.h
 create mode 100644 testsuites/tmtests/tm31/task1.c
 create mode 100644 testsuites/tmtests/tm32/task1.c
 create mode 100644 testsuites/tmtests/tm33/task1.c
 create mode 100644 testsuites/tmtests/tm34/task1.c
 create mode 100644 testsuites/tmtests/tm35/task1.c
 create mode 100644 testsuites/tmtests/tm36/task1.c

-- 
2.16.4



More information about the devel mailing list