summaryrefslogtreecommitdiffstats
path: root/testsuites/psxtests
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2019-11-11 20:08:46 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2019-11-12 09:47:20 +0100
commit1a48cbfa16bf54a442f9394e4c4d9c2211e82865 (patch)
tree929eba7ba5e91ae9ae31f77547353dbb04ea5da4 /testsuites/psxtests
parenttests: Simplify fatal error test support (diff)
downloadrtems-1a48cbfa16bf54a442f9394e4c4d9c2211e82865.tar.bz2
sptests: Avoid include path magic
Update #3818.
Diffstat (limited to 'testsuites/psxtests')
-rwxr-xr-xtestsuites/psxtests/Makefile.am10
-rw-r--r--testsuites/psxtests/psxfatal01/init.c (renamed from testsuites/psxtests/psxfatal01/testcase.h)10
-rw-r--r--testsuites/psxtests/psxfatal02/init.c (renamed from testsuites/psxtests/psxfatal02/testcase.h)10
-rw-r--r--testsuites/psxtests/psxfatal_support/psxfatal.h14
-rw-r--r--testsuites/psxtests/psxfatal_support/psxfatalimpl.h (renamed from testsuites/psxtests/psxfatal_support/init.c)14
5 files changed, 36 insertions, 22 deletions
diff --git a/testsuites/psxtests/Makefile.am b/testsuites/psxtests/Makefile.am
index 0d213a4437..1f9e4233ec 100755
--- a/testsuites/psxtests/Makefile.am
+++ b/testsuites/psxtests/Makefile.am
@@ -391,19 +391,17 @@ endif
if TEST_psxfatal01
psx_tests += psxfatal01
psx_screens += psxfatal01/psxfatal01.scn
-psxfatal01_SOURCES = psxfatal_support/init.c \
- psxfatal01/testcase.h
+psxfatal01_SOURCES = psxfatal01/init.c
psxfatal01_CPPFLAGS = $(AM_CPPFLAGS) $(TEST_FLAGS_psxfatal01) \
- $(support_includes) -I$(top_srcdir)/psxfatal01
+ $(support_includes)
endif
if TEST_psxfatal02
psx_tests += psxfatal02
psx_screens += psxfatal02/psxfatal02.scn
-psxfatal02_SOURCES = psxfatal_support/init.c \
- psxfatal02/testcase.h
+psxfatal02_SOURCES = psxfatal02/init.c
psxfatal02_CPPFLAGS = $(AM_CPPFLAGS) $(TEST_FLAGS_psxfatal02) \
- $(support_includes) -I$(top_srcdir)/psxfatal02
+ $(support_includes)
endif
if TEST_psxfchx01
diff --git a/testsuites/psxtests/psxfatal01/testcase.h b/testsuites/psxtests/psxfatal01/init.c
index e67f879ff6..fb0e2b24ed 100644
--- a/testsuites/psxtests/psxfatal01/testcase.h
+++ b/testsuites/psxtests/psxfatal01/init.c
@@ -1,3 +1,9 @@
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "../psxfatal_support/psxfatal.h"
+
/*
* Classic API Init task create failure
*/
@@ -31,7 +37,9 @@ posix_initialization_threads_table POSIX_Initialization_threads[] = {
#define FATAL_ERROR_EXPECTED_ERROR \
INTERNAL_ERROR_POSIX_INIT_THREAD_CREATE_FAILED
-void force_error(void)
+static void force_error(void)
{
/* we will not run this far */
}
+
+#include "../psxfatal_support/psxfatalimpl.h"
diff --git a/testsuites/psxtests/psxfatal02/testcase.h b/testsuites/psxtests/psxfatal02/init.c
index 7f97a6769e..260c0aea0d 100644
--- a/testsuites/psxtests/psxfatal02/testcase.h
+++ b/testsuites/psxtests/psxfatal02/init.c
@@ -1,3 +1,9 @@
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "../psxfatal_support/psxfatal.h"
+
/*
* Classic API Init task create failure
*/
@@ -35,7 +41,9 @@ posix_initialization_threads_table POSIX_Initialization_threads[] = {
#define FATAL_ERROR_EXPECTED_SOURCE INTERNAL_ERROR_CORE
#define FATAL_ERROR_EXPECTED_ERROR INTERNAL_ERROR_POSIX_INIT_THREAD_CREATE_FAILED
-void force_error(void)
+static void force_error(void)
{
/* we will not run this far */
}
+
+#include "../psxfatal_support/psxfatalimpl.h"
diff --git a/testsuites/psxtests/psxfatal_support/psxfatal.h b/testsuites/psxtests/psxfatal_support/psxfatal.h
new file mode 100644
index 0000000000..253828bdbd
--- /dev/null
+++ b/testsuites/psxtests/psxfatal_support/psxfatal.h
@@ -0,0 +1,14 @@
+/*
+ * COPYRIGHT (c) 1989-2010.
+ * On-Line Applications Research Corporation (OAR).
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.org/license/LICENSE.
+ */
+
+#include <rtems/bspIo.h>
+
+#include <tmacros.h>
+
+void *POSIX_Init(void *argument);
diff --git a/testsuites/psxtests/psxfatal_support/init.c b/testsuites/psxtests/psxfatal_support/psxfatalimpl.h
index 2c305396d5..928b07f335 100644
--- a/testsuites/psxtests/psxfatal_support/init.c
+++ b/testsuites/psxtests/psxfatal_support/psxfatalimpl.h
@@ -7,20 +7,6 @@
* http://www.rtems.org/license/LICENSE.
*/
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <rtems/bspIo.h>
-
-#include <tmacros.h>
-
-void *POSIX_Init(void *argument);
-
-void force_error(void);
-
-#include "testcase.h"
-
const char rtems_test_name[] = "PSXFATAL " FATAL_ERROR_TEST_NAME;
static void print_test_begin_message(void)