dbUnitTest: testIocInitOk/testIocShutdownOk testAbort() on failure
This commit is contained in:
@@ -42,14 +42,16 @@ void testdbReadDatabase(const char* file,
|
||||
file, path, substitutions);
|
||||
}
|
||||
|
||||
int testIocInitOk(void)
|
||||
void testIocInitOk(void)
|
||||
{
|
||||
return iocBuildIsolated() || iocRun();
|
||||
if(iocBuildIsolated() || iocRun())
|
||||
testAbort("Failed to start up test database");
|
||||
}
|
||||
|
||||
int testIocShutdownOk(void)
|
||||
void testIocShutdownOk(void)
|
||||
{
|
||||
return iocShutdown();
|
||||
if(iocShutdown())
|
||||
testAbort("Failed to shutdown test database");
|
||||
}
|
||||
|
||||
void testdbCleanup(void)
|
||||
|
||||
@@ -29,8 +29,8 @@ epicsShareFunc void testdbPrepare(void);
|
||||
epicsShareFunc void testdbReadDatabase(const char* file,
|
||||
const char* path,
|
||||
const char* substitutions);
|
||||
epicsShareFunc int testIocInitOk(void);
|
||||
epicsShareFunc int testIocShutdownOk(void);
|
||||
epicsShareFunc void testIocInitOk(void);
|
||||
epicsShareFunc void testIocShutdownOk(void);
|
||||
epicsShareFunc void testdbCleanup(void);
|
||||
|
||||
/* Scalar only version.
|
||||
|
||||
@@ -72,19 +72,19 @@ void cycle(void) {
|
||||
|
||||
testdbReadDatabase("xRecord.db", NULL, NULL);
|
||||
|
||||
testOk1(!testIocInitOk());
|
||||
testIocInitOk();
|
||||
|
||||
epicsThreadMap(findCommonThread);
|
||||
checkCommonThreads();
|
||||
|
||||
testOk1(testIocShutdownOk()==0);
|
||||
testIocShutdownOk();
|
||||
|
||||
testdbCleanup();
|
||||
}
|
||||
|
||||
MAIN(dbShutdownTest)
|
||||
{
|
||||
testPlan(14);
|
||||
testPlan(10);
|
||||
|
||||
cycle();
|
||||
cycle();
|
||||
|
||||
Reference in New Issue
Block a user