Skip to content

#552 Added pfunit tool and tests.#562

Open
Joerg Henrichs (hiker) wants to merge 4 commits into
mainfrom
552_add_pfunit
Open

#552 Added pfunit tool and tests.#562
Joerg Henrichs (hiker) wants to merge 4 commits into
mainfrom
552_add_pfunit

Conversation

@hiker
Copy link
Copy Markdown
Collaborator

As discussed, this adds the pfunit tool to Fab.

Note that I have NOT based this on #311 (PR #553). IMHO, the latter is kind of optional. Once we have pFUnit, we don't need really need #311 (it's just a nice to have for the future ;) ).

I am setting this as draft for now, to make sure that the core-fab-with-pfunit branch works as expected.

@hiker Joerg Henrichs (hiker) added enhancement New feature or request in progress Someone is actively working on this issue labels May 5, 2026
@hiker Joerg Henrichs (hiker) marked this pull request as draft May 5, 2026 08:25
@hiker Joerg Henrichs (hiker) marked this pull request as ready for review May 5, 2026 10:02
@hiker
Copy link
Copy Markdown
Collaborator Author

There is a certain "asymmetry": this class has a function for getting the include flags, but not the libraries. I would welcome some feedback here. Ideally, we should have a kind of 'dependency' manager, which handles linker AND compiler flags. So far, we only have library flags (in the linker). That would be a bit of work, time we all might not have atm.

The consistent solution would be to leave it to the site-specific setup to add the include flags require for pfunit, and I am happy to do that. In lfric, I have a mixin class which automatically adds the include path from pfunit, so it removes the need to add the include flags in all site-specific files (and if a site need something else, they can just add their own pfunit implementation). So, it basically means no need to change any site-specific setup files. But admittedly, it is inconsistent.

Not sure what's the best way forward here :)

But it is working with skeleton now, so marking this as ready for review.

@hiker Joerg Henrichs (hiker) added Ready for review Indicating that a PR is ready to be reviewed. and removed in progress Someone is actively working on this issue labels May 5, 2026
@hiker Joerg Henrichs (hiker) added the Priority Indicate an issue that should be done in the near future. label May 14, 2026
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

A question and some food for thought.

Comment thread source/fab/tools/category.py Outdated
AR = auto()
RSYNC = auto()
SHELL = auto()
PFUNIT = auto()
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Now that we have your change to categories on trunk, do you wont to reconsider your position on using them here?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Yes, I've brought this up-to-date with what is done for the other tools.

"""

def __init__(self):
pfunit_home = os.environ.get("PFUNIT", "")
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

In the future we might provide an argument on this constructor to specify the location of the driver source (that's what we need PFUNIT for). We could then move the use of the environment variable to the top level build script, or not. But I don't think it's worth making that change how.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I am happy to wait (or if you have details what you want, I can add this in, doesn't sound too complicated).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request Priority Indicate an issue that should be done in the near future. Ready for review Indicating that a PR is ready to be reviewed.

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

2 participants