Base 3.14
This commit is contained in:
@ -26,8 +26,8 @@ matrix:
|
||||
- python: "3.6"
|
||||
env: BRBASE=7.0 PROF=deb9 TEST=YES
|
||||
- python: "2.7"
|
||||
env: BRBASE=3.16 PROF=deb8
|
||||
env: BRBASE=3.16 PROF=deb8 TEST=YES
|
||||
- python: "2.7"
|
||||
env: BRBASE=3.15 PROF=deb8
|
||||
env: BRBASE=3.15 PROF=deb8 TEST=YES
|
||||
- python: "2.7"
|
||||
env: BRBASE=3.14 PROF=deb8
|
||||
|
@ -15,6 +15,8 @@
|
||||
|
||||
#endif
|
||||
|
||||
struct dbCommon;
|
||||
|
||||
initHookState pyInitLastState;
|
||||
|
||||
PyObject* pyDBD_setup(PyObject *unused);
|
||||
@ -26,8 +28,8 @@ int pyField_prepare(PyObject *module);
|
||||
|
||||
int pyRecord_prepare(PyObject *module);
|
||||
|
||||
int isPyRecord(dbCommon *);
|
||||
int canIOScanRecord(dbCommon *);
|
||||
int isPyRecord(struct dbCommon *);
|
||||
int canIOScanRecord(struct dbCommon *);
|
||||
|
||||
extern epicsThreadPrivateId pyDevReasonID;
|
||||
|
||||
|
@ -5,14 +5,21 @@
|
||||
|
||||
#include <Python.h>
|
||||
|
||||
#include <dbUnitTest.h>
|
||||
#include <epicsVersion.h>
|
||||
#include <dbEvent.h>
|
||||
#include <iocInit.h>
|
||||
#include <errlog.h>
|
||||
|
||||
#if EPICS_VERSION>3 || (EPICS_VERSION==3 && EPICS_REVISION>=15)
|
||||
# include <dbUnitTest.h>
|
||||
# define HAVE_DBTEST
|
||||
#endif
|
||||
|
||||
#include "pydevsup.h"
|
||||
|
||||
#ifdef HAVE_DBTEST
|
||||
static dbEventCtx testEvtCtx;
|
||||
#endif
|
||||
|
||||
typedef struct {
|
||||
PyObject_HEAD
|
||||
@ -39,6 +46,7 @@ static PyObject* utest_prepare(PyObject *unused)
|
||||
|
||||
static PyObject* utest_init(PyObject *unused)
|
||||
{
|
||||
#ifdef HAVE_DBTEST
|
||||
int ret;
|
||||
if(testEvtCtx)
|
||||
return PyErr_Format(PyExc_RuntimeError, "Missing testIocShutdownOk()");
|
||||
@ -71,10 +79,14 @@ static PyObject* utest_init(PyObject *unused)
|
||||
return PyErr_Format(PyExc_RuntimeError, "db_start_events fails with %d", ret);
|
||||
}
|
||||
Py_RETURN_NONE;
|
||||
#else
|
||||
return PyErr_Format(PyExc_RuntimeError, "Requires Base >=3.15");
|
||||
#endif
|
||||
}
|
||||
|
||||
static PyObject* utest_shutdown(PyObject *unused)
|
||||
{
|
||||
#ifdef HAVE_DBTEST
|
||||
Py_BEGIN_ALLOW_THREADS {
|
||||
//testIocShutdownOk();
|
||||
db_close_events(testEvtCtx);
|
||||
@ -82,15 +94,22 @@ static PyObject* utest_shutdown(PyObject *unused)
|
||||
iocShutdown();
|
||||
} Py_END_ALLOW_THREADS
|
||||
Py_RETURN_NONE;
|
||||
#else
|
||||
return PyErr_Format(PyExc_RuntimeError, "Requires Base >=3.15");
|
||||
#endif
|
||||
}
|
||||
|
||||
static PyObject* utest_cleanup(PyObject *unused)
|
||||
{
|
||||
#ifdef HAVE_DBTEST
|
||||
Py_BEGIN_ALLOW_THREADS {
|
||||
testdbCleanup();
|
||||
errlogFlush();
|
||||
} Py_END_ALLOW_THREADS
|
||||
Py_RETURN_NONE;
|
||||
#else
|
||||
return PyErr_Format(PyExc_RuntimeError, "Requires Base >=3.15");
|
||||
#endif
|
||||
}
|
||||
|
||||
static PyMethodDef UTest_methods[] = {
|
||||
|
Reference in New Issue
Block a user