Skip to content

Conversation

@hageboeck
Copy link
Member

@hageboeck hageboeck commented Jan 14, 2026

1. Add a few small improvements for stressgraphics

  • Use non-zero exit code when a test fails.
  • When a test fails, print the file name of the generated graphics.
  • Label all stressGraphics runs as longtest.
  • Print differences in SVGs similar to how a unified diff would be
    printed.

2. Needed for #18083: Always use a new histogram for the tests

This makes the test future proof, working with or without implicit ownership of histograms.
Otherwise, due to TFile possibly returning a histogram that has been drawn in another test, tests can influence each other. This manifests in the stats box being drawn twice (once in the stats draw function of THistPainter, and a second time when the list of functions is drawn). This leads to a test failure in the svg tests, because here it's visible whether drawing happens once or twice, even if the output looks the same.
With this PR, the test will always use a fresh histogram, making the output independent of whether the same histogram is used in another test.

(I also tried a bit to remove the double drawing of the stats box, but this breaks other features like adding a custom stats box to the list of functions or enabling / disabling the stats box using the stats option. Always cloning the original histogram is the most robust option.)

Note:

My clang-format did not have any issues, so the failure looks to be due to version differences in clang-format

- Use non-zero exit code when a test fails.
- When a test fails, print the file name of the generated graphics.
- Label all stressGraphics runs as longtest.
- Print differences in SVGs similar to how a unified diff would be
  printed.
In the past, stressGraphics was retrieving a histogram from a file,
modifying it and drawing it. In subsequent tests, the histogram is again
read from the TFile, but this returns the in-memory object. This means
that the previous tests influence the subsequent tests, e.g. whether or
not statistics objects are displayed.
In particular, subsequent tests will have the statistics box drawn
twice, once from THistPainter::PaintStat(), and once from the fact that
the box is added to the list of functions. This impacts output files
such as PDF/PS/SVG.

Here, the histogram is always cloned when it is retrieved from the file,
so the tests are independent. The reference files for SVG are
regenerated, because the statistics box is now only drawn once.
Similarly, the output size of the .ps files has been corrected to
reflect that the boxes are only drawn once.
@github-actions
Copy link

Test Results

    23 files      23 suites   3d 19h 57m 13s ⏱️
 3 812 tests  3 809 ✅ 0 💤  3 ❌
80 404 runs  80 393 ✅ 0 💤 11 ❌

For more details on these failures, see this check.

Results for commit 4276a2d.

@hageboeck hageboeck added the clean build Ask CI to do non-incremental build on PR label Jan 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

clean build Ask CI to do non-incremental build on PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants