HomePhabricator

Add symlink to most recent functional test failure directory

Description

Add symlink to most recent functional test failure directory

Summary:
When iterating on a change or writing a new test, a common dev process goes like this:

  1. Make a change.
  2. Run ./test/functional/test_runner.py mytest It fails.
  3. Scroll up in the terminal and copy the test data directory.
  4. Paste it back into the command line for inspection.

This process is often repeated until the test is green. The smaller the terminal, the more annoying it is.

This patch introduces a very simple solution: a symlink to the last failing test's data directory. This makes it still useful if you are running multiple tests, but the best use case is when you need to repeat the process multiple times to nail down a fix for a particular test.

Test Plan:
Introduce assert() into some test.

./test/functional/test_runner.py thattest.py
ls -al lastfailure
./test/functional/combine_logs.py lastfailure
./test/functional/test_runner.py thattest.py
head lastfailure/test_framework.log  # verify the symlink updated by looking at the test directory name

Reviewers: O1 Bitcoin ABC, #bitcoin_abc, Fabien, PiRK

Reviewed By: O1 Bitcoin ABC, #bitcoin_abc, Fabien, PiRK

Subscribers: Fabien

Differential Revision: https://reviews.bitcoinabc.org/D17331

Details

Provenance
roqqitAuthored on Dec 9 2024, 18:40
roqqitPushed on Dec 10 2024, 19:57
Reviewer
Restricted Owners Package
Differential Revision
D17331: Add symlink to most recent functional test failure directory
Parents
rABC8917a6f8af6c: Run more functional tests in parallel by default
Branches
Unknown
Tags
Unknown