Skip to content
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

DAOS-11624 test: Adding support for the Test-storage-tier pragma #355

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

phender
Copy link
Contributor

@phender phender commented Dec 12, 2022

Adding support for passing the Test-storage-tier build parameter or commit pragma to launch.py via its --storage_tier argument.

Signed-off-by: Phil Henderson [email protected]

Adding support for passing the Test-storage-tier build parameter or
commit pragma to launch.py via its --storage_tier argument.

Signed-off-by: Phil Henderson <[email protected]>
brianjmurrell
brianjmurrell previously approved these changes Dec 12, 2022
Comment on lines 319 to 321
if (ftest_arg_storage_tier) {
result['ftest_arg'] += ' --storage_tier=' + ftest_arg_storage_tier
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Worth mentioning that this could be made more succinct with:

Suggested change
if (ftest_arg_storage_tier) {
result['ftest_arg'] += ' --storage_tier=' + ftest_arg_storage_tier
}
result['ftest_arg'] += ftest_arg_storage_tier ? ' --storage_tier=' + ftest_arg_storage_tier : ''

Or that a function could be written to make all of this more DRY, now that it's evident that it's proliferating. I.e.

String get_param_or_pragma(param, pragma, arg) {
    String res = params.$param ?: cachedCommitPragma(
      pragma + result['pragma_suffix'], cachedCommitPragma(pragma, null))

    return res ? '  --' + arg + '= ' + res : ''
}

result['ftest_arg'] += get_param_or_pragma('TestStorageTier', 'Test-storage-tier', '--storage_tier')

And of course using the above for all of the other param-or-pragma values that are built into result['ftest_arg'].

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks. I've added this change.

Signed-off-by: Phil Henderson <[email protected]>
Signed-off-by: Phil Henderson <[email protected]>
brianjmurrell
brianjmurrell previously approved these changes Dec 13, 2022
Signed-off-by: Phil Henderson <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants