vxWork tests for all subtests; still need to combine them all to one
This commit is contained in:
@@ -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
|
||||
|
||||
41
testApp/misc/epicsRunPVDataTests.c
Normal file
41
testApp/misc/epicsRunPVDataTests.c
Normal 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);
|
||||
}
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
@@ -132,7 +132,7 @@ void test()
|
||||
}
|
||||
|
||||
|
||||
MAIN(testOverrunBitSet`)
|
||||
MAIN(testOverrunBitSet)
|
||||
{
|
||||
testPlan(41);
|
||||
testDiag("Tests for changeBitSet and overrunBitSet");
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user