Skip to content

tests: Avoid piping one GMT module into another - #9305

Merged
Esteban82 merged 1 commit into
masterfrom
fix-test-gmt-pipes
Nov 18, 2026
Merged

Esteban82 merged 1 commit into
masterfrom
fix-test-gmt-pipes

Conversation

@Esteban82

Copy link
Copy Markdown
Member

Splits every pipe with two or more GMT modules into sequential steps through temporary files, so the second module can no longer read an empty gmt.history and fail with "Found no history for option -R".

It covers the 21 scripts that failed at least two of the three ctest attempts in a job during the last 175 CI runs (Sep 23 – Nov 17); each one produces the same output files as before.

Closes #9301

🤖 Generated with Claude Code

Two GMT processes in a pipe start together and share gmt.history: the
first one rewrites it when it exits while the second one reads it, so the
second one can find an empty history and fail with "Found no history for
option -R". The rerun does not always save it: a test that fails all three
ctest attempts leaves the job red.

Split every pipe with two or more GMT modules into sequential steps through
temporary files, as recommended in the gmt movie "Shell limitations" docs.
Only the 21 scripts that failed at least two of the three attempts in a job
during the last 175 CI runs are changed; the ones that always passed on the
first rerun are left alone. Pipes with a single GMT module are kept.

For each script the output files are unchanged.

See #9301.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Esteban82 Esteban82 added the maintenance Boring but important stuff for the core devs label Nov 18, 2026

@joa-quim joa-quim left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But all these changes it means we are no longer testing the piping mechanism. Not good either.

@Esteban82

Copy link
Copy Markdown
Member Author

Not really. I only applied this to the tests that failed most often. Dozens of test scripts (81) still pipe one GMT module into another.

That said, if you prefer, I can switch to option (3) from #9301, where the second module gets explicit -R/-J values instead of reading them from the history.

@joa-quim

Copy link
Copy Markdown
Member

(3) would be better in principle but not all of them can be solved that way, so no need to bother.

@Esteban82
Esteban82 merged commit f2757a3 into master Nov 18, 2026
15 of 17 checks passed
@Esteban82
Esteban82 deleted the fix-test-gmt-pipes branch November 18, 2026 14:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintenance Boring but important stuff for the core devs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Piping one GMT module into another can lose the -R/-J history (flaky CI tests)

2 participants