ugly hack to make unit test run
This commit is contained in:
@@ -20,8 +20,11 @@ TESTS += callbackTest
|
||||
# When we add more test programs here, this must become a vxTestHarness
|
||||
TESTSPEC_vxWorks = callbackTest.munch; callbackTest
|
||||
|
||||
DBDINC += xRecord
|
||||
|
||||
TESTPROD_HOST += dbChannelTest
|
||||
dbChannelTest_SRCS += dbChannelTest.c
|
||||
dbChannelTest_SRCS += xRecord_registerRecordDeviceDriver.cpp
|
||||
dbChannelTest_LIBS += dbCore
|
||||
OBJS_IOC_vxWorks += dbChannelTest
|
||||
TESTS += dbChannelTest
|
||||
|
||||
@@ -16,9 +16,13 @@
|
||||
#include "dbChannel.h"
|
||||
#include "dbStaticLib.h"
|
||||
#include "dbAccessDefs.h"
|
||||
#include "recSup.h"
|
||||
#include "epicsUnitTest.h"
|
||||
#include "testMain.h"
|
||||
|
||||
#define GEN_SIZE_OFFSET
|
||||
#include "xRecord.h"
|
||||
|
||||
/* Expected call bit definitions */
|
||||
#define e_start 0x00000001
|
||||
#define e_abort 0x00000002
|
||||
@@ -152,7 +156,9 @@ MAIN(dbChannelTest)
|
||||
|
||||
testPlan(68);
|
||||
|
||||
testOk1(!dbReadDatabase(&pdbbase, "dbChannelTest.dbx", ".:..", NULL));
|
||||
testOk1(!dbReadDatabase(&pdbbase, "xRecord.dbd", ".:..", NULL));
|
||||
xRecord_registerRecordDeviceDriver(pdbbase);
|
||||
testOk1(!dbReadDatabase(&pdbbase, "dbChannelTest.db", ".:..", NULL));
|
||||
testOk(!!pdbbase, "pdbbase was set");
|
||||
|
||||
r = e = 0;
|
||||
@@ -243,3 +249,9 @@ MAIN(dbChannelTest)
|
||||
|
||||
return testDone();
|
||||
}
|
||||
|
||||
#include <epicsExport.h>
|
||||
|
||||
static
|
||||
rset xRSET;
|
||||
epicsExportAddress(rset,xRSET);
|
||||
|
||||
2
src/ioc/db/test/dbChannelTest.db
Normal file
2
src/ioc/db/test/dbChannelTest.db
Normal file
@@ -0,0 +1,2 @@
|
||||
record(x, x) {}
|
||||
|
||||
@@ -10,4 +10,3 @@ recordtype(x) {
|
||||
prompt("Value")
|
||||
}
|
||||
}
|
||||
record(x, x) {}
|
||||
Reference in New Issue
Block a user