vxWork tests for all subtests; still need to combine them all to one

This commit is contained in:
Matej Sekoranja
2014-10-31 07:57:20 -04:00
parent 2a8a1d3736
commit 80a537bc4c
12 changed files with 164 additions and 24 deletions

View File

@@ -4,5 +4,13 @@ DIRS += misc
DIRS += pv
DIRS += property
DIRS += copy
# TODO combined test vxTestHarness
#PROD_vxWorks = vxTestHarness
#vxTestHarness_SRCS += pvDataAllTests
#vxTestHarness_OBJS += misc/
#TESTSPEC_vxWorks = vxTestHarness.$(MUNCH_SUFFIX); pvDataAllTests
include $(TOP)/configure/RULES_DIRS

View File

@@ -2,20 +2,32 @@ TOP=../..
include $(TOP)/configure/CONFIG
PROD_LIBS += pvData Com
TESTPROD_HOST += testCreateRequest
testCreateRequest_SRCS = testCreateRequest.cpp
testCreateRequest_LIBS = pvData Com
testHarness_SRCS += testCreateRequest.cpp
TESTS += testCreateRequest
TESTPROD_HOST += testPVCopy
testPVCopy_SRCS += testPVCopy.cpp
testPVCopy_LIBS += pvData Com
testHarness_SRCS += testPVCopy.cpp
TESTS += testPVCopy
# The testHarness runs all the test programs in a known working order.
testHarness_SRCS += epicsRunPVDataTests.c
PROD_vxWorks = vxTestHarness
vxTestHarness_SRCS += $(testHarness_SRCS)
TESTSPEC_vxWorks = vxTestHarness.$(MUNCH_SUFFIX); epicsRunPVDataTests.c
#PROD_RTEMS += rtemsTestHarness
#rtemsTestHarness_SRCS += rtemsTestHarness.c
#rtemsTestHarness_SRCS += $(testHarness_SRCS)
#TESTSPEC_RTEMS = rtemsTestHarness.boot; epicsRunPVDataTests.c
TESTSCRIPTS_HOST += $(TESTS:%=%.t)
include $(TOP)/configure/RULES
#----------------------------------------
# ADD RULES AFTER THIS LINE

View File

@@ -0,0 +1,22 @@
/*
* Run pvData tests as a batch.
*
* Do *not* include performance measurements here, they don't help to
* prove functionality (which is the point of this convenience routine).
*/
#include <stdio.h>
#include <epicsThread.h>
#include <epicsUnitTest.h>
int testCreateRequest(void);
int testPVCopy(void);
void epicsRunPVDataTests(void)
{
testHarness();
runTest(testCreateRequest);
runTest(testPVCopy);
}

View File

@@ -20,7 +20,7 @@ using std::endl;
static bool debug = false;
static void testCreateRequest() {
static void testCreateRequestInternal() {
printf("testCreateRequest... \n");
CreateRequest::shared_pointer createRequest = CreateRequest::create();
PVStringPtr pvString;
@@ -307,7 +307,7 @@ static void testCreateRequest() {
MAIN(testCreateRequest)
{
testPlan(117);
testCreateRequest();
testCreateRequestInternal();
return testDone();
}

View File

@@ -6,18 +6,22 @@ PROD_LIBS += pvData Com
TESTPROD_HOST += testThread
testThread_SRCS += testThread.cpp
testHarness_SRCS += testThread.cpp
TESTS += testThread
TESTPROD_HOST += testTimer
testTimer_SRCS += testTimer.cpp
testHarness_SRCS += testTimer.cpp
TESTS += testTimer
TESTPROD_HOST += testBitSet
testBitSet_SRCS += testBitSet.cpp
testHarness_SRCS += testBitSet.cpp
TESTS += testBitSet
TESTPROD_HOST += testOverrunBitSet
testOverrunBitSet_SRCS += testOverrunBitSet.cpp
testHarness_SRCS += testOverrunBitSet.cpp
TESTS += testOverrunBitSet
TESTPROD_HOST += testByteOrder
@@ -25,36 +29,56 @@ testByteOrder_SRCS += testByteOrder.cpp
TESTPROD_HOST += testByteBuffer
testByteBuffer_SRCS += testByteBuffer.cpp
testHarness_SRCS += testByteBuffer.cpp
TESTS += testByteBuffer
TESTPROD_HOST += testBaseException
testBaseException_SRCS += testBaseException.cpp
testHarness_SRCS += testBaseException.cpp
TESTS += testBaseException
TESTPROD_HOST += testSharedVector
testSharedVector_SRCS += testSharedVector.cpp
testHarness_SRCS += testSharedVector.cpp
TESTS += testSharedVector
TESTPROD_HOST += testSerialization
testSerialization_SRCS += testSerialization.cpp
testHarness_SRCS += testSerialization.cpp
TESTS += testSerialization
TESTPROD_HOST += testTimeStamp
testTimeStamp_SRCS += testTimeStamp.cpp
testHarness_SRCS += testTimeStamp.cpp
TESTS += testTimeStamp
TESTPROD_HOST += testQueue
testQueue_SRCS += testQueue.cpp
testHarness_SRCS += testQueue.cpp
TESTS += testQueue
TESTPROD_HOST += testMessageQueue
testMessageQueue_SRCS += testMessageQueue.cpp
testHarness_SRCS += testMessageQueue.cpp
TESTS += testMessageQueue
TESTPROD_HOST += testTypeCast
testTypeCast_SRCS += testTypeCast.cpp
testHarness_SRCS += testTypeCast.cpp
TESTS += testTypeCast
# The testHarness runs all the test programs in a known working order.
testHarness_SRCS += epicsRunPVDataTests.c
PROD_vxWorks = vxTestHarness
vxTestHarness_SRCS += $(testHarness_SRCS)
TESTSPEC_vxWorks = vxTestHarness.$(MUNCH_SUFFIX); epicsRunPVDataTests
#PROD_RTEMS += rtemsTestHarness
#rtemsTestHarness_SRCS += rtemsTestHarness.c
#rtemsTestHarness_SRCS += $(testHarness_SRCS)
#TESTSPEC_RTEMS = rtemsTestHarness.boot; epicsRunPVDataTests
TESTSCRIPTS_HOST += $(TESTS:%=%.t)
include $(TOP)/configure/RULES

View File

@@ -0,0 +1,41 @@
/*
* Run pvData tests as a batch.
*
* Do *not* include performance measurements here, they don't help to
* prove functionality (which is the point of this convenience routine).
*/
#include <stdio.h>
#include <epicsThread.h>
#include <epicsUnitTest.h>
int testBaseException(void);
int testBitSet(void);
int testByteBuffer(void);
int testMessageQueue(void);
int testOverrunBitSet(void);
int testQueue(void);
int testSerialization(void);
int testSharedVector(void);
int testThread(void);
int testTimeStamp(void);
int testTimer(void);
int testTypeCast(void);
void epicsRunPVDataTests(void)
{
testHarness();
runTest(testBaseException);
runTest(testBitSet);
runTest(testByteBuffer);
runTest(testMessageQueue);
runTest(testOverrunBitSet);
runTest(testQueue);
runTest(testSerialization);
runTest(testSharedVector);
runTest(testThread);
runTest(testTimeStamp);
runTest(testTimer);
runTest(testTypeCast);
}

View File

@@ -42,7 +42,7 @@ void internalTestBaseException(int /*unused*/ = 0)
}
}
void testBaseException() {
void testBaseExceptionTest() {
printf("testBaseException... ");
try {
@@ -86,7 +86,7 @@ MAIN(testBaseException)
testPlan(2);
testDiag("Tests base exception");
testLogicException();
testBaseException();
testBaseExceptionTest();
return testDone();
}

View File

@@ -132,7 +132,7 @@ void test()
}
MAIN(testOverrunBitSet`)
MAIN(testOverrunBitSet)
{
testPlan(41);
testDiag("Tests for changeBitSet and overrunBitSet");

View File

@@ -28,7 +28,7 @@ using namespace epics::pvData;
static bool debug = false;
void testTimeStamp()
void testTimeStampInternal()
{
testOk1(nanoSecPerSec==1000000000);
TimeStamp current;
@@ -131,6 +131,6 @@ MAIN(testTimeStamp)
{
testPlan(37);
testDiag("Tests timeStamp");
testTimeStamp();
testTimeStampInternal();
return testDone();
}

View File

@@ -2,11 +2,24 @@ TOP=../..
include $(TOP)/configure/CONFIG
PROD_LIBS = pvData Com
TESTPROD_HOST += testProperty
testProperty_SRCS += testProperty.cpp
testHarness_SRCS += testProperty.cpp
TESTS += testProperty
testProperty_LIBS += pvData Com
# The testHarness runs all the test programs in a known working order.
testHarness_SRCS += epicsRunPVDataTests.c
PROD_vxWorks = vxTestHarness
vxTestHarness_SRCS += $(testHarness_SRCS)
TESTSPEC_vxWorks = vxTestHarness.$(MUNCH_SUFFIX); epicsRunPVDataTests
#PROD_RTEMS += rtemsTestHarness
#rtemsTestHarness_SRCS += rtemsTestHarness.c
#rtemsTestHarness_SRCS += $(testHarness_SRCS)
#TESTSPEC_RTEMS = rtemsTestHarness.boot; epicsRunPVDataTests
TESTSCRIPTS_HOST += $(TESTS:%=%.t)

View File

@@ -0,0 +1,20 @@
/*
* Run pvData tests as a batch.
*
* Do *not* include performance measurements here, they don't help to
* prove functionality (which is the point of this convenience routine).
*/
#include <stdio.h>
#include <epicsThread.h>
#include <epicsUnitTest.h>
int testCreateRequest(void);
void epicsRunPVDataTests(void)
{
testHarness();
runTest(testCreateRequest);
}

View File

@@ -9,18 +9,18 @@
#include <epicsThread.h>
#include <epicsUnitTest.h>
int testBitSetUtil(int);
int testConvert(int);
int testFieldBuilder(int);
int testIntrospect(int);
int testOperators(int);
int testPVData(int);
int testPVScalarArray(int);
int testPVStructureArray(int);
int testPVType(int);
int testPVUnion(int);
int testStandardField(int);
int testStandardPVField(int);
int testBitSetUtil(void);
int testConvert(void);
int testFieldBuilder(void);
int testIntrospect(void);
int testOperators(void);
int testPVData(void);
int testPVScalarArray(void);
int testPVStructureArray(void);
int testPVType(void);
int testPVUnion(void);
int testStandardField(void);
int testStandardPVField(void);
void epicsRunPVDataTests(void)
{