tests/python/vdbtests.py
author Jan Vrany <jan.vrany@fit.cvut.cz>
Mon, 08 Jul 2019 12:37:49 +0100
changeset 177 fd154978bab5
child 178 5d1c3e5fab6b
permissions -rw-r--r--
Load Python support code upon startup.

#
# jv:vdb - Visual / VM Debugger
# Copyright (C) 2015-now Jan Vrany
#
# This software is licensed under 'Creative Commons Attribution-NonCommercial 4.0 International License'
#
# You may find a full license text in LICENSE.txt or at http://creativecommons.org/licenses/by-nc/4.0/
#

"""
This script contains tests Pythin vdb support.
To run all tests

    gdb -q --ex "source vdbtests.py" -ex 'py run()' -ex "quit"

To run single test, for example, _instanceTests.test_context_03():

    gdb -q --ex "source vdbtests.py" -ex 'py run(parse_and_eval_test("test_01"))' -ex "quit"

"""

import os
import sys
import unittest

vdb_tests_python_dir = os.path.dirname(__file__)
vdb_python_dir = os.path.join(vdb_tests_python_dir, '..' , '..' , 'python')

sys.path.append(vdb_python_dir)

import gdb
import vdb