From 4ef9e18ac61c6ba4d730485c84ea34474cc7094f Mon Sep 17 00:00:00 2001 From: Michael Davidsaver Date: Fri, 13 Nov 2020 20:29:57 -0800 Subject: [PATCH] enable RTEMS CI testing --- .travis.yml | 6 ++++++ testApp/Makefile | 7 +++++++ testApp/misc/testprinter.cpp | 10 +++++----- testApp/rtemsTestData.c | 2 ++ 4 files changed, 20 insertions(+), 5 deletions(-) create mode 100644 testApp/rtemsTestData.c diff --git a/.travis.yml b/.travis.yml index e77cc6e..3d77de5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -59,6 +59,12 @@ jobs: - env: BASE=7.0 EXTRA="CMD_CXXFLAGS=-std=c++11" compiler: clang +# RTEMS + + - env: BASE=7.0 RTEMS=4.10 + + - env: BASE=7.0 RTEMS=4.9 + # Trusty: compiler versions very close to RHEL 7 - env: BASE=7.0 diff --git a/testApp/Makefile b/testApp/Makefile index 4956085..1b9ab86 100644 --- a/testApp/Makefile +++ b/testApp/Makefile @@ -12,6 +12,8 @@ include $(PVDATA_TEST)/pv/Makefile include $(PVDATA_TEST)/property/Makefile include $(PVDATA_TEST)/copy/Makefile +PROD_SRCS_RTEMS += rtemsTestData.c + # pvDataAllTests runs all the test programs in a known working order. testHarness_SRCS += pvDataAllTests.c @@ -30,6 +32,11 @@ TESTSPEC_RTEMS = pvdTestHarness.$(MUNCH_SUFFIX); pvDataAllTests # Build test scripts for hosts TESTSCRIPTS_HOST += $(TESTS:%=%.t) +ifneq ($(filter $(T_A),$(CROSS_COMPILER_RUNTEST_ARCHS)),) +TESTPROD = $(TESTPROD_HOST) +TESTSCRIPTS += $(TESTS:%=%.t) +endif + include $(TOP)/configure/RULES diff --git a/testApp/misc/testprinter.cpp b/testApp/misc/testprinter.cpp index dcd8263..417dd5e 100644 --- a/testApp/misc/testprinter.cpp +++ b/testApp/misc/testprinter.cpp @@ -134,12 +134,12 @@ void showNTScalarNumeric() { testDiag("%s", CURRENT_FUNCTION); pvd::PVStructurePtr input(pvd::getPVDataCreate()->createPVStructure(scalarNumeric)); - input->getSubFieldT("value")->putFrom(-42); + input->getSubFieldT("value")->putFrom(pvd::int32(-42)); testDiff(" -42 \n", print(input->stream())); - input->getSubFieldT("alarm.severity")->putFrom(1); - input->getSubFieldT("alarm.status")->putFrom(1); + input->getSubFieldT("alarm.severity")->putFrom(pvd::int32(1)); + input->getSubFieldT("alarm.status")->putFrom(pvd::int32(1)); input->getSubFieldT("alarm.message")->put("FOO"); testDiff(" -42 MINOR DEVICE FOO \n", print(input->stream())); @@ -162,8 +162,8 @@ void showNTScalarString() testDiff(" bar \n", print(input->stream())); - input->getSubFieldT("alarm.severity")->putFrom(1); - input->getSubFieldT("alarm.status")->putFrom(1); + input->getSubFieldT("alarm.severity")->putFrom(pvd::int32(1)); + input->getSubFieldT("alarm.status")->putFrom(pvd::int32(1)); input->getSubFieldT("alarm.message")->put("FOO"); testDiff(" bar MINOR DEVICE FOO \n", print(input->stream())); diff --git a/testApp/rtemsTestData.c b/testApp/rtemsTestData.c new file mode 100644 index 0000000..76a0053 --- /dev/null +++ b/testApp/rtemsTestData.c @@ -0,0 +1,2 @@ +/* no test data */ +const void* epicsRtemsFSImage = 0;