From 34800b071fdfd9091fa102538f7c8adeee365365 Mon Sep 17 00:00:00 2001 From: Michael Davidsaver Date: Thu, 24 May 2012 14:11:10 -0400 Subject: [PATCH] fix arrTest Don't use compiled in paths include menuConvert as this is now required at runtime --- src/Makefile | 4 ++-- src/ioc/db/filters/test/Makefile | 4 ---- src/ioc/db/filters/test/arrRecord.dbd | 1 + src/ioc/db/filters/test/arrTest.cpp | 13 ++----------- 4 files changed, 5 insertions(+), 17 deletions(-) diff --git a/src/Makefile b/src/Makefile index 8e82138f0..db71a79e9 100644 --- a/src/Makefile +++ b/src/Makefile @@ -69,8 +69,8 @@ ioc/db/test_DEPEND_DIRS = ioc libCom/RTEMS DIRS += std std_DEPEND_DIRS = ioc libCom/RTEMS -#DIRS += ioc/db/filters/test -#ioc/db/filters/test_DEPEND_DIRS = ioc std libCom/RTEMS +DIRS += ioc/db/filters/test +ioc/db/filters/test_DEPEND_DIRS = ioc std libCom/RTEMS diff --git a/src/ioc/db/filters/test/Makefile b/src/ioc/db/filters/test/Makefile index ef8628dc5..f2cada142 100644 --- a/src/ioc/db/filters/test/Makefile +++ b/src/ioc/db/filters/test/Makefile @@ -14,13 +14,11 @@ PROD_LIBS += dbCore ca Com TESTPROD_HOST += tsTest tsTest_SRCS += tsTest.c -tsTest_LIBS += dbStaticHost OBJS_IOC_vxWorks += tsTest TESTS += tsTest TESTPROD_HOST += dbndTest dbndTest_SRCS += dbndTest.c -dbndTest_LIBS += dbStaticHost OBJS_IOC_vxWorks += dbndTest TESTS += dbndTest @@ -29,13 +27,11 @@ TARGETS += $(COMMON_DIR)/arrTest.dbd arrTest_DBD += arrRecord.dbd TESTPROD_HOST += arrTest arrTest_SRCS += arrTest.cpp arrRecord.c arrRecord_registerRecordDeviceDriver.cpp -arrTest_LIBS += dbStaticIoc OBJS_IOC_vxWorks += arrTest TESTS += arrTest TESTPROD_HOST += syncTest syncTest_SRCS += syncTest.c -syncTest_LIBS += dbStaticHost OBJS_IOC_vxWorks += syncTest TESTS += syncTest diff --git a/src/ioc/db/filters/test/arrRecord.dbd b/src/ioc/db/filters/test/arrRecord.dbd index 25a45351d..782a03e9d 100644 --- a/src/ioc/db/filters/test/arrRecord.dbd +++ b/src/ioc/db/filters/test/arrRecord.dbd @@ -1,4 +1,5 @@ include "menuGlobal.dbd" +include "menuConvert.dbd" recordtype(arr) { include "dbCommon.dbd" field(VAL, DBF_NOACCESS) { diff --git a/src/ioc/db/filters/test/arrTest.cpp b/src/ioc/db/filters/test/arrTest.cpp index 76918ac30..7a504c5fb 100644 --- a/src/ioc/db/filters/test/arrTest.cpp +++ b/src/ioc/db/filters/test/arrTest.cpp @@ -35,7 +35,6 @@ #include "iocInit.h" #include "iocsh.h" #include "dbChannel.h" -#include "epicsInstallDir.h" #include "epicsUnitTest.h" #include "testMain.h" @@ -44,16 +43,10 @@ extern "C" int arrRecord_registerRecordDeviceDriver(struct dbBase *pdbbase); extern "C" void (*pvar_func_arrInitialize)(void); -#define DBD_FILE EPICS_BASE "/src/db/filters/test/O.Common/arrTest.dbd" -#define DB_FILE EPICS_BASE "/src/db/filters/test/arrTest.db" -#define EXIT_FILE EPICS_BASE "/db/softIocExit.db" #define CA_SERVER_PORT "65535" #define PATTERN 0x55 -const char *base_dbd = DBD_FILE; -const char *arr_db = DB_FILE; -const char *exit_db = EXIT_FILE; const char *server_port = CA_SERVER_PORT; static void exitSubroutine(subRecord *precord) { @@ -302,8 +295,6 @@ static void check(short dbr_type) { MAIN(arrTest) { - char *dbd_file = const_cast(base_dbd); - char *db_file = const_cast(arr_db); const chFilterPlugin *plug; char arr[] = "arr"; int status; @@ -314,14 +305,14 @@ MAIN(arrTest) epicsEnvSet("EPICS_CA_SERVER_PORT", server_port); - testOk1(!(status = dbLoadDatabase(dbd_file, NULL, NULL))); + testOk1(!(status=dbReadDatabase(&pdbbase, "arrRecord.dbd", ".:..:../../../../../../dbd", NULL))); if (status) epicsExit(EXIT_FAILURE); (*pvar_func_arrInitialize)(); arrRecord_registerRecordDeviceDriver(pdbbase); registryFunctionAdd("exit", (REGISTRYFUNCTION) exitSubroutine); - testOk1(!(status = dbLoadRecords(db_file, NULL))); + testOk1(!(status=dbReadDatabase(&pdbbase, "arrTest.db", ".:..", NULL))); if (status) epicsExit(EXIT_FAILURE); /* Start the IOC */