Fixed build.

This commit is contained in:
Matthias Koefferlein 2017-08-23 11:14:29 +02:00
parent c0afa4bf58
commit a0d864f3b6
2 changed files with 3 additions and 14 deletions

View File

@ -13,6 +13,6 @@ SOURCES = $$PWD/bd/main.cc
INCLUDEPATH += ../bd
DEPENDPATH += ../bd
LIBS += -L$$DESTDIR -lklayout_bd
LIBS += -L$$DESTDIR -lklayout_bd -lklayout_db -lklayout_tl -lklayout_gsi
DEFINES += BD_TARGET=$$TARGET

View File

@ -23,9 +23,6 @@
#ifdef HAVE_PYTHON
// For PY_MAJOR_VERSION
#include <Python.h>
#include "pya.h"
#include "gsiTest.h"
@ -47,11 +44,7 @@ TEST (1)
ut::python_interpreter ()->eval_string ("raise Exception(\"an error\")");
} catch (tl::ScriptError &ex) {
EXPECT_EQ (ex.basic_msg (), std::string ("an error"));
#if PY_MAJOR_VERSION < 3
EXPECT_EQ (ex.cls (), std::string ("exceptions.Exception"));
#else
EXPECT_EQ (ex.cls (), std::string ("Exception"));
#endif
EXPECT_EQ (ex.cls () == std::string ("exceptions.Exception") || ex.cls () == std::string ("Exception"), true);
err = true;
}
@ -62,11 +55,7 @@ TEST (1)
ut::python_interpreter ()->eval_string ("Quatsch");
} catch (tl::ScriptError &ex) {
EXPECT_EQ (ex.basic_msg (), std::string ("name 'Quatsch' is not defined"));
#if PY_MAJOR_VERSION < 3
EXPECT_EQ (ex.cls (), std::string ("exceptions.NameError"));
#else
EXPECT_EQ (ex.cls (), std::string ("NameError"));
#endif
EXPECT_EQ (ex.cls () == std::string ("exceptions.NameError") || ex.cls () == std::string ("NameError"), true);
err = true;
}