[Differential] [Request, 1,219 lines] D1985: Improve gdb plugin unit tests

qi437103 (Aetf) noreply at phabricator.kde.org
Thu Jun 23 19:46:42 UTC 2016


qi437103 created this revision.
qi437103 added a reviewer: apol.
Restricted Application added a subscriber: kdevelop-devel.

REVISION SUMMARY
  This is a side effect of my work on lldb plugin unit tests, in which I tried to fix the somewhat unreliable test results.
  
  - Move unit test debugees to common folder, make gdb uses common unit test helpers
  - Make gdb plugin unit tests more reliable. waitForState now guarantees the session state after returning is exactly the requested one (otherwise fails the test).
  
  The main problem is that DebugSession could end and get deleted when running event loop (i.e. in QTest::qWait).
  And this fix adds proper checks to it. This by itself doesn't fix any tests, but it helps when some tests
  did goes wrong. Without this fix, they could crash the whole test process due to accessing to deleted object.

TEST PLAN
  gdb plugin unit tests (and actually some lldb plugin unit tests, which is only on local yet)

REPOSITORY
  rKDEVELOP KDevelop

BRANCH
  common-unittest

REVISION DETAIL
  https://phabricator.kde.org/D1985

AFFECTED FILES
  debuggers/CMakeLists.txt
  debuggers/common/CMakeLists.txt
  debuggers/common/unittest/debugees/CMakeLists.txt
  debuggers/common/unittest/debugees/debugee space.cpp
  debuggers/common/unittest/debugees/debugee.cpp
  debuggers/common/unittest/debugees/debugeecrash.cpp
  debuggers/common/unittest/debugees/debugeeexception.cpp
  debuggers/common/unittest/debugees/debugeemultilocbreakpoint.cpp
  debuggers/common/unittest/debugees/debugeemultiplebreakpoint.cpp
  debuggers/common/unittest/debugees/debugeeqt.cpp
  debuggers/common/unittest/debugees/debugeerecursion.cpp
  debuggers/common/unittest/debugees/debugeeslow.cpp
  debuggers/common/unittest/debugees/debugeethreads.cpp
  debuggers/common/unittest/debugees/path with space/CMakeLists.txt
  debuggers/common/unittest/debugees/path with space/spacedebugee.cpp
  debuggers/common/unittest/unittest.cpp
  debuggers/common/unittest/unittest.h
  debuggers/gdb/CMakeLists.txt
  debuggers/gdb/unittests/CMakeLists.txt
  debuggers/gdb/unittests/debugee space.cpp
  debuggers/gdb/unittests/debugee.cpp
  debuggers/gdb/unittests/debugeecrash.cpp
  debuggers/gdb/unittests/debugeeexception.cpp
  debuggers/gdb/unittests/debugeemultilocbreakpoint.cpp
  debuggers/gdb/unittests/debugeemultiplebreakpoint.cpp
  debuggers/gdb/unittests/debugeeqt.cpp
  debuggers/gdb/unittests/debugeerecursion.cpp
  debuggers/gdb/unittests/debugeeslow.cpp
  debuggers/gdb/unittests/debugeethreads.cpp
  debuggers/gdb/unittests/path with space/CMakeLists.txt
  debuggers/gdb/unittests/path with space/spacedebugee.cpp
  debuggers/gdb/unittests/test_gdb.cpp
  debuggers/gdb/unittests/test_gdb.h

EMAIL PREFERENCES
  https://phabricator.kde.org/settings/panel/emailpreferences/

To: qi437103, apol
Cc: kdevelop-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20160623/2d78f731/attachment.html>


More information about the KDevelop-devel mailing list