add initHookAtPrepare
This commit is contained in:
@@ -50,6 +50,7 @@ void testdbPrepare(void)
|
||||
{
|
||||
if(!testEvtLock)
|
||||
testEvtLock = epicsMutexMustCreate();
|
||||
initHookAnnounce(initHookAfterPrepareDatabase);
|
||||
}
|
||||
|
||||
void testdbReadDatabase(const char* file,
|
||||
@@ -94,6 +95,7 @@ void testIocShutdownOk(void)
|
||||
|
||||
void testdbCleanup(void)
|
||||
{
|
||||
initHookAnnounce(initHookBeforeCleanupDatabase);
|
||||
dbFreeBase(pdbbase);
|
||||
db_cleanup_events();
|
||||
initHookFree();
|
||||
|
||||
@@ -139,6 +139,9 @@ const char *initHookName(int state)
|
||||
"initHookBeforeFree",
|
||||
"initHookAfterShutdown",
|
||||
|
||||
"initHookAfterPrepareDatabase",
|
||||
"initHookBeforeCleanupDatabase",
|
||||
|
||||
"initHookAfterInterruptAccept",
|
||||
"initHookAtEnd"
|
||||
};
|
||||
|
||||
@@ -71,6 +71,7 @@ extern "C" {
|
||||
* if the IOC is later paused and restarted.
|
||||
*/
|
||||
typedef enum {
|
||||
|
||||
// iocInit() begins
|
||||
initHookAtIocBuild = 0, /**< Start of iocBuild() / iocInit() */
|
||||
initHookAtBeginning, /**< Database sanity checks passed */
|
||||
@@ -133,6 +134,17 @@ typedef enum {
|
||||
initHookAfterShutdown,
|
||||
// iocShutdown() ends
|
||||
|
||||
/** \brief Called during testdbPrepare()
|
||||
* Use this hook to repeat actions each time an empty test database is initialized.
|
||||
* \since UNRELEASED Added, triggered only by unittest code.
|
||||
*/
|
||||
initHookAfterPrepareDatabase,
|
||||
/** \brief Called during testdbCleanup()
|
||||
* Use this hook to perform cleanup each time before a test database is free()'d.
|
||||
* \since UNRELEASED Added, triggered only by unittest code.
|
||||
*/
|
||||
initHookBeforeCleanupDatabase,
|
||||
|
||||
/* Deprecated states: */
|
||||
/** Only announced once. Deprecated in favor of initHookAfterDatabaseRunning */
|
||||
initHookAfterInterruptAccept,
|
||||
|
||||
Reference in New Issue
Block a user