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