Skip to content

Split tool test generators into core/header files #5515

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 19 commits into
base: develop
Choose a base branch
from

Conversation

mattjala
Copy link
Contributor

@mattjala mattjala commented May 6, 2025

This will allow gentest scripts to share routines between each other, so that cases where multiple tools tests require the same file can be handled without directly copying the files or duplicating file generation routines.

  • Split the tool gentest files into core, executable, and header portions.

The core file for each tool contains the definitions for the routines that generate test files.

The executable file is built into the gentest script, which uses the routines defined in each core file.

The header declares the routines and any values that need to be shared between the executable and the core file.

@mattjala mattjala self-assigned this May 6, 2025
@mattjala mattjala requested a review from lrknox as a code owner May 6, 2025 14:31
@mattjala mattjala added the Priority - 2. Medium It would be nice to have this in the next release label May 6, 2025
@mattjala mattjala added the Component - Testing Code in test or testpar directories, GitHub workflows label May 6, 2025
return 1;
} /* gen_enhance_files() */

#define FILENAME_ENHANCE_6 \
Copy link
Contributor Author

Choose a reason for hiding this comment

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

These entries were removed from the FILENAME_ENHANCE array since they're used in a different manner, and because doing so allowed the core/script split to be done more cleanly. Entries 6 and 7 were only used in main, while 0-5 were only used in the routines.

@mattjala
Copy link
Contributor Author

mattjala commented May 7, 2025

  • Moved the 'core' definition files back to the original h5gentest.c files
  • Merged the actual scripts into h5gentest.c, which takes an argument to decide which sets of files to create

h5clear_gentest was excluded from h5gentest because it exits in a specific way to leave IDs open.
Similarly, h5perf_gentest was excluded because it doesn't seem to be used for h5perf testing in the same way as the other gentest scripts.

@brtnfld brtnfld requested a review from jhendersonHDF May 13, 2025 15:20
@jhendersonHDF
Copy link
Collaborator

Just a couple minor comments but this looks pretty good to me.

@jhendersonHDF jhendersonHDF linked an issue May 16, 2025 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component - Testing Code in test or testpar directories, GitHub workflows Priority - 2. Medium It would be nice to have this in the next release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Move VOL tools testing to the library
2 participants