Commit graph

16 commits

Author SHA1 Message Date
Pavel Minaev
dd5196fbfc Blacken code. 2022-04-13 11:38:41 -07:00
Pavel Minaev
1965b47034 Get rid of fmt() and use idiomatic format() and f"" instead. 2022-04-13 11:38:41 -07:00
Pavel Minaev
e87017e0b3 Remove redundant "from __future__ import ..." 2022-04-13 11:38:41 -07:00
Pavel Minaev
4e2abc6681 Tests and CI refactoring:
Use YAML templates for setting up Python and running tests.

Use matrix instead of separate jobs for Windows 32-bit and 64-bit runs.

Change --debugpy-logs to --debugpy-log-dir with explicit destination, and use that to capture and publish test logs in CI.

Delete logs for passed tests by default, and add --debugpy-log-passed to opt out.
2020-01-30 20:43:17 -08:00
Pavel Minaev
8b4c40e922 Rename ptvsd -> debugpy. 2020-01-17 11:57:13 -08:00
Pavel Minaev
e9a5b68054 Simplify options handling. 2019-12-11 20:42:01 -08:00
Pavel Minaev
fad3c4f878 Add "from __future__ import division" to all ptvsd modules. 2019-10-30 17:12:17 -07:00
Pavel Minaev
b3f0265785 Place pydevd log file in debug.Session log directory, for better handling of multi-session (e.g. multiproc) tests.
Always log to disk for test runs, and dump all ptvsd and pydevd logs on test failures and timeouts.
2019-10-16 11:44:17 -07:00
Pavel Minaev
4b9773e89d Also capture full pytest logs with --ptvsd-logs. 2019-09-30 04:41:10 -07:00
Pavel Minaev
1bdfbdfe61 Include bitness and exclude release version number from --pytest-logs subdirectory names. 2019-09-27 18:07:50 -07:00
Pavel Minaev
8f358d6e0f Refactor tests.debug to accommodate ptvsd.server spawning the adapter, and remove the need for "custom_client" and "custom_server" start methods.
Fix launcher not propagating debuggee exit code.

Fix attach-by-PID without explicit --log-dir overriding PTVSD_LOG_DIR (and disabling logging).

Improve test logging, with a separate directory for every test.

Various test fixes.
2019-09-26 13:20:26 -07:00
Pavel Minaev
e94980f86c Do not load ptvsd.server (and hence, pydevd) unless the subpackage is loaded explicitly or via a public API entrypoint that requires it.
Move docstrings to top-level package, and update them to reflect the current behavior.

Remove unused code in ptvsd.common.log.

Move sys.path/prefix/site_packages logging into ptvsd.common.log, and log it from adapter and server to the same level of detail as the tests.

Fix injected code snipped for attach-by-PID.

Fix some Unicode issues in adapter and tests.

Refactor Timeline, debug.Session, and start methods.
2019-08-18 11:43:23 -07:00
Pavel Minaev
4aec028c32 Improve multiprocess and reattach scenario handling in debug.Session.
Use unbuffered pipes for subprocesses on all Python versions.

Make test watchdog more lenient with respect to process ID reuse - warn, but don't fail.
2019-07-18 10:13:02 -07:00
Pavel Minaev
44ca8fa3fc Fix #1555: Child process watchdog for tests
Implement per-test-runner out-of-process watchdog for processes spawned by tests.

Add file logging for tests and watchdog.

Improve stdio capture in debug.Session when test fails.

Remove redundant logging in debug.Session.
2019-07-18 10:13:02 -07:00
Pavel Minaev
82b62b77b5 Fix #1551: Backchannel failures in tests
Fix various bugs around handling of disconnect in JsonIOStream and JsonMessageChannel.

Fix handling of DAP "terminated" event in debug.Session.

Add --ptvsd-logs and --pydevd-logs switches to pytest.

Improve message logging to fully capture the raw message data in the logs if deserialization fails.

Log all debuggee environment variables in debug.Session, and improve log readability.
2019-07-02 17:05:51 -07:00
Pavel Minaev
f71f0a5b0a Tests refactoring. (#1543) 2019-06-28 10:13:00 -07:00