Move docstring check from fatal-onstart-hack to unit test run by CI

This commit is contained in:
baldurk
2017-10-02 15:54:23 +01:00
parent cd17180e64
commit 8c74c92079
7 changed files with 80 additions and 22 deletions
@@ -58,6 +58,10 @@ PyTypeObject **SbkPySide2_QtWidgetsTypes = NULL;
#include "Code/QRDUtils.h"
#include "PythonContext.h"
// exported by generated files, used to check docstrings in interfaces
bool CheckCoreDocstrings();
bool CheckQtDocstrings();
// defined in SWIG-generated renderdoc_python.cpp
extern "C" PyObject *PyInit__renderdoc(void);
extern "C" PyObject *PassObjectToPython(const char *type, void *obj);
@@ -443,6 +447,18 @@ PythonContext::~PythonContext()
outputTick();
}
bool PythonContext::CheckDocstrings()
{
bool errors = false;
PyGILState_STATE gil = PyGILState_Ensure();
errors |= CheckCoreDocstrings();
errors |= CheckQtDocstrings();
PyGILState_Release(gil);
return errors;
}
void PythonContext::Finish()
{
PyGILState_STATE gil = PyGILState_Ensure();