epicsShareFunc void testRestore(void) { aoRecord *rec0; waveformRecord *rec1; testDiag("test Restore"); initHookRegister(hookPass0); initHookRegister(hookPass1); testdbPrepare(); testdbReadDatabase("asTestIoc.dbd", NULL, NULL); /* since this test has device support it must appear in a * DLL for windows dynamic builds. * However, the rRDD function is in the executable, * and not accessible here. So use iocsh. * For rtems/vxworks the test harness clears * iocsh registrations, so iocsh can't work here. */ #if defined(__rtems__) || defined(vxWorks) asTestIoc_registerRecordDeviceDriver(pdbbase); #else iocshCmd("asTestIoc_registerRecordDeviceDriver(pdbbase)"); #endif testdbReadDatabase("asTest.db", NULL, NULL); rec0 = (aoRecord*)testdbRecordPtr("rec0"); rec1 = (waveformRecord*)testdbRecordPtr("rec1"); eltc(0); testIocInitOk(); eltc(1); testDiag("Post initialization"); testOk1(iran==3); testOk1(rec0->val==4); testOk1(rec1->nord==5); { double *buf = rec1->bptr; testOk(buf[0]==1, "buf[0] %f==1", buf[0]); testOk1(buf[1]==2); testOk1(buf[2]==3); testOk1(buf[3]==4); testOk1(buf[4]==5); } testIocShutdownOk(); /* recSup doesn't cleanup after itself */ free(rec1->bptr); testdbCleanup(); }
static void iocshCmdCallFunc(const iocshArgBuf *args) { iocshCmd(args[0].sval); }