db/test: Create a test harness for vxWorks & RTEMS
This commit is contained in:
@@ -10,15 +10,22 @@ TOP=../../../..
|
||||
|
||||
include $(TOP)/configure/CONFIG
|
||||
|
||||
PROD_vxWorks += dbTestHarness
|
||||
PROD_RTEMS += dbTestHarness
|
||||
|
||||
PROD_LIBS = dbCore ca Com
|
||||
|
||||
TESTPROD_HOST += callbackTest
|
||||
callbackTest_SRCS += callbackTest.c
|
||||
PROD_vxWorks += callbackTest
|
||||
dbTestHarness_SRCS += callbackTest.c
|
||||
TESTS += callbackTest
|
||||
|
||||
# When we add more test programs here, this must become a vxTestHarness
|
||||
TESTSPEC_vxWorks = callbackTest.munch; callbackTest
|
||||
|
||||
dbTestHarness_SRCS += epicsRunDbTests.c
|
||||
dbTestHarness_SRCS_RTEMS = rtemsTestHarness.c
|
||||
|
||||
TESTSPEC_vxWorks = dbTestHarness.munch; epicsRunDbTests
|
||||
TESTSPEC_RTEMS = dbTestHarness.boot; epicsRunDbTests
|
||||
|
||||
TESTSCRIPTS_HOST += $(TESTS:%=%.t)
|
||||
|
||||
|
||||
27
src/ioc/db/test/epicsRunDbTests.c
Normal file
27
src/ioc/db/test/epicsRunDbTests.c
Normal file
@@ -0,0 +1,27 @@
|
||||
/*************************************************************************\
|
||||
* Copyright (c) 2011 UChicago Argonne LLC, as Operator of Argonne
|
||||
* National Laboratory.
|
||||
* EPICS BASE is distributed subject to a Software License Agreement found
|
||||
* in file LICENSE that is included with this distribution.
|
||||
\*************************************************************************/
|
||||
|
||||
/*
|
||||
* Run Db tests as a batch.
|
||||
*
|
||||
* Do not include performance measurements here, they don't prove
|
||||
* functionality (which is the purpose of this convenience routine).
|
||||
*/
|
||||
|
||||
#include "epicsUnitTest.h"
|
||||
#include "epicsExit.h"
|
||||
|
||||
int callbackTest(void);
|
||||
|
||||
void epicsRunDbTests(void)
|
||||
{
|
||||
testHarness();
|
||||
|
||||
runTest(callbackTest);
|
||||
|
||||
epicsExit(0); /* Trigger test harness */
|
||||
}
|
||||
14
src/ioc/db/test/rtemsTestHarness.c
Normal file
14
src/ioc/db/test/rtemsTestHarness.c
Normal file
@@ -0,0 +1,14 @@
|
||||
/*************************************************************************\
|
||||
* Copyright (c) 2011 UChicago Argonne LLC, as Operator of Argonne
|
||||
* National Laboratory.
|
||||
* EPICS BASE is distributed subject to a Software License Agreement found
|
||||
* in file LICENSE that is included with this distribution.
|
||||
\*************************************************************************/
|
||||
|
||||
extern void epicsRunDbTests(void);
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
epicsRunDbTests(); /* calls epicsExit(0) */
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user